Commit Graph

27069 Commits

Author SHA1 Message Date
Samuel Dobson
ccac35c89c
Merge #21083: wallet: Avoid requesting fee rates multiple times during coin selection
f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3 Rename CoinSelectionParams::effective_fee to m_effective_feerate (Andrew Chow)
bdd0c2934b7f389ffcfae3b602ee3ecee8581acd wallet: Move discard feerate fetching to CreateTransaction (Andrew Chow)
448d04b931f86941903e855f831249ff5ec77485 wallet: Move long term feerate setting to CreateTransaction (Andrew Chow)
e2f429e6bbf7098f278c0247b954ecd3ba53cf37 wallet: Replace nFeeRateNeeded with effective_fee (Andrew Chow)
1a6a0b0dfb90f9ebd4b86d7934c6aa5594974f5f wallet: Use existing feerate instead of getting a new one (Andrew Chow)

Pull request description:

  During coin selection, there are various places where we need to have a feerate. We need the feerate for the transaction itself, the discard fee rate, and long term feerate. Fetching these each time we need them can lead to a race condition where two feerates that should be the same are actually different. One particular instance where this can happen is during the loop in `CreateTransactionInternal`. After inputs are chosen, the expected transaction fee is calculated using a newly fetched feerate. If `pick_new_inputs == false`, the loop will go again with the assumption that the fee for the transaction remains the same. However because the feerate is fetched again, it is possible that it actually isn't and this causes coin selection to fail.

  Instead of fetching the feerate each time it is needed, we fetch them all at once at the top of `CreateTransactionInternal`, store them in `CoinSelectionParams`, and use them where needed.

  While some of these fee rates probably don't need this caching, I've done it for consistency and the guarantee that they remain the same.

  Fixes #19229

ACKs for top commit:
  glozow:
    reACK f9cd2bfbcc
  fjahr:
    Code review re-ACK f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3
  Xekyo:
    tACK f9cd2bfbcc
  meshcollider:
    Code review + test run ACK f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3

Tree-SHA512: be83ff64ba473c3cdd3469c812e214659b6e2a9584c22ed2b1595618fce0d4b35d0901e61068cd1069fc1a8fb911db01dd7312d05c3b8cbafbe2504ab7a3e863
2024-09-23 02:13:14 +07:00
Samuel Dobson
9e9975f83b
Merge #21201: rpc: Disallow sendtoaddress and sendmany when private keys disabled
6bfbc97d716faad38c87603ac6049d222236d623 test: disallow sendtoaddress/sendmany when private keys disabled (Jon Atack)
0997019e7681efb00847a7246c15ac8f235128d8 Disallow sendtoaddress and sendmany when private keys disabled (Andrew Chow)

Pull request description:

  Since `sendtoaddress` and `sendmany` (which use the `SendMoney` function) create and commit a transaction, they should not do anything when the wallet does not have private keys. Otherwise a valid transaction cannot be made.

  Fixes #21104

ACKs for top commit:
  jonatack:
    ACK 6bfbc97d716faad38c87603ac6049d222236d623
  meshcollider:
    utACK 6bfbc97d716faad38c87603ac6049d222236d623
  kristapsk:
    ACK 6bfbc97d716faad38c87603ac6049d222236d623. "Error: Private keys are disabled for this wallet" is definitely a better error message than "Insufficient funds" here. Hopefully change of error code from -6 to -4 doesn't break any software using Bitcoin JSON-RPC API.

Tree-SHA512: f277d6b5252e43942d568614032596f2c0827f00cd0cb71e44ffcb9822bfb15a71730a3e3688f31e59ba4eb7d275250c4e65ad4b6b3e96be6314c56a672432fb
2024-09-23 02:13:14 +07:00
MarcoFalke
5ad8a489a5
Merge #20573: wallet, bugfix: allow send with string fee_rate amounts
6fa72ceb8021c3b5aea62f6cfe92665c29212923 test: add coverage for passing fee rate as a string (Jon Atack)
ce207d6b93d35bc02fcd2dd28f1fd95869261d43 wallet, bugfix: allow send to take string fee rate values (Jon Atack)

Pull request description:

  RPC send currently only accepts fee rates as numbers, which is a user-facing bug. It should accept fee rates as an amount, e.g. a string or a number, as documented in its help and like sendtoaddress, sendmany, fundrawtransaction, walletcreatefundedpsbt, and bumpfee. Provide a fix and regression test coverage.

ACKs for top commit:
  MarcoFalke:
    review ACK 6fa72ceb8021c3b5aea62f6cfe92665c29212923
  achow101:
    Code review ACK 6fa72ceb8021c3b5aea62f6cfe92665c29212923
  promag:
    Code review ACK 6fa72ceb8021c3b5aea62f6cfe92665c29212923.

Tree-SHA512: 735f9269cb1b81953764b5283449c0b154bd62de034225be5bcedc515c84faf767fe8fe0741008679fe412922c847b00d116cb11aab775236b779c847ba87167
2024-09-23 02:13:14 +07:00
MarcoFalke
db4a2169bb
Merge #20410: wallet: Do not treat default constructed types as None-type
fa69c2c78455fd0dc436018fece9ff7fc83a180d wallet: Do not treat default constructed types as None-type (MarcoFalke)
fac4e136fa3d0fab7fde900a6be921313e16e7a6 refactor: Change pointer to reference because it can not be null (MarcoFalke)

Pull request description:

  Equating `0==None` and `""==None` is confusing, unneeded and undocumented

ACKs for top commit:
  jonatack:
    ACK fa69c2c78455fd0dc436018fece9ff7fc83a180d
  achow101:
    ACK fa69c2c78455fd0dc436018fece9ff7fc83a180d
  Sjors:
    tACK fa69c2c78455fd0dc436018fece9ff7fc83a180d modulo `unset`

Tree-SHA512: c4c8d0ad80c6697621d356a9545caf28ca2facc82bb2fa8e70eceb52372d25f0685237c73688c4b01da0e75d213c77c0d45011a8bdfe81ea783d85f045786dac
2024-09-23 02:13:14 +07:00
MarcoFalke
01e41aa1fb
Merge #20426: wallet: allow zero-fee fundrawtransaction/walletcreatefundedpsbt and other fixes
9f08780dd7946b63476e9736745131db8e7f4e93 Use the correct incremental fee constant in bumpfee help (Jon Atack)
3f1e10b2b1cd11f7112fbad6355464bd4adbbc5c Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfee (Jon Atack)
1b3d7009280595108eb22ac1188bc4367804fc5d Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls (Jon Atack)

Pull request description:

  - Fixes https://github.com/bitcoin/bitcoin/pull/20305/files#r525406176. A check to raise an error on zero-fee txns was mistakenly extended in a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include fundrawtransaction and walletcreatefundedpsbt. This commit re-overrides zero fee rate checking for these two RPCs, not only for the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new fee_rate (sat/vB) arg. Negative fee rates will still raise "amount out of range" by the MoneyRange check in src/bitcoin-tx.cpp::AmountFromValue.

  - Updates a wallet bumpfee test from feeRate (BTC/kvB) to fee_rate (sat/vB)

  - Fixes https://github.com/bitcoin/bitcoin/pull/20305/files#r525405363 to use the correct incremental fee rate constant in the bumpfee help  (thanks Marco Falke for the catch) and rectifies "1.000 sat/vB sat/vB" in the help to "1.000 sat/vB"

ACKs for top commit:
  MarcoFalke:
    review ACK 9f08780dd7946b63476e9736745131db8e7f4e93  🐾
  promag:
    Code review ACK 9f08780dd7946b63476e9736745131db8e7f4e93.
  Xekyo:
    Code review reACK 9f08780dd7946b63476e9736745131db8e7f4e93.

Tree-SHA512: 413dfb4f23ebaf3d2ef210dd04610a843272e64eabba428699f5de4d646a86ac4911dab66b5e2f5ebea53b76e4be8347ef40824c1592c750d5eaa12579d3cdf6
2024-09-23 02:13:14 +07:00
MarcoFalke
f436c20bc4
Merge #20305: wallet: introduce fee_rate sat/vB param/option
05e82d86b09d914ebce05dbc92a7299cb026847b wallet: override minfee checks (fOverrideFeeRate) for fee_rate (Jon Atack)
9a670b4f07a6140de809d73cbd7f3e614eb6ea74 wallet: update sendtoaddress, send RPC examples with fee_rate (Jon Atack)
be481b72e24fb6834bd674cd8daee67c6938b42d wallet: use MIN_RELAY_TX_FEE in bumpfee help (Jon Atack)
449b730579566459e350703611629e63e54657ed wallet: provide valid values if invalid estimate mode passed (Jon Atack)
6da3afbaee5809ebf6d88efaa3958c505c2d71c7 wallet: update remaining rpcwallet fee rate units to BTC/kvB (Jon Atack)
173b5b5fe07d45be5a1e5bc7a5df996f20ab1e85 wallet: update fee rate units, use sat/vB for fee_rate error messages (Jon Atack)
7f9835a05abf3e168ad93e7195cbaa4bf61b9b07 wallet: remove fee rates from conf_target helps (Jon Atack)
b7994c01e9a3251536fe6538a22f614774eec82d wallet: add fee_rate unit warnings to bumpfee (Jon Atack)
410e471fa42d3db04e8879c71f8c824dcc151a83 wallet: remove redundant bumpfee fee_rate checks (Jon Atack)
a0d495747320c79b27a83c216dcc526ac8df8f24 wallet: introduce fee_rate (sat/vB) param/option (Jon Atack)
e21212f01b7c41eba13b0479b252053cf482bc1f wallet: remove unneeded WALLET_BTC_KB_TO_SAT_B constant (Jon Atack)
6112cf20d43b0be34fe0edce2ac3e6b27cae1bbe wallet: add CFeeRate ctor doxygen documentation (Jon Atack)
3f7279161347543ce4e997d78ea89a4043491145 wallet: fix bug in RPC send options (Jon Atack)

Pull request description:

  This PR builds on #11413 and #20220 to address #19543.

  - replace overloading the conf_target and estimate_mode params with `fee_rate` in sat/vB in the sendtoaddress, sendmany, send, fundrawtransaction, walletcreatefundedpsbt, and bumpfee RPCs

  - allow non-actionable conf_target value of `0` and estimate_mode value of `""` to be passed to use `fee_rate` as a positional argument, in addition to as a named argument

  - fix a bug in the experimental send RPC described in https://github.com/bitcoin/bitcoin/pull/20220#discussion_r513789526 where args were not being passed correctly into the options values

  - update the feerate error message units for these RPCs from BTC/kB to sat/vB

  - update the test coverage, help docs, doxygen docs, and some of the RPC examples

  - other changes to address the excellent review feedback

  See this wallet meeting log for more context: http://www.erisian.com.au/bitcoin-core-dev/log-2020-11-06.html#l-309

ACKs for top commit:
  achow101:
    re-ACK 05e82d8
  MarcoFalke:
    review ACK 05e82d86b0 did not test and found a few style nits, which can be fixed later 🍯
  Xekyo:
    tACK 05e82d86b09d914ebce05dbc92a7299cb026847b
  Sjors:
    utACK 05e82d86b09d914ebce05dbc92a7299cb026847b

Tree-SHA512: a4ee5f184ada53f1840b2923d25873bda88c5a2ae48e67eeea2417a0b35154798cfdb3c147b05dd56bd6608a784e1b91623bb985ee2ab9ef2baaec22206d0a9c
2024-09-23 02:13:14 +07:00
Samuel Dobson
0fa19226cb
Merge #20220: wallet, rpc: explicit fee rate follow-ups/fixes for 0.21
0be29000c011dec0722481dbebb159873da6fa54 rpc: update conf_target helps for correctness/consistency (Jon Atack)
778b9be40667876c705e586849ea9c9e44cf451c wallet, rpc: fix send subtract_fee_from_outputs help (Jon Atack)
603c0050837ec65765208dd54dde354145fbe098 wallet: add rpc send explicit fee rate coverage (Jon Atack)
dd341e602d5160fc621c0299179b91403756b61d wallet: add sendtoaddress/sendmany explicit fee rate coverage (Jon Atack)
44e7bfa60313e4ae67da49e5ba4535038b71b453 wallet: add walletcreatefundedpsbt explicit fee rate coverage (Jon Atack)
6e1ea4273e52fdcd86c87628aa595c03a071ca8c test: refactor for walletcreatefundedpsbt fee rate coverage (Jon Atack)
3ac7b0c6f1c68e74a84d868a454f508bada6b09d wallet: fundrawtx fee rate coverage, fixup ParseConfirmTarget() (Jon Atack)
2d8eba8f8425a2515022d51f1f5b4911329fbf55 wallet: combine redundant bumpfee invalid params and args tests (Jon Atack)
1697a40b6f841a54ee0d9744ed7fd09034b0ddad wallet: improve bumpfee error/help, add explicit fee rate coverage (Jon Atack)
fc5721723d34f76f9e1ffd2e31f274ea6b22f894 wallet: fix SetFeeEstimateMode() error message (Jon Atack)
052427eef1c9da84c474c5161b1910d3328ef0da wallet, bugfix: fix bumpfee with explicit fee rate modes (Jon Atack)

Pull request description:

  Follow-up to #11413 providing a base to build on for #19543:

  - bugfix for `bumpfee` raising a JSON error with explicit feerates, fixes issue #20219
  - adds explicit feerate test coverage for `bumpfee`, `fundrawtransaction`, `walletcreatefundedpsbt`, `send`, `sendtoaddress`, and `sendmany`
  - improves a few related RPC error messages and `ParseConfirmTarget()` / error message
  - fixes/improves the explicit fee rate information in the 6 RPC helps, of which 2 were also missing `conf_target` sat/B units

  This provides a spec and regression coverage for the potential next step of a universal `sat/vB` feerate argument (see #19543), as well as immediate coverage and minimum fixes for 0.21.

ACKs for top commit:
  kallewoof:
    Concept/Tested ACK 0be29000c011dec0722481dbebb159873da6fa54
  meshcollider:
    Code review + functional test run ACK 0be29000c011dec0722481dbebb159873da6fa54

Tree-SHA512: efd965003e991cba51d4504e2940f06ab3d742e34022e96a673606b44fad85596aa03a8c1809f06df7ebcf21a38e18a891e54392fe3d6fb4d120bbe4ea0cf5e0
2024-09-23 02:01:40 +07:00
MarcoFalke
d530b73016
Merge #18275: wallet: error if an explicit fee rate was given but the needed fee rate differed
44cc75f80ee7805a117e9298a182af1a44bcbff4 wallet: error if an explicit fee rate was given but the needed fee rate differed (Karl-Johan Alm)

Pull request description:

  This ensures that the code doesn't silently ignore too low fee reates. It will now trigger an error in the QT client, if the user provides a fee rate below the minimum, and becomes a necessary check for #11413.

ACKs for top commit:
  Sjors:
    utACK 44cc75f80ee7805a117e9298a182af1a44bcbff4 (rebased)
  fjahr:
    re-ACK 44cc75f80ee7805a117e9298a182af1a44bcbff4

Tree-SHA512: cd5a60ee496e64f7ab37aaa53f7748a7393357b1629ccd9660839d366c6191b6413b871ce3aa7293fce1539336222c300ef6f86304f30a1ae8fe361b02310483
2024-09-23 02:01:40 +07:00
Hennadii Stepanov
1a12ef14da
(partial)Merge bitcoin-core/gui#420: Ensure translator comments end in full stop
5cc783f5f32ffd550d1b298fc2e9cf6c0439f9fe qt: ensure translator comments end in full stop (Jarol Rodriguez)

Pull request description:

  This is a follow-up to #318 which addresses this [nit](https://github.com/bitcoin-core/gui/pull/318#discussion_r706856893) by addressing it globally.

  This ensures that all GUI translator comments end in a full stop. If a comment does not end in a full stop, a translator may think  that the rest of the comment is being cut off.

  While here, add a colon to the word "see" for any comments touched which point to look at a link.

ACKs for top commit:
  hebasto:
    ACK 5cc783f5f32ffd550d1b298fc2e9cf6c0439f9fe, I have reviewed the code and it looks OK, I agree it can be merged.
  shaavan:
    Code Review ACK 5cc783f5f32ffd550d1b298fc2e9cf6c0439f9fe

Tree-SHA512: 67a1d56175c974e0af9b460fa44163f7ce139a7b81cfaf8ed2c0e7fb6d5120957c3135d96010aeb6229689468e36673fe9571b5a8c3e1c07e047aba1bd563444
2024-09-21 18:35:22 +05:30
MarcoFalke
073d6d6b2a
Merge bitcoin/bitcoin#23723: test: Replace hashlib.new with named constructor
fa1b63c01887adff83f16b1bbba3bd159dc51104 test: Replace hashlib.new with named constructor (MarcoFalke)

Pull request description:

  A small refactor that doesn't matter too much, but it using the named constructor is nice because:
  * It clarifies that it is a built-in function
  * It is (trivially) faster and less code.

ACKs for top commit:
  Zero-1729:
    ACK fa1b63c01887adff83f16b1bbba3bd159dc51104
  w0xlt:
    ACK fa1b63c

Tree-SHA512: d23dc4552c1e6fc1f90f8272e47e4efcbe727f0b66a6f6a264db8a50ee6cb6d57a2809befcb95fda6725136672268633817a03dd1859f2298d20e3f9e0ca4a7f
2024-09-21 18:32:53 +05:30
MarcoFalke
674dcf9a55
Merge bitcoin/bitcoin#23547: Bugfix: RPC/mining: Fail properly in estimatesmartfee if smart fee data is unavailable
cd8d156354ed32a215de5eab5c394a1d74d91ed4 Bugfix: RPC/mining: Fail properly in estimatesmartfee if smart fee data is unavailable (Luke Dashjr)

Pull request description:

  Fixes a regression introduced by #22722

  (Not entirely sure on the solution)

ACKs for top commit:
  prayank23:
    crACK cd8d156354
  darosior:
    utACK cd8d156354ed32a215de5eab5c394a1d74d91ed4
  kristapsk:
    utACK cd8d156354ed32a215de5eab5c394a1d74d91ed4

Tree-SHA512: eb4aa3cc345c69c44ffd5733b51b90eefe1d7854b7a2855e8cbb98268db24d43b7d0ae9fbb0eccf9b6dc01da644d19433cc77fec52ff67bf890be1fc53a67fc4
2024-09-21 18:32:53 +05:30
Kittywhiskers Van Gogh
ee4115e734
revert: Only sync mempool from v0.15+ (proto 70216+) nodes
commits reverted:
- e3120ebc3d

Nodes running at 0.15 wouldn't be compatible with the current network,
safe to assume anything below 0.15 wouldn't be either.
2024-09-20 12:35:06 +00:00
Kittywhiskers Van Gogh
4e621037c5
test: move EXPECTED_STDERR_NO_GOV{_PRUNE} and use it more 2024-09-20 12:29:02 +00:00
Kittywhiskers Van Gogh
77ce6af5c1
chore: remove ancient setting migration logic
This code in its original form was first introduced in 0.12 (bbbbdd81)
and in its current form 0.17 (ae506bae6) and has survived rebrandings.
Time to retire it.
2024-09-20 12:29:02 +00:00
Kittywhiskers Van Gogh
061aa05cf0
chore: remove old llmq db migration code
The migration code was introduced as part of dash#4141 in v0.18. We've
had a few major version releases since.
2024-09-20 12:29:02 +00:00
Kittywhiskers Van Gogh
63b13aa519
merge bitcoin#28525: Drop v2 garbage authentication packet 2024-09-20 12:24:23 +00:00
Kittywhiskers Van Gogh
662394cd49
merge bitcoin#28489: fix incorrect assumption in v2transport_test 2024-09-20 12:24:23 +00:00
Kittywhiskers Van Gogh
98782c62df
merge bitcoin#28433: Follow-up to BIP324 connection support 2024-09-20 12:24:22 +00:00
Kittywhiskers Van Gogh
f9825168fb
merge bitcoin#28196: BIP324 connection support 2024-09-20 12:24:22 +00:00
Kittywhiskers Van Gogh
3087275039
merge bitcoin#28419: introduce and use ConsumePrivateKey helper 2024-09-20 12:24:22 +00:00
Kittywhiskers Van Gogh
dccd395a4e
merge bitcoin#27577: give seednodes time before falling back to fixed seeds 2024-09-20 12:24:22 +00:00
Kittywhiskers Van Gogh
eb4f01f931
merge bitcoin#26584: include local ("unreachable") peers in -netinfo table 2024-09-20 12:24:22 +00:00
Kittywhiskers Van Gogh
10dc874136
merge bitcoin#26982: bitcoin#25880 fixups 2024-09-20 12:24:22 +00:00
Kittywhiskers Van Gogh
a36f8f2a1a
merge bitcoin#25880: Make stalling timeout adaptive during IBD
We need to disable mocktime so that the node doesn't resort to direct
fetching. We also need to delay DIP3's activation so that blocks don't
get rejected for not having a valid DIP3-compliant coinbase.
2024-09-20 12:24:22 +00:00
Kittywhiskers Van Gogh
1d77f3ff55
merge bitcoin#26519: Add getpeerinfo test for missing version message
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2024-09-20 12:24:22 +00:00
pasta
89a7c60aec
Merge #6277: chore: add builder key for kittywhiskers
315fcea834 chore: add builder key for kittywhiskers (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  Key ID `30CD 0C06 5E5C 4AAD`. Same key registered with Keybase ([source](https://keybase.io/kittywhiskers/pgp_keys.asc?fingerprint=969187a8e74fe40a8a48067430cd0c065e5c4aad)) and used to sign commits on GitHub. PGP key named after Keybase username.

ACKs for top commit:
  UdjinM6:
    utACK 315fcea834
  knst:
    ACK 315fcea834
  PastaPastaPasta:
    utACK 315fcea834

Tree-SHA512: f566c514831cfaf0a8bf95ebfb8aa5629474bdf0b88fd8948d4c1d3f1340ccdd3a9c67c817bd08d2f4d2e477b1599bf4fd148ad50fe68357d24feba651d832f7
2024-09-18 11:27:43 -05:00
UdjinM6
ad35c1ab2f
apply suggestions 2024-09-18 18:26:22 +03:00
UdjinM6
600dcf3dda
refactor: make clang-format happy 2024-09-18 18:26:22 +03:00
UdjinM6
da9b8e038b
feat: Split quorum contribution db out of evodb 2024-09-18 18:26:19 +03:00
Konstantin Akimov
f44edde8fe
tests: use only 2 MN and 2 Evo nodes in feature_asset_locks.py to be sure that is enough 2024-09-18 18:57:39 +07:00
Konstantin Akimov
8286bdf611
fix: assert in signing_shares - amount of members can match with amount of attempts
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2024-09-18 18:57:35 +07:00
Kittywhiskers Van Gogh
438cb85ece
ci: set UBSan to halt on error and provide more information 2024-09-18 07:38:49 +00:00
Kittywhiskers Van Gogh
3a1743fc7f
trivial: avoid unneeded copy when iterating through mapDenomCount
Caught by Clang 14 with `--enable-werror`
2024-09-18 07:38:49 +00:00
Kittywhiskers Van Gogh
cba650953a
test: simplify pow_test's get_next_work block index construction
Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
2024-09-18 07:38:48 +00:00
Kittywhiskers Van Gogh
315fcea834
chore: add builder key for kittywhiskers 2024-09-17 16:25:14 +00:00
pasta
d754799580
Merge #6270: fix: remove mn_rr fork usage from functional test of EHF
056d869571 refactor: use testdummy in feature_mnehf functional test, removed useless checks (Konstantin Akimov)
0351469bb5 refactor: removed duplicated meaningless condition from Check mnhftx (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Using mn_rr in feature_mnehf.py is a blocker for burying mn_rr fork.

  ## What was done?
  Removed useless conditions, uses testdummy fork instead mn_rr in ehf functional test.

  ## How Has This Been Tested?
  Run it `test/functional/feature_mnehf.py`

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK 056d869571
  PastaPastaPasta:
    utACK 056d869571

Tree-SHA512: aa016dc21fee3afdb5a4172e757cdd0b92867c23eb5241287f641d3c97d363ab1c46eba06423481ecc7ba05f6c0010b65eadfe77d4a1fd6074706cc6f3a71309
2024-09-16 21:44:08 -05:00
pasta
05740e8264
Merge #6271: feat: simplify and speedup feature_governance.py test by generating less blocks
42dffe8541 chore: improve logging of functional tests feature_governance.py (Konstantin Akimov)
922b796800 feat: simplify and speedup feature_governance.py test by generating less blocks (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Too many blocks are generated in a functional tests `feature_governance.py`

  ## What was done?
  1. Activate v20 faster for `feature_governance.py`, drop generation of useless blocks, simplify code.

  2. Added extra logging for this test by converting comments to logs.

  ## How Has This Been Tested?
  Run `test/functional/feature_governance.py`
  Locally improvement of performance is less than 5 seconds.
  `tsan` jobs on CI:
  ```
  204/264 - feature_governance.py --legacy-wallet passed, Duration: 243 s
  208/264 - feature_governance.py --descriptors passed, Duration: 270 s
  ```
  ↑ [old version](https://gitlab.com/dashpay/dash/-/jobs/7805625816) vs [new version](https://gitlab.com/dashpay/dash/-/jobs/7819897536) ↓:
  ```
  193/264 - feature_governance.py --legacy-wallet passed, Duration: 220 s
  199/264 - feature_governance.py --descriptors passed, Duration: 240 s
  ```

  Most of the time is spent in `feature_governance.py` on stage "let all fulfilled requests expire for re-sync to work correctly" so that's a very minor optimization.

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK 42dffe8541
  PastaPastaPasta:
    utACK 42dffe8541

Tree-SHA512: 9257301043efca8b3775fff64e598b153e00bc48779212e6237ab63f06a043a66764d72e38d9e6071b82477e55884b9bce410f4d3fabeb13da631505113e86bc
2024-09-16 21:25:34 -05:00
pasta
ca4b9eaad1
Merge #6255: backport: merge bitcoin#24531, #25500, #25814, #25962, #26888, #27264, #27257, #27324, #27374, #27467, #27411, partial bitcoin#25472 (networking backports: part 8)
8320e0ca8e merge bitcoin#27411: Restrict self-advertisements with privacy networks to avoid fingerprinting (Kittywhiskers Van Gogh)
1376289b11 merge bitcoin#27467: skip netgroup diversity follow-up (Kittywhiskers Van Gogh)
a52b3a3bf0 merge bitcoin#27374: skip netgroup diversity of new connections for tor/i2p/cjdns (Kittywhiskers Van Gogh)
ab11e0f998 merge bitcoin#27324: bitcoin#27257 follow-ups (Kittywhiskers Van Gogh)
9023dd25af merge bitcoin#27257: End friendship of CNode, CConnman and ConnmanTestMsg (Kittywhiskers Van Gogh)
3465df2689 merge bitcoin#27264: Improve diversification of new connections (Kittywhiskers Van Gogh)
d3f5b3881b merge bitcoin#26888: simplify the call to vProcessMsg.splice() (Kittywhiskers Van Gogh)
d9e56f3e78 merge bitcoin#25962: Add CNodeOptions and increase constness (Kittywhiskers Van Gogh)
79e67fd96a merge bitcoin#25814: simplify GetLocalAddress() (Kittywhiskers Van Gogh)
6d4945418a partial bitcoin#25472: Increase MS Visual Studio minimum version (Kittywhiskers Van Gogh)
54bb3a438f merge bitcoin#25500: Move inbound eviction logic to its own translation unit (Kittywhiskers Van Gogh)
b50febc0f0 merge bitcoin#24531: Use designated initializers (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on https://github.com/dashpay/dash/pull/6254
  * When backporting [bitcoin#27411](https://github.com/bitcoin/bitcoin/pull/27411), the `CNetAddr*` variant of `GetLocal()` was not removed (upstream it was replaced by the `CNode&` variant with additional checks that rely on fields in `CNode`) as `CActiveMasternodeManager` relies on `GetLocal()` to detect a valid external address.
    * While it can also rely on other nodes to determine that, removing code that tests against a well-known public address would increase the number of reported failures esp. if the checks are run _before_ the node has a chance to connect to any peers.

  ## Breaking Changes

  None observed.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 8320e0ca8e
  PastaPastaPasta:
    utACK 8320e0ca8e

Tree-SHA512: 1d02bc33c8d62c392960d4dd044edf3de08515a5e8c8794d95cd95e9654da91b20e7290436cf9c79b0ea8dbd42b27dcc61c8eb17e573902574d7b281b8874584
2024-09-16 12:01:08 -05:00
pasta
d290df38ed
Merge #6273: backport: merge bitcoin#27015 (resolve flaky addrman unit test)
925870d7d0 merge bitcoin#27015: bitcoin#26847 fixups (AddrMan totals) (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  As part of [dash#6254](https://github.com/dashpay/dash/pull/6254), [bitcoin#26847](https://github.com/bitcoin/bitcoin/pull/26847) was backported and since then, it was observed that unit tests were flakier than expected ([build](https://gitlab.com/dashpay/dash/-/jobs/7811041841), [build](https://gitlab.com/dashpay/dash/-/jobs/7802460298)).

  The flakiness was caused by behavior introduced by the aforementioned backport, this was resolved upstream with [bitcoin#27015](https://github.com/bitcoin/bitcoin/pull/27015), which this pull request contains.

  ## Breaking Changes

  None observed.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 925870d7d0
  knst:
    ACK 925870d7d0

Tree-SHA512: 20fc8fb1b162803a71ec4087685460f52ed56c3c86d46ecac4cc0ef59c95b4b6206f0c53bef256242a4a5babb76e3564cfba56a84cbe844e187035de2308b818
2024-09-14 22:58:08 -05:00
fanquake
546e548755
Merge bitcoin/bitcoin#24153: test: remove unused sanitizer suppressions
fa3bdbd37be81b613e48a10aa77dfd3bcede61e1 test: remove unused sanitizer suppressions (MarcoFalke)

Pull request description:

  Looks like those are not needed (anymore)

ACKs for top commit:
  fanquake:
    ACK fa3bdbd37be81b613e48a10aa77dfd3bcede61e1

Tree-SHA512: 4bedb6363aba8ea7763291ee0cd074e6bfd77e691bb32999c3959393864dc396bacba1eced2b10d9d600b66e8b83b91f7bc6692331dbd113bbaa87e72d11e2e8
2024-09-14 20:24:02 +05:30
W. J. van der Laan
78b06a4dd2
Merge bitcoin/bitcoin#23591: refactor: Use underlying type of isminetype for isminefilter
fa2c991ec93bc72d276f0dcd747b3e57c246139b refactor: Use underlying type of isminetype for isminefilter (MarcoFalke)

Pull request description:

  This does not change behavior, but it would be good for code clarity and to avoid `-Wimplicit-int-conversion` compiler warnings to use the an int of the same width for both `isminetype` and `isminefilter`.

ACKs for top commit:
  laanwj:
    Code review ACK fa2c991ec93bc72d276f0dcd747b3e57c246139b
  shaavan:
    crACK fa2c991ec93bc72d276f0dcd747b3e57c246139b
  promag:
    Code review ACK fa2c991ec93bc72d276f0dcd747b3e57c246139b.

Tree-SHA512: b3e255de7c9b1dea272bc8cb9386b339fe701f18580e03e997c270cac6453088ca2032e26e39f536d66cd1b6fda3e96bdbdc6e960879030e635338d0916277e6
2024-09-14 20:23:47 +05:30
Konstantin Akimov
056d869571
refactor: use testdummy in feature_mnehf functional test, removed useless checks 2024-09-14 12:08:26 +07:00
Kittywhiskers Van Gogh
8320e0ca8e
merge bitcoin#27411: Restrict self-advertisements with privacy networks to avoid fingerprinting
The old `GetLocal()` has been moved to `masternode/node.cpp` due to its
use in determining a node's external address. We don't want the old
variant to be used otherwise so we'll move it out of `net.{cpp,h}` for
good measure.

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2024-09-13 17:04:45 +00:00
Kittywhiskers Van Gogh
925870d7d0
merge bitcoin#27015: bitcoin#26847 fixups (AddrMan totals) 2024-09-13 16:57:54 +00:00
Kittywhiskers Van Gogh
dacf859218
refactor: make pdsNotificationInterface a unique_ptr, rename 2024-09-13 13:06:22 +00:00
Konstantin Akimov
42dffe8541
chore: improve logging of functional tests feature_governance.py
The comments are converted to logs for better understanding of progress
2024-09-13 16:07:49 +07:00
Konstantin Akimov
0351469bb5
refactor: removed duplicated meaningless condition from Check mnhftx 2024-09-13 15:51:58 +07:00
Konstantin Akimov
922b796800
feat: simplify and speedup feature_governance.py test by generating less blocks 2024-09-13 15:50:58 +07:00
Kittywhiskers Van Gogh
1376289b11
merge bitcoin#27467: skip netgroup diversity follow-up 2024-09-13 08:14:34 +00:00
Kittywhiskers Van Gogh
a52b3a3bf0
merge bitcoin#27374: skip netgroup diversity of new connections for tor/i2p/cjdns 2024-09-13 08:14:33 +00:00