Commit Graph

15489 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
09825e4678 merge bitcoin#18867: Add fuzzing harness for CCoinsViewCache 2022-07-15 21:09:53 +05:30
Odysseas Gabrielides
2974fa20bb
feat(rpc): getnetworkinfo RPC enrichment response (#4913)
* Enrich getnetworkinfo

* Adjustements
2022-07-14 16:13:47 -05:00
Odysseas Gabrielides
beba663a57
fix!: GetNumCommitmentsRequired Rotation (#4915)
* Fix in GetNumCommitmentsRequired

* Correction
2022-07-14 16:12:33 -05:00
UdjinM6
32051a35c0
fix(llmq): mark mns "bad" based on the failed connect attempts count (#4910)
* fix(llmq): mark mns "bad" based on the failed connect attempts count

Avoid using "last success time" as a proxy

* fix(tests): tweak feature_llmq_simplepose.py
2022-07-14 21:38:02 +03:00
Kittywhiskers Van Gogh
04b7bcf52a
feat(llmq): add human-readable message alongside error code (#4916) 2022-07-14 12:53:42 -05:00
PastaPastaPasta
6c0a63360f
Merge pull request #4882 from kittywhiskers/xliff_update
backport: bitcoin#21694 (Use XLIFF file to provide more context to Transifex)
2022-07-13 08:27:34 -04:00
Konstantin Akimov
0a951622f1
Bitcoin backport #16227 refactoring CWallet (#4903)
* Add HaveKey and HaveCScript to SigningProvider

* Remove CKeyStore and squash into CBasicKeyStore

* Move HaveKey static function from keystore to rpcwallet where it is used

* scripted-diff: rename CBasicKeyStore to FillableSigningProvider

-BEGIN VERIFY SCRIPT-
git grep -l "CBasicKeyStore" | xargs sed -i -e 's/CBasicKeyStore/FillableSigningProvider/g'
-END VERIFY SCRIPT-

* Move KeyOriginInfo to its own header file

* Move various SigningProviders to signingprovider.{cpp,h}

Moves all of the various SigningProviders out of sign.{cpp,h} and
keystore.{cpp,h}. As such, keystore.{cpp,h} is also removed.

Includes and the Makefile are updated to reflect this. Includes were largely
changed using:
git grep -l "keystore.h" | xargs sed -i -e 's;keystore.h;script/signingprovider.h;g'

* Remove CCryptoKeyStore and move all of it's functionality into CWallet

Instead of having a separate CCryptoKeyStore that handles the encryption
stuff, just roll it all into CWallet.

* Fixed cases of mess CWallet functions with CCryptoKeyStore and conflicts

* Move WatchOnly stuff from SigningProvider to CWallet

* Fixes for lint cirtular dependencies to calm linter

Co-authored-by: Andrew Chow <achow101-github@achow101.com>
2022-07-12 22:46:31 -05:00
PastaPastaPasta
eefdae1a53
Merge pull request #4829 from kittywhiskers/fuzz2
backport: bitcoin#18417, #18521, #18529, #18176, #18423, #17926, #18353, #18407, #18455, #18565, #18867 (fuzzing harness backports: part 2)
2022-07-12 12:32:28 -04:00
UdjinM6
a483122f5f
fix(net): Extend blocks-relay-only to also ignore some Dash-specific messages/invs (#4888)
* fix(net): Extend blocks-relay-only to also ignore some Dash-specific messages/invs

* Clarify few things
2022-07-07 18:11:38 +03:00
UdjinM6
e98929a3e9
fix(dkg): let probes on mainnet ignore existing inbound connections (#4908) 2022-07-07 10:49:55 +03:00
UdjinM6
58cfeaf321
fix(dkg): let masternodes miss few connection attempts before considering them "bad" (#4907)
* fix(dkg): let masternodes miss few connection attempts before considering them "bad"

Should help with dashd updates/restarts for nodes that were successfully probed recently.

* fix
2022-07-07 10:49:34 +03:00
UdjinM6
320edd5575
fix(net): Let MNs accept conections as soon as blockchain is synced (#4905)
Do not wait for governance data, it's not needed for DKGs
2022-07-07 00:25:02 +03:00
UdjinM6
40486ada82
feat(llmq): avoid probing mns too often instead of using a tiny window to probe them (#4904)
We only call AddQuorumProbeConnections when a new quorum is intialized. It's possible to miss the 10 minute probe window if Contribute phase takes too long (when 2 blocks were mined in 10+ minutes). 50 minutes should be enough and probing once in 10 minutes should be safe.
2022-07-07 00:24:34 +03:00
Kittywhiskers Van Gogh
5715842187 merge bitcoin#21349: Fix fuzz-cuckoocache cross-compiling for Windows with DEBUG=1 2022-07-07 01:01:32 +05:30
Kittywhiskers Van Gogh
d016ccd065 merge bitcoin#18565: Add fuzzing harnesses for classes/functions in checkqueue.h and cuckoocache.h. Add fuzzing coverage. 2022-07-06 22:14:04 +05:30
Kittywhiskers Van Gogh
ee7e37ae01 merge bitcoin#18455: Add fuzzing harness for functions/classes in flatfile.h, merkleblock.h, random.h, serialize.h and span.h 2022-07-06 22:13:37 +05:30
Kittywhiskers Van Gogh
1b424f6b3b merge bitcoin#18407: Add proof-of-work fuzzing harness 2022-07-06 22:13:37 +05:30
Kittywhiskers Van Gogh
7a954b8bd7 merge bitcoin#18423: Add fuzzing harness for classes/functions in blockfilter.h. Add integer {de,}serialization fuzzing 2022-07-06 22:13:37 +05:30
Kittywhiskers Van Gogh
f319ddbe85 merge bitcoin#18176: Add fuzzing harness for CScript and CScriptNum operations 2022-07-06 22:13:37 +05:30
Kittywhiskers Van Gogh
26ea6762d3 merge bitcoin#18529: Add fuzzer version of randomized prevector test 2022-07-06 22:13:37 +05:30
Kittywhiskers Van Gogh
1552a1e9dc merge bitcoin#18521: Add process_messages harness 2022-07-06 22:13:37 +05:30
Kittywhiskers Van Gogh
6ee033b2da merge bitcoin#18417: Add fuzzing harnesses for functions in addrdb.h, net_permissions.h and timedata.h 2022-07-06 22:13:36 +05:30
Kittywhiskers Van Gogh
ab8822c184 merge bitcoin#18353: Add fuzzing harnesses for classes CBlockHeader, CFeeRate and various functions 2022-07-06 21:48:11 +05:30
Kittywhiskers Van Gogh
d807cc7a8a merge bitcoin#17926: Add key_io fuzzing harness. Fuzz additional functions in existing fuzzing harnesses 2022-07-06 21:48:10 +05:30
UdjinM6
22262137a2
Merge pull request #4900 from UdjinM6/followup_4880
fix(qt): fix crashes introduced by 15937 and 19099 backports
2022-07-05 17:36:56 +03:00
PastaPastaPasta
87b6d1c958
Merge pull request #4830 from kittywhiskers/auxiliary_ports
backport: bitcoin#15141, #15437, #16240, #18923, #19219, #19277, #20016, #20671 (auxiliary backports)
2022-07-03 12:13:11 -05:00
UdjinM6
8755067a32
feat(qt): Make wallet repair options only available when there is a single loaded wallet only
Also fixes a crash for `-nowallet` introduced via 15937 backport (in 4880)
2022-07-03 11:01:19 +03:00
MarcoFalke
867b6efe4d
Merge bitcoin-core/gui#102: Fix SplashScreen crash when run with -disablewallet
c056064a4a93be3601a63b37afea41f8b878df79 gui: Fix SplashScreen crash when run with -disablewallet (Hennadii Stepanov)

Pull request description:

  This PR fixes the bug introduced in https://github.com/bitcoin/bitcoin/pull/19099:

  ```
  $ src/qt/bitcoin-qt -disablewallet
  bitcoin-qt: interfaces/node.cpp:236: auto interfaces::(anonymous namespace)::NodeImpl::walletClient()::(anonymous class)::operator()() const: Assertion `"m_context->wallet_client" && check' failed.
  Aborted (core dumped)
  ```

ACKs for top commit:
  Sjors:
    tACK c056064
  promag:
    ACK c056064a4a93be3601a63b37afea41f8b878df79.

Tree-SHA512: 263d9efd5899cc6e447dfc5142bf911ca627149fac0a1c5e5b58dd196aa5e0d12fe13e3f750fb5f3c4338222f7959935d2f77391263f967dbca2e0e79a416a29
2022-07-03 11:00:20 +03:00
Kittywhiskers Van Gogh
af2984b2ae merge bitcoin#18923: Never schedule MaybeCompactWalletDB when -flushwallet is off
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-07-03 00:14:47 +05:30
Kittywhiskers Van Gogh
9e50d3a159 merge bitcoin#16240: JSONRPCRequest-aware RPCHelpMan 2022-07-03 00:14:47 +05:30
Kittywhiskers Van Gogh
21f5405e4a merge bitcoin#19277: Add Assert identity function 2022-07-03 00:14:47 +05:30
Kittywhiskers Van Gogh
e235d834da merge bitcoin#20671: Replace boost::optional with std::optional 2022-07-03 00:14:47 +05:30
UdjinM6
ef8cf4bfea
Merge pull request #4741 from kittywhiskers/ci2
backport: bitcoin#16597, #17176, #14794, #17205, #17240, #17367, #18862, #21405 (ci reworking: part 2)
2022-07-02 21:27:26 +03:00
Kittywhiskers Van Gogh
c8a5fa207d merge bitcoin#20016: 1 is a constant 2022-07-02 23:47:42 +05:30
Kittywhiskers Van Gogh
51eac2a5d7 llmq: remove unused variable "hash" from Unserialize 2022-07-02 23:47:42 +05:30
Kittywhiskers Van Gogh
281569adaa test: remove global assignment patch used for args definition in qt tests 2022-07-02 23:47:42 +05:30
Kittywhiskers Van Gogh
93a01604c3 refactor: define a UINT256_ONE global constant
Borrowed from https://github.com/bitcoin/bitcoin/pull/17261, commit 4977c30d59
2022-07-02 23:47:42 +05:30
Kittywhiskers Van Gogh
d2d7febd0e fuzz: sort ENABLE_FUZZ block alphabetically to avoid merge conflicts 2022-07-02 23:47:42 +05:30
UdjinM6
14402a1b34
fix(llmq): Fix quorum commitments requirement conditions (#4899)
Wasn't really requiring other commitments for rotation quorums once a single commitment was mined
2022-07-02 21:02:42 +03:00
UdjinM6
44d095b59c
Merge pull request #4880 from PastaPastaPasta/backports-19754
backport: 19754 and necessary pre-reqs
2022-07-02 21:01:26 +03:00
PastaPastaPasta
9021e3a314
merge #19754: wallet, gui: Reload previously loaded wallets on startup
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-07-01 15:53:24 -05:00
Kittywhiskers Van Gogh
94786b9f75 merge bitcoin#21405: remove memcpy -> memmove backwards compatibility alias 2022-07-01 09:02:38 +05:30
Kittywhiskers Van Gogh
959518fdfd merge bitcoin#18862: Remove fdelt_chk back-compat code and sanity check 2022-07-01 09:02:38 +05:30
UdjinM6
def2e98d61
Merge pull request #4898 from PastaPastaPasta/backport-18530
Merge #18530: Add test for -blocksonly and -whitelistforcerelay param interaction
2022-06-30 22:06:15 +03:00
PastaPastaPasta
d89de3a2fa
Merge pull request #4866 from Munkybooty/backports-0.20-pr4
Backports 0.20 pr4
2022-06-30 10:08:59 -05:00
MarcoFalke
4d6f0cd2f2
Merge #18530: Add test for -blocksonly and -whitelistforcerelay param interaction
0ea5d70b4756f376342417e0019490233cb4a918 Updated comment for the condition where a transaction relay is denied (glowang)
be01449cc8eb7bb97531a967f5d1dcc7b8865d1e Add test for param interaction b/w -blocksonly and -whitelistforcerelay (glowang)

Pull request description:

  Related to: #18428

  When -blocksonly is turned on, a node would still relay transactions from whitelisted peers. This funcitonality has not been tested.

ACKs for top commit:
  MarcoFalke:
    ACK 0ea5d70b4756f376342417e0019490233cb4a918

Tree-SHA512: 4e99c88281cb518cc67f5f3be7171a7b413933047b5d24a04bb3ff2210a82e914d69079f64cd5bac9206ec435e21a622c8e69cedbc2ccb39d2328ac5c01668e5
2022-06-29 10:14:58 -05:00
Odysseas Gabrielides
088d7f2ec5
fix: Faster feature_llmq_rotation.py + introduction of llmq_devnet_dip0024 (#4878)
* Added LLMQ_DEVNET_V2

* Faster feature_llmq_rotation func test

* Updated llmq_devnet_dip0024

* Adjusted parameters

* Better comments

* Re-adjusted rotated llmq params
2022-06-28 19:14:09 -05:00
UdjinM6
46c887d394
Merge pull request #4894 from PastaPastaPasta/develop-trivial-2022-06-22
backport: trivial backports
2022-06-27 22:58:16 +03:00
UdjinM6
ac7ed67d30
Merge pull request #4889 from PastaPastaPasta/develop-trivial-2022-06-18
Develop trivial 2022 06 18
2022-06-27 22:57:55 +03:00
Munkybooty
9c839dd836
Merge #18499: rpc: Make rpc documentation not depend on call-time rpc args (#4893) 2022-06-27 11:40:22 -05:00
MarcoFalke
093252cba6
Merge bitcoin/bitcoin#24072: doc: fix wording of alertnotify to match behaviour
6981de4435573ad44ee53fd5efc10894866ed2f9 doc: fix wording of alertnotify (willcl-ark)

Pull request description:

  The documentation of the `alertnotify` startup option no longer matches the implementation.

  Currently the alert is only triggered by `DoWarning` (as part of `CChainstate::UpdateTip` when blocks containing unknown versionbits are detected on the network, indicating that there may be an upcoming softfork which you don't know about), but not when we see a "really long fork":

  2825c41a61/src/validation.cpp (L2418-L2433)

  I think it would be desirable in a follow-up PR to implement the logic to alert on a (really) long fork, but not to alert for "partition detection" (abnormally slow/fast blocks). `PartitionChecker` code was removed in ab8be98fdb

ACKs for top commit:
  josibake:
    ACK 6981de4435
  achow101:
    ACK 6981de4435573ad44ee53fd5efc10894866ed2f9

Tree-SHA512: ea124f53ca1db803ba93d649f4bc983484c47fb5fe7fa61a8eb32fcbc7425f67d8578e66a6ba70202e13868fe8add0103306dede3b1edd1d3261ffb9c1042b87
2022-06-27 11:37:04 -05:00
fanquake
93e70903ce
Merge bitcoin/bitcoin#23937: doc: Fix dumptxoutset RPC help doc
faa9e461ab3cdec61d8428621fb3adc76e964415 doc: Fix dumptxoutset RPC help doc (MarcoFalke)

Pull request description:

  Fixes `help dumptxoutset`.

  To test: `help dumptxoutset`.

ACKs for top commit:
  shaavan:
    ACK faa9e461ab3cdec61d8428621fb3adc76e964415

Tree-SHA512: f40f1636469da61ab4a2aa6d9efb84de525b220e8897b4fe2720211def87d262be57956d1474fe04f395e7634d83b4e5aee474ad869b4b5aa619f22ecd2e78fc
2022-06-27 11:37:04 -05:00
MarcoFalke
f3b7c61a9a
Merge bitcoin/bitcoin#21746: refactor: init: mark fReset const
785f9cc46a43661c63a5ec56a9e82f4ce9d42f44 refactor: init: mark fReset const (James O'Beirne)

Pull request description:

  Small thing, but hey - it doesn't change.

ACKs for top commit:
  theStack:
    Code-review ACK 785f9cc46a43661c63a5ec56a9e82f4ce9d42f44

Tree-SHA512: 3cb8d7037f517162f6315d561accc4932b0f1e340162c3283871433f2e355d57b3740c9d2e953ce33fbfa3b277c8437f91955fb70331b3fe9c8e6a8589dc2b49
2022-06-27 11:37:03 -05:00
fanquake
46cc6423b1
Merge #21311: rpc: document optional fields for getchaintxstats result
73e1f7d754c0a2381254447d692fe27a5af8c1c5 rpc: document optional fields for getchaintxstats result (Sebastian Falbesoner)

Pull request description:

  This mini-PR updates the result help of the `getchaintxstats` RPC by showing the following fields as "optional":
  - window_tx_count
  - window_interval
  - txrate

  Help output diff between master and PR branch:
  ```diff
  16,18c16,18
  <   "window_tx_count" : n,                (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0
  <   "window_interval" : n,                (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0
  <   "txrate" : n                          (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0
  ---
  >   "window_tx_count" : n,                (numeric, optional) The number of transactions in the window. Only returned if "window_block_count" is > 0
  >   "window_interval" : n,                (numeric, optional) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0
  >   "txrate" : n                          (numeric, optional) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0
  ```

ACKs for top commit:
  0xB10C:
    ACK 73e1f7d754c0a2381254447d692fe27a5af8c1c5

Tree-SHA512: 63c8db3e47a3c2d5564d53c564484b95b656e1e5deca1e9841bc90d122d3c81f02fd2b59313fd913ce81b16f7cc2969fe1dd9d6c3e23628b8ac057ea08f55daa
2022-06-27 11:37:03 -05:00
MarcoFalke
10979f1a74
Merge #21317: util: Make Assume() usable as unary expression
fa4cebadcffd9112da4b13c7cc7ccf21e2bee887 util: Make Assume() usable as unary expression (MarcoFalke)

Pull request description:

  Assume shouldn't behave different at the call site depending on build flags. Currently compilation fails if it is used as expression. Fix that by using the lambda approach from `Assert()` without the `assert()`.

ACKs for top commit:
  jnewbery:
    ACK fa4cebadcffd9112da4b13c7cc7ccf21e2bee887
  practicalswift:
    cr ACK fa4cebadcffd9112da4b13c7cc7ccf21e2bee887: patch looks correct and commit hash starts with `fa`

Tree-SHA512: 9ec9ac8d410cdaf5e4e28df571a89e3d23d38e05a7027bb726cae3da6e9314734277e5a218e9e090cc17e10db763da71052c229ad642077ca5824ee42022f3ed
2022-06-27 11:37:02 -05:00
UdjinM6
d9c70e2916
llmq: Various fixes and improvements (#4890)
* feat(llmq): Introduce useRotation in LLMQParams

* fix(llmq): Fix IsQuorumRotationEnabled to recognize all dip0024 quorums

* fix(llmq): Do not allow rotation llmqs for `-llmqinstantsend` and non-rotation ones for `-llmqinstantsenddip0024`

* fix(llmq): Unify and fix IsMiningPhase

NOTE: no need for 1 extra block in mining phase for rotation quorums

* chore(llmq): Reduce the number of IsQuorumRotationEnabled calls

* chore(llmq): Improve logging

* feat(llmq): Make `llmq-` threads for rotation quorums distinguishable by quorum index

* fix(llmq): Fix another endless loop in GetQuorumRelayMembers

* throw an error when a llmq type with an incompatible rotation flag is picked for `-llmq...` params

* Add a note about loop conditions

* llmq: Make TransactionRemovedFromMempool the last action for invalid txes, just like we do for orphans with rejected parents

Write to log, send reject msg and (maybe) punish first and only then notify IS about the tx removal. Makes it easier to reason about it when reading logs.
2022-06-27 13:02:46 +03:00
UdjinM6
b9b60b02c6
chore: no scriptPayout and scriptOperatorPayout by default in protx diff / CSimplifiedMNListEntry (#4895) 2022-06-27 13:01:52 +03:00
PastaPastaPasta
f7f70d61de
feat: add scriptPayout and scriptOperatorPayout to protx diff / CSimplifiedMNListEntry (#4740)
* feat: add scriptPayout and scriptOperatorPayout to `protx diff` / CSimplifiedMNListEntry

* mem-only

* tweak BuildSimplifiedDiff

* add "extended" to "protx diff"

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-24 21:35:23 +03:00
MarcoFalke
68809aeacb
Merge #19217: p2p: disambiguate block-relay-only variable names from blocksonly variables
ec4c6a17e82a6726d95075b43ebd2525c50b37cd scripted-diff: replace MAX_BLOCKS_ONLY_CONNECTIONS with MAX_BLOCK_RELAY_ONLY_CONNECTIONS (glowang)

Pull request description:

  We have two different concepts that have similar names: `-blocksonly` and `block-relay-only`, and the similarity of names could lead to confusion. `-blocksonly` disables all local receiving & relaying of transactions (with a few exceptions), while `block-relay-only`means that bitcoind will make 2 additional outbound connections that are only used for block relay.

  In net.h and init.cpp, `MAX_BLOCKS_ONLY_CONNECTIONS` is used to represent the maximum number of `block-relay-only` outbound peers, which is 2. But this name sounds ambiguous, and I proposed a better name,  `MAX_BLOCK_RELAY_ONLY_CONNECTION`.

ACKs for top commit:
  jnewbery:
    ACK ec4c6a17e82a6726d95075b43ebd2525c50b37cd

Tree-SHA512: cfa592a7ff936f14d10cfc1e926a51b82bc0feaf104885a41ca8111b906cb3d1ec5536bab143a3cfca70aa49e9575c6995941eb6d3d7f4018d4535712342f155
2022-06-22 18:01:03 -07:00
fanquake
0fcd9bd10c
Merge #18910: p2p: add MAX_FEELER_CONNECTIONS constant
e3047edfb63c3d098cb56ba9f9a1e7e0a795d552 test: use p2p constants in denial of service tests (fanquake)
25d8264c95eaf98a66df32addb0bf32d795a35bd p2p: add MAX_FEELER_CONNECTIONS constant (tryphe)

Pull request description:

  Extracted from #16003.

ACKs for top commit:
  naumenkogs:
    utACK e3047ed

Tree-SHA512: 14fc15292be4db2e825a0331dd189a48713464f622a91c589122c1a7135bcfd37a61e64af1e76d32880ded09c24efd54d3c823467d6c35367a380e0be33bd35f
2022-06-22 17:58:47 -07:00
PastaPastaPasta
c3f5f81a44
Merge pull request #4891 from kittywhiskers/antispam_bps
backport: bitcoin#15141, #19219 (rewrite DoS interface, use discouragement filter)
2022-06-22 17:11:56 -07:00
Vijay
6df949628f
Merge #15427: Add support for descriptors to utxoupdatepsbt (#4656)
26fe9b990995f9cb5eee21d40b4daaad19f7181f Add support for descriptors to utxoupdatepsbt (Pieter Wuille)
3135c1a2d2e2fb31bc362c848bd2456d576e408b Abstract out UpdatePSBTOutput from FillPSBT (Pieter Wuille)
fb90ec3c33e824f5abb6a68452c683d6ce8b3e4a Abstract out EvalDescriptorStringOrObject from scantxoutset (Pieter Wuille)
eaf4f887348a08c620732125ad4430e1a133d434 Abstract out IsSegWitOutput from utxoupdatepsbt (Pieter Wuille)

Pull request description:

  This adds a descriptors argument to the `utxoupdatepsbt` RPC. This means:
  * Input and output scripts and keys will be filled in when known.
  * P2SH-witness inputs will be filled in from the UTXO set when a descriptor is provided that shows they're spending segwit outputs.

  This also moves some (newly) shared code to separate functions: `UpdatePSBTOutput` (an analogue to `SignPSBTInput`), `IsSegWitOutput`, and `EvalDescriptorStringOrObject` (implementing the string or object notation parsing used in `scantxoutset`).

ACKs for top commit:
  jnewbery:
    utACK 26fe9b990995f9cb5eee21d40b4daaad19f7181f
  laanwj:
    utACK 26fe9b990995f9cb5eee21d40b4daaad19f7181f (will hold merging until response to promag's comments)
  promag:
    ACK 26fe9b9, checked refactors and tests look comprehensive. Still missing a release note but can be added later.

Tree-SHA512: 1d833b7351b59d6c5ded6da399ff371a8a2a6ad04c0a8f90e6e46105dc737fa6f2740b1e5340280d59e01f42896c40b720c042f44417e38dfbee6477b894b245

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2022-06-22 16:42:19 -07:00
Kittywhiskers Van Gogh
a7ee2c2667 merge bitcoin#19219: Replace automatic bans with discouragement filter
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-21 19:11:49 +05:30
Kittywhiskers Van Gogh
f14bf83a9d merge bitcoin#15141: Rewrite DoS interface between validation and net_processing
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-21 19:11:26 +05:30
PastaPastaPasta
da5ba5a304 merge #19099: refactor: Move wallet methods out of chain.h and node.h
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-21 19:08:57 +05:30
PastaPastaPasta
7f3c8c399e merge #15937: Add loadwallet and createwallet load_on_startup options
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-21 19:08:56 +05:30
PastaPastaPasta
e1d8dfba06 merge #15935: Add <datadir>/settings.json persistent settings storage
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-21 19:08:55 +05:30
PastaPastaPasta
b9efbdeab7 merge #16115: On bitcoind startup, write config args to debug.log
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-21 19:08:55 +05:30
PastaPastaPasta
98cec64482 partial #17473: refactor: Replace FlagsOfKnownArg with GetArgFlags 2022-06-21 19:08:54 +05:30
Konstantin Akimov
ef3f738f6f
Merge bitcoin#15759: p2p: Add 2 outbound block-relay-only connections (#4862)
* Remove unused variable

* [refactor] Move tx relay state to separate structure

* [refactor] Change tx_relay structure to be unique_ptr

* Check that tx_relay is initialized before access

* Add comment explaining intended use of m_tx_relay

* Add 2 outbound block-relay-only connections

Transaction relay is primarily optimized for balancing redundancy/robustness
with bandwidth minimization -- as a result transaction relay leaks information
that adversaries can use to infer the network topology.

Network topology is better kept private for (at least) two reasons:

(a) Knowledge of the network graph can make it easier to find the source IP of
a given transaction.

(b) Knowledge of the network graph could be used to split a target node or
nodes from the honest network (eg by knowing which peers to attack in order to
achieve a network split).

We can eliminate the risks of (b) by separating block relay from transaction
relay; inferring network connectivity from the relay of blocks/block headers is
much more expensive for an adversary.

After this commit, bitcoind will make 2 additional outbound connections that
are only used for block relay. (In the future, we might consider rotating our
transaction-relay peers to help limit the effects of (a).)

* Don't relay addr messages to block-relay-only peers

We don't want relay of addr messages to leak information about
these network links.

* doc: improve comments relating to block-relay-only peers

* Disconnect peers violating blocks-only mode

If we set fRelay=false in our VERSION message, and a peer sends an INV or TX
message anyway, disconnect. Since we use fRelay=false to minimize bandwidth,
we should not tolerate remaining connected to a peer violating the protocol.

* net_processing. Removed comment + fixed formatting

* Refactoring net_processing, removed duplicated code

* Refactor some bool in a many-arguments function to enum

It's made to avoid possible typos with arguments, because some of them have default values and it's very high probability to make a mistake here.

* Added UI debug option for Outbound

* Fixed data race related to `setInventoryTxToSend`, introduced in `[refactor] Move tx relay state to separate structure`

Co-authored-by: Suhas Daftuar <sdaftuar@gmail.com>
2022-06-18 23:02:28 -07:00
PastaPastaPasta
951398e8b3
Merge pull request #4792 from vijaydasmp/bp2007
Merge #16949,#15084,#17138,#16689,#15098, #15932
2022-06-18 22:12:07 -07:00
PastaPastaPasta
aa97e52f26
Merge pull request #4887 from knst/bc-bp-4
Bitcoin backports #13756 #15770 #17730 #17750 #17752 #17826 #17857 #15886
2022-06-18 20:23:31 -07:00
Kittywhiskers Van Gogh
282b02e6b2
rpc: split spork manipulation logic to distinct "sporkupdate" call (#4885)
* rpc: split spork manipulation logic to distinct "sporkupdate" call

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* docs: add release notes for dash#4885

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-18 19:52:45 +03:00
Jonas Schnelli
59f9ea5815
Merge #15084: gui: don't disable the sync overlay when wallet is disabled
b3b6b6f62fcabea9818e8049dba714d0d0ef8ab6 gui: don't disable the sync overlay when wallet is disabled (Ben Carman)

Pull request description:

  Continuation of #13848.

  When running with `-disablewallet` the sync modal is now available by clicking on the progress bar or `syncing` icon.

  [Current Image of what the window looks like](https://imgur.com/6LsoT2l)

  Fixes #13828.

ACKs for top commit:
  jonasschnelli:
    Tested ACK b3b6b6f62fcabea9818e8049dba714d0d0ef8ab6

Tree-SHA512: 325bc22a0b692bfb8fcc9d84e02dfc506146028b97b3609e23c2c45288c79b8aead1ad2e9b8d692f5f6771b4d2aee63fbe71bfaeaf17d260865da32ab3631e07
2022-06-18 17:19:47 +05:30
MarcoFalke
8853b6e1e4
(partial) Merge #17138: Remove wallet access to some node arguments
b96ed0396294fc4fa89d83ceab6bc169dd09f002 [wallet] Remove pruning check for -rescan option (John Newbery)
eea462de9c652dca556ad241d2126b10790f67f8 [wallet] Remove package limit config access from wallet (John Newbery)

Pull request description:

  Removes wallet access to `-limitancestorcount`, `-limitdescendantcount` and `-prune`:

  - `-limitancestorcount` and `-limitdescendantcount` are now accessed with a method `getPackageLimits` in the `Chain` interface.
  - `-prune` is not required. It was only used in wallet component initiation to prevent running `-rescan` when pruning was enabled. This check is not required.

  Partially addresses #17137.

ACKs for top commit:
  MarcoFalke:
    Tested ACK b96ed0396294fc4fa89d83ceab6bc169dd09f002
  ryanofsky:
    Code review ACK b96ed0396294fc4fa89d83ceab6bc169dd09f002
  promag:
    Code review ACK b96ed0396294fc4fa89d83ceab6bc169dd09f002.
  ariard:
    ACK b96ed03, check there isn't left anymore wallet access to node arguments.

Tree-SHA512: 90c8e3e083acbd37724f1bccf63dab642cf9ae95cc5e684872a67443ae048b4fdbf57b52ea47c5a1da6489fd277278fe2d9bbe95e17f3d4965a1a0fbdeb815bf
2022-06-18 17:19:47 +05:30
MarcoFalke
695869f0b9
Merge #16689: rpc: add missing fields to wallet rpc help output
f4c8953b0073e6bc37abd18ec4a5cbc3ea9719a1 Add missing fields in TransactionDescriptionString and others (Antoine Riard)
353010849185cda53c97da1f5089565dccf6f16a MOVEONLY : move RPC wallets helpers to TransactionDescriptionString (Antoine Riard)

Pull request description:

  Knowledge of `walletconflicts` field existence is really nice when you're debugging conflicts. Was added in #3671 but never documented in RPC helps.

  Others were added after a quick skim, we may still have missing ones in wallet rpcs.

ACKs for top commit:
  MarcoFalke:
    re-ACK f4c8953b0073e6bc37abd18ec4a5cbc3ea9719a1 (only change is addressing my nits)
  kristapsk:
    ACK f4c8953b0073e6bc37abd18ec4a5cbc3ea9719a1

Tree-SHA512: 2bea4d8743399fb152f942df7454548b896b2ad5654fd4bf60253afec1a5387ef8797ced97776dc7ba4912291263c08abe7c2b608c6a28f9a0df67be4ebc4635
2022-06-18 17:19:47 +05:30
fanquake
933c629113
Merge #15098: qt: Show addresses for "SendToSelf" transactions
11fdfcf7f940fab48625d102e825a59c16ad4fbc Show addresses for "SendToSelf" transactions (Hennadii Stepanov)

Pull request description:

  Fix #11464
  Fix #12688
  Ref: #11471 by jonasschnelli

  Note: change addresses are not recognized (ref: https://github.com/bitcoin/bitcoin/pull/11471#discussion_r180547041)

  Result:
  ![screenshot from 2019-01-04 09-06-12](https://user-images.githubusercontent.com/32963518/50677356-19c79500-1002-11e9-986c-999c366e4b2a.png)

ACKs for top commit:
  jonasschnelli:
    Tested ACK 11fdfcf7f940fab48625d102e825a59c16ad4fbc
  fanquake:
    ACK 11fdfcf7f940fab48625d102e825a59c16ad4fbc - did the bare minimum testing.

Tree-SHA512: 2678a2fdf017c376750c73fdc751b7838b0d3a970ba02e9032e4c5824494362672036c3ebf87b425aefdfe197fb952b70e4b7b6011077abb39a8bfc1ae14dfd2
2022-06-18 17:19:46 +05:30
MarcoFalke
d5986a1e8f
Merge #15932: rpc: Serialize in getblock without cs_main
faea56400d rpc: Add lock annotations to block{,header}ToJSON (MarcoFalke)
fab00a5cb9 rpc: Serialize in getblock without cs_main (MarcoFalke)
fa1c3591ad rpc: Use IsValidNumArgs in getblock (MarcoFalke)

Pull request description:

  No need to hold cs_main when serializing a struct to json

  Fixes: #15925

ACKs for commit faea56:
  jnewbery:
    utACK faea56400d5578023133cf4d1c761cdeb0c3e3da
  jonasschnelli:
    utACK faea56400d5578023133cf4d1c761cdeb0c3e3da

Tree-SHA512: 005d378cda1e6024e9f5142f99a8adbefe202cd7bfeaafee55eb909e8990a3790aa27fcf5dd16119cc9afe9dc8bd30f660de40233316781669be166bac3018e7
2022-06-18 11:37:52 +05:30
Wladimir J. van der Laan
77cf41116a Merge #17826: qt: Log Qt related info
a004673c54d4c015775e0baced21f3fa961bf754 qt: Add LogQtInfo() function (Hennadii Stepanov)

Pull request description:

  This PR adds some info to `debug.log` I found useful for testing (e.g., on Wayland) and debugging issues like #17153:

  ```
  $ ./src/qt/bitcoin-qt -printtoconsole | head -n 6
  2020-01-04T14:57:40Z [main] Bitcoin Core version v0.19.99.0-0df287f4e (release build)
  2020-01-04T14:57:40Z [main] InitParameterInteraction: parameter interaction: -externalip set -> setting -discover=0
  2020-01-04T14:57:40Z [main] Qt 5.9.5 (dynamic), plugin=xcb (dynamic)
  2020-01-04T14:57:40Z [main] System: Linux Mint 19.3, x86_64-little_endian-lp64
  2020-01-04T14:57:40Z [main] Screen: HDMI-1 1600x1200, pixel ratio=1.0
  2020-01-04T14:57:40Z [main] Assuming ancestors of block 00000000000000b7ab6ce61eb6d571003fbe5fe892da4c9b740c49a07542462d have valid signatures.
  ```

ACKs for top commit:
  laanwj:
    ACK a004673c54d4c015775e0baced21f3fa961bf754

Tree-SHA512: 496bcfd4870a2730eab92b96b3e74989a7904b21369c372b6d4368f4ca2c141e2fdc1348a1fdd18cb68bb144dcea01d3023bb782f9d030e330c187f6a5a1a082
2022-06-17 04:06:49 +07:00
fanquake
7b0ff6ce10 Merge #17857: scripts: fix symbol-check & security-check argument passing
71af793512100ee7d508c3fb815af47925fe80ba scripts: fix check-symbols & check-security argument passing (fanquake)

Pull request description:

  The first argument in `bin_PROGRAMS` (`bitcoind`) was being silently consumed and never passed into the [`security-check.py`](https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/security-check.py) or [`symbol-check.py`](https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/symbol-check.py) scripts.

  This seems to have been the case since the scripts were added to the makefile in f3d3eaf78e.

  Example of the behavior:

  ```python
  # touch a, touch b, touch c
  # python3 args.py < a b c

  import sys
  if __name__ == '__main__':
      print(sys.argv)
      # ['args.py', 'b', 'c']

      # if you add some lines to "a",
      # you'll see them here..
      for line in sys.stdin:
          print(line)
  ```

ACKs for top commit:
  laanwj:
    ACK 71af793512100ee7d508c3fb815af47925fe80ba

Tree-SHA512: 9d0b975a11f66fd87a76654d210808000a629c9cce4c760f71e8a2bcb4e99b9109419f2306db67cf9b12c28e40b96ae722b7c9b4569b2b8bacd469fb99db30c3
2022-06-17 04:06:49 +07:00
MeshCollider
6099b4bf39 Merge #13756: wallet: "avoid_reuse" wallet flag for improved privacy
5ebc6b0eb267e0552c66fffc5e5afe7df8becf80 bitcoind: update -avoidpartialspends description to account for auto-enable for avoid_reuse wallets (Karl-Johan Alm)
ada258f8c8f92d44d893cf9f22d15acdeca40b1a doc: release notes for avoid_reuse (Karl-Johan Alm)
27669551da52099e4a6a401acd7aa32b32832423 wallet: enable avoid_partial_spends by default if avoid_reuse is set (Karl-Johan Alm)
8f2e208f7c0468f9ba92bc789a698281b1c81284 test: add test for avoidreuse feature (Karl-Johan Alm)
0bdfbd34cf4015de87741ff549db35e5064f4e16 wallet/rpc: add 'avoid_reuse' option to RPC commands (Karl-Johan Alm)
f904723e0d5883309cb0dd14b826bc45c5e776fb wallet/rpc: add setwalletflag RPC and MUTABLE_WALLET_FLAGS (Karl-Johan Alm)
8247a0da3a46d7c38943ee0304343ab7465305bd wallet: enable avoid_reuse feature (Karl-Johan Alm)
eec15662fad917b169f5e3b8baaf4301dcf00a7b wallet: avoid reuse flags (Karl-Johan Alm)
58928098c299efdc7c5ddf2dc20716ca5272f21b wallet: make IsWalletFlagSet() const (Karl-Johan Alm)
129a5bafd9a3efa2fa16d780885048a06566d262 wallet: rename g_known_wallet_flags constant to KNOWN_WALLET_FLAGS (Karl-Johan Alm)

Pull request description:

  Add a new wallet flag called `avoid_reuse` which, when enabled, will keep track of when a specific destination has been spent from, and will actively "blacklist" any new UTXOs which send to an already-spent-from destination.

  This improves privacy, as a payer could otherwise begin tracking a payee's wallet by regularly peppering a known UTXO with dust outputs, which would then be scooped up and used in payments by the payee, allowing the payer to map out (1) the inputs owned by the payee and (2) the destinations to which the payee is making payments.

  This replaces #10386 and together with the (now merged) #12257 it addresses #10065 in full. The concerns raised in https://github.com/bitcoin/bitcoin/pull/10386#issuecomment-302361381 are also addressed due to #12257.

  ~~Note: this builds on top of #15780.~~ (merged)

ACKs for commit 5ebc6b:
  jnewbery:
    ACK 5ebc6b0eb
  laanwj:
    Concept and code-review ACK 5ebc6b0eb267e0552c66fffc5e5afe7df8becf80
  meshcollider:
    Code review ACK 5ebc6b0eb2
  achow101:
    ACK 5ebc6b0eb267e0552c66fffc5e5afe7df8becf80 modulo above nits

Tree-SHA512: fdef45826af544cbbb45634ac367852cc467ec87081d86d08b53ca849e588617e9a0a255b7e7bb28692d15332de58d6c3d274ac003355220e4213d7d9070742e
2022-06-17 04:06:49 +07:00
Wladimir J. van der Laan
a081afd3c1 Merge #15886: qt, wallet: Revamp SendConfirmationDialog
78f9b5160fea32f85c6ced16b3b0cccda6d3b181 Do not show list for the only recipient. (Hennadii Stepanov)
2ee756f0411c467fc638373ea68d6cb5ced46974 Show recipient list as detailedText of QMessageBox (Hennadii Stepanov)
654e419549fb5f1c360843d48e66eb098bbf5a83 Make SendConfirmationDialog fully fledged (Hennadii Stepanov)

Pull request description:

  Fix #15667

  With this PR:
  ![Screenshot from 2019-04-24 23-47-30](https://user-images.githubusercontent.com/32963518/56692672-63400b00-66eb-11e9-87f6-15957c6e81f7.png)
  ![Screenshot from 2019-04-24 23-47-40](https://user-images.githubusercontent.com/32963518/56692681-663afb80-66eb-11e9-8b04-8a342026ada6.png)

ACKs for commit 78f9b5:
  laanwj:
    code review ACK 78f9b5160fea32f85c6ced16b3b0cccda6d3b181

Tree-SHA512: f868d78d01b0898aff2277fa3a7e8c6f936acbbcfa8a0323cddcd9daba4a998030c667bd803ae67c2b9179ed8082a48a67568e9ba3c8d14e3a2d88d93ada94fa
2022-06-17 04:06:49 +07:00
fanquake
8b5b546889 Merge #17634: qt: Fix comparison function signature
98fbd1cdffaa69357091cc67e959ac21119dfa16 Use correct C++11 header for std::swap() (Hennadii Stepanov)
b66861e2e5e8a49e11e7489cf22c3007bc7082cc Fix comparison function signature (Hennadii Stepanov)

Pull request description:

  This PR fixes build on CentOS 7 with GCC 4.8.5:

  ```
  ...
  In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                   from ./serialize.h:11,
                   from ./qt/sendcoinsrecipient.h:13,
                   from ./qt/recentrequeststablemodel.h:8,
                   from qt/recentrequeststablemodel.cpp:5:
  /usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = QList<RecentRequestEntry>::iterator; _Tp = RecentRequestEntry; _Compare = RecentRequestEntryLessThan]’:
  /usr/include/c++/4.8.2/bits/stl_algo.h:2296:78:   required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = QList<RecentRequestEntry>::iterator; _Compare = RecentRequestEntryLessThan]’
  /usr/include/c++/4.8.2/bits/stl_algo.h:2337:62:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = QList<RecentRequestEntry>::iterator; _Size = int; _Compare = RecentRequestEntryLessThan]’
  /usr/include/c++/4.8.2/bits/stl_algo.h:5499:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = QList<RecentRequestEntry>::iterator; _Compare = RecentRequestEntryLessThan]’
  qt/recentrequeststablemodel.cpp:208:82:   required from here
  /usr/include/c++/4.8.2/bits/stl_algo.h:2263:35: error: no match for call to ‘(RecentRequestEntryLessThan) (RecentRequestEntry&, const RecentRequestEntry&)’
      while (__comp(*__first, __pivot))
                                     ^
  In file included from qt/recentrequeststablemodel.cpp:5:0:
  ./qt/recentrequeststablemodel.h:43:7: note: candidate is:
   class RecentRequestEntryLessThan
         ^
  qt/recentrequeststablemodel.cpp:217:6: note: bool RecentRequestEntryLessThan::operator()(RecentRequestEntry&, RecentRequestEntry&) const
   bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const
        ^
  qt/recentrequeststablemodel.cpp:217:6: note:   no known conversion for argument 2 from ‘const RecentRequestEntry’ to ‘RecentRequestEntry&’
  In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                   from ./serialize.h:11,
                   from ./qt/sendcoinsrecipient.h:13,
                   from ./qt/recentrequeststablemodel.h:8,
                   from qt/recentrequeststablemodel.cpp:5:
  /usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: error: no match for call to ‘(RecentRequestEntryLessThan) (const RecentRequestEntry&, RecentRequestEntry&)’
      while (__comp(__pivot, *__last))
                                    ^
  In file included from qt/recentrequeststablemodel.cpp:5:0:
  ./qt/recentrequeststablemodel.h:43:7: note: candidate is:
   class RecentRequestEntryLessThan
         ^
  qt/recentrequeststablemodel.cpp:217:6: note: bool RecentRequestEntryLessThan::operator()(RecentRequestEntry&, RecentRequestEntry&) const
   bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const
        ^
  qt/recentrequeststablemodel.cpp:217:6: note:   no known conversion for argument 1 from ‘const RecentRequestEntry’ to ‘RecentRequestEntry&’
    CXX      qt/qt_libbitcoinqt_a-sendcoinsentry.o
  make[2]: *** [qt/qt_libbitcoinqt_a-recentrequeststablemodel.o] Error 1
  ```

  Also for `std::swap()` header `<algorithm>` is replaced with `<utility>` one.
  Refs:
  - [`std::swap()`](https://en.cppreference.com/w/cpp/algorithm/swap)
  - [standard library header `<utility>`](https://en.cppreference.com/w/cpp/header/utility)

ACKs for top commit:
  promag:
    Code review ACK 98fbd1cdffaa69357091cc67e959ac21119dfa16.
  jonasschnelli:
    utACK 98fbd1cdffaa69357091cc67e959ac21119dfa16
  fanquake:
    ACK 98fbd1cdffaa69357091cc67e959ac21119dfa16

Tree-SHA512: 91324490c1bdb98f186d233418e7e72ae7bee507876e94fb8c038bee031cea9e1046900f21156da4b7c33abcd726796867b124c4132d9ae3759877e90a8527db
2022-06-16 01:34:38 -04:00
Wladimir J. van der Laan
6fac74113c Merge #17604: util: make ScheduleBatchPriority advisory only
d2a3a5cadbe58c0fe363bbc6acac293d41eedf7e util: make ScheduleBatchPriority advisory only (fanquake)

Pull request description:

ACKs for top commit:
  laanwj:
    ACK d2a3a5cadbe58c0fe363bbc6acac293d41eedf7e

Tree-SHA512: 14e44360bc6b0c0bfd794cb8a744af7d64fb01aa5602fdb392d6c54799a721ef04426e8379b157dd40f2a33c0b6a5248b09d59c865c453ff1f6e3abbafff524e
2022-06-16 01:34:30 -04:00
Samuel Dobson
fbb2ae50c0 Merge #17447: wallet: Make -walletdir network only
3c2c439dcd8797019ac6d6614775d5c20ee41c36 wallet: Make -walletdir network only (João Barbosa)

Pull request description:

  With this PR `bitcoind -regtest` doesn't run if bitcoin.conf has
  ```
  walletdir=/mnt/mydisk/wallets
  ```
  But works with
  ```
  [regtest]
  walletdir=/mnt/mydisk/wallets
  ```

  Doesn't change mainnet behavior.

  Closes #15630.

ACKs for top commit:
  ryanofsky:
    ACK 3c2c439dcd8797019ac6d6614775d5c20ee41c36
  MarcoFalke:
    ACK 3c2c439dcd8797019ac6d6614775d5c20ee41c36 🍈
  meshcollider:
    Tested ACK 3c2c439dcd8797019ac6d6614775d5c20ee41c36

Tree-SHA512: 8ab3b2db5f3f9cab78b36baaf490c80f7330372cfd8f73fe6536c8fb4c6e55e09f62296feb70617075838b3bcd7101abebbef3b228b6c3dbd42ce8c7a5c372d9
2022-06-16 01:34:30 -04:00
Wladimir J. van der Laan
482aa166d3 Merge #17446: gui: Changed tooltip for 'Label' & 'Message' text fields to be more clear
8944c1d340ac2be45b505ada7e187b770b0b036f Changed tooltips of receive form to highlight difference between Label and Message (dannmat)

Pull request description:

  I have changed the tooltips for 'Label' & 'Message' text fields to be more clear, stating the difference between the two (#17173)

ACKs for top commit:
  MarcoFalke:
    ACK 8944c1d340ac2be45b505ada7e187b770b0b036f
  laanwj:
    ACK 8944c1d340ac2be45b505ada7e187b770b0b036f

Tree-SHA512: 7fbea4d3c4416264ae6c146d51d29958c418a278bdd6744133db0b684ad7a9413178c005592aa21a81d127f3f3a8583fc5de00078239db08e6f101f657a5dd3a
2022-06-16 01:34:30 -04:00
PastaPastaPasta
e090d9a9e7
trivial(llmq): trivial fixes in llmq/utils.cpp (#4884)
* trivial(llmq): fix indentation

* trivial(llmq): remove unused / commented out includes

* trivial(llmq): adjust formatting

* trivial(llmq): use const

* trivial(llmq): use ranges

* trivial: fix linter
2022-06-16 00:00:43 +03:00
MarcoFalke
6e709d48c4 Merge #15770: rpc: Validate maxfeerate with AmountFromValue
aa410c2b17 rpc: Validate maxfeerate with AmountFromValue (João Barbosa)

Pull request description:

  With this change `maxfeerate` can also be set as a string, accordingly to the help test:
  ```
    maxfeerate    (numeric or string,
  ```
  Beside, there are no tests for the removed errors.

ACKs for commit aa410c:
  meshcollider:
    utACK aa410c2b17
  MarcoFalke:
    utACK aa410c2b17 Good catch

Tree-SHA512: f3bfea91dc7daa943729e270585dbf333055aeda805fbd01eaab20a7e0e6147382647c11525334382d198df0d3d45da6102b541efda5a1361f96271c98d5d89d
2022-06-14 16:48:23 +07:00
MarcoFalke
376a6a04f1 Merge #17750: util: change GetWarnings parameter to bool
7aab8d1024996c7c422bd34a8226df0117b813f7 [style] Code style fixups in GetWarnings() (John Newbery)
492c6dc1e742a62599dc6d5ba6c3896825b5144f util: change GetWarnings parameter to bool (John Newbery)
869b6314fd180856b6054fff28b5de994252c54c [qt] remove unused parameter from getWarnings() (John Newbery)

Pull request description:

  `GetWarnings()` changes the format of the output warning string based on a passed-in string argument that can be set to "gui" or "statusbar".

  Change the argument to a bool:

  - there are only two types of behaviour, so a bool is a more natural argument type
  - changing the name to `verbose` does not set any expectations for the how the calling code will use the returned string (currently, `statusbar` is used for RPC warnings, not a status bar)
  - removes some error-handling code for when the passed-in string is not one of the two strings expected.

ACKs for top commit:
  laanwj:
    code review ACK 7aab8d1024996c7c422bd34a8226df0117b813f7
  practicalswift:
    ACK 7aab8d1024996c7c422bd34a8226df0117b813f7 -- diff looks correct :)
  MarcoFalke:
    ACK 7aab8d1024996c7c422bd34a8226df0117b813f7 otherwise.
  promag:
    Code review ACK 7aab8d1024996c7c422bd34a8226df0117b813f7.

Tree-SHA512: 75882c6e3e44aa9586411b803149b36ba487f4eb9cac3f5c8f07cd9f586870bba4488a51e674cf8147f05718534f482836e6a4e3f66e0d4ef6821900c7dfd04e
2022-06-14 16:48:15 +07:00
Nathan Marley
d43f9d4ae1
fix(gov): do not allow empty proposal names (#4883)
* gov: Do not allow empty proposal names

* Add test for invalid (empty) proposal name

* Use pasta suggestion
2022-06-14 12:04:56 +03:00
UdjinM6
bcc4b2d1ac
Merge pull request #4867 from knst/bc-bp-3
Bitcoin backports #12763 #17511 #17675 #17617 #17698 #17703 #17705 #17787 #17806 #17743
2022-06-14 12:02:25 +03:00
Kittywhiskers Van Gogh
26fa69bdfd merge bitcoin#21694: Use XLIFF file to provide more context to Transifex translators 2022-06-11 21:03:04 +05:30
UdjinM6
9958ba6ea0
refactor(qt): Reuse QRImageWidget in QRDialog (#4853)
4570 follow-up (15928 backport)
2022-06-11 12:18:01 +03:00
Nathan Marley
fc794738af
trivial: Fix typo in gobject getcurrentvotes help (#4881)
This help text didn't make sense to me 'til I realized it should be `present`. I kept wondering what txid should be presenting...
2022-06-11 12:16:15 +03:00
Odysseas Gabrielides
0db7c7d709
docs(llmq): Improved documentation for keepOldConnections (#4876) 2022-06-10 23:26:02 -05:00
Munkybooty
7097171123
tests: basic functional tests for CoinJoin (#4730)
* refactor: create separate function for processing dsq messages in client.cpp

* refactor: avoid duplicate checks in CCoinJoinClientSession::ProcessMessage

* test: create tests for mixing and pending dsa requests in coinjoin_tests.cpp

* test: create tests for CTxDSIn in coinjoin_tests.cpp

* test: create tests for CoinJoinAccept in coinjoin_tests.cpp

* test: create tests for CoinJoinStatusUpdate in coinjoin_tests.cpp

* removal of check peer version

* Apply suggestions from code review

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-10 23:05:48 -05:00
UdjinM6
7fb8ae7d27
Merge pull request #4874 from UdjinM6/addrv2_followups
backport: bitcoin 20564, 20661 (addrv2 follow-ups)
2022-06-08 13:01:44 +03:00
Konstantin Akimov
25f78025f5 Fixed base58 fuzz tests, part of #17511 2022-06-08 12:36:52 +07:00
Konstantin Akimov
56a9f9b0dd Fixed fuzz build on Kubuntu 22.04 2022-06-08 12:36:52 +07:00
Wladimir J. van der Laan
a25ee06cc1 Merge #17787: scripts: add MACHO PIE check to security-check.py
7c9e821c4e6cb186208ead9c8df616d1f393a49a scripts: add MACHO NOUNDEFS check to security-check.py (fanquake)
4ca92dc6d3f3e487d63286d8871d1829b3d279ff scripts: add MACHO PIE check to security-check.py (fanquake)

Pull request description:

  This uses `otool -vh` to print the mach header and look for the `PIE` flag:
  ```bash
  otool -vh src/bitcoind
  Mach header
        magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
  MH_MAGIC_64  X86_64        ALL LIB64     EXECUTE    24       2544   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK PIE
  ```

  From [`mach-o/loader.h`](https://opensource.apple.com/source/cctools/cctools-927.0.2/include/mach-o/loader.h.auto.html):
  ```c
  #define	MH_PIE 0x200000			/* When this bit is set, the OS will
  					   load the main executable at a
  					   random address.  Only used in
  					   MH_EXECUTE filetypes. */
  ```

ACKs for top commit:
  laanwj:
    code review ACK 7c9e821c4e6cb186208ead9c8df616d1f393a49a

Tree-SHA512: 5ba2f60440d0e31c70371a355c91ca4f723d80f7287d04e2098bf5b11892cc74216ff8f1454603c4db9675d4f7983614843b992b8dcfca0309aadf2aa7ab2e4b
2022-06-08 12:36:52 +07:00