Commit Graph

27034 Commits

Author SHA1 Message Date
Konstantin Akimov
fe49f3f178
refactor: removed dead and commented code from test_framework.py 2024-09-24 01:24:50 +07:00
Konstantin Akimov
cd1958c82a
perf: removed sleep(6) from mine_cycle_quorum in functional tests 2024-09-24 01:24:49 +07:00
Konstantin Akimov
3f17a01a83
fix: bump mocktime in simplepose when generating blocks to improve robustness 2024-09-24 01:24:49 +07:00
Konstantin Akimov
132d95e651
perf: remove sleep(1) from each step of quorum creation in functional tests 2024-09-24 01:24:49 +07:00
Konstantin Akimov
4c57ad1c05
chore: increase batch size from 10 to 50 for faster block generation in functional tests
It significantly improve speed of forks activation because reduces overhead for block generations
Bigger batch size can cause time-outs for RPC for tsan job (time-out is 30 seconds)
2024-09-24 01:24:47 +07:00
Konstantin Akimov
d361b11e5b
refactor: moved including llmq/dkgsession.h from dkgsessionmgr.h to cpp file 2024-09-24 01:07:36 +07:00
Konstantin Akimov
e77aeb321b
refactor: removed including quorums.h from chainlocks.h 2024-09-24 01:07:36 +07:00
Konstantin Akimov
6f7068ef42
refactor: remove exceeding evodb.h from headers 2024-09-24 01:07:32 +07:00
pasta
a9a2d4adbe
Merge #6263: backport: Merge bitcoin/bitcoin#23064
3c51f3ab1e Merge bitcoin/bitcoin#23064: fuzz: Fix memory leak in system fuzz target (MarcoFalke)

Pull request description:

  Backports

ACKs for top commit:
  UdjinM6:
    utACK 3c51f3ab1e
  knst:
    utACK 3c51f3ab1e

Tree-SHA512: 1dc54750d0d897f272e65a25f25cd83ed21b9df02313a933286d0651c4e73c0c1c84aba643e81d33097746bde38a028c1c524f973c0f973c1555ede31f176cba
2024-09-23 12:12:05 -05:00
pasta
312134e39e
Merge #6239: feat: increase the number of block headers able to be downloaded at once to 8000 in protocol version 70235
48c7f98b1a doc: drop trailing whitespace (pasta)
697743d77b test: add missing import (UdjinM6)
cfe99fd289 docs: add release notes for 6239 (pasta)
a6bbaacfaa fix: GetHeadersLimit is used for getheaders(2) and headers(2), refactor it to accept `compressed` instead of `msg_type` (UdjinM6)
b224f3f6ca bump p2p_version in tests (PastaPastaPasta)
b423f42aae refactor: sort imports (UdjinM6)
f6c68ba71b refactor: simplify _compute_requested_block_headers (UdjinM6)
07876b2c4a use `MAX_HEADERS_UNCOMPRESSED_RESULT` not `MAX_HEADERS_UNCOMPRESSED_RESULTS` ; use `MAX_HEADERS_UNCOMPRESSED_RESULT` in RPC to avoid breaking changes (pasta)
b137280df4 change to _COMPRESSED or _UNCOMPRESSED (pasta)
303bc7af99 fix: increase it for headers2 only (UdjinM6)
e23410ffdd trivial: rename `MAX_HEADERS_RESULTS_NEW` to `MAX_HEADERS_RESULTS` (Kittywhiskers Van Gogh)
bcf0320691 trivial: move the headers limit determination to `GetHeadersLimit()` (Kittywhiskers Van Gogh)
993c7c0f90 feat: increase the number of block headers able to be downloaded at once to 8000 in protocol version `70234` (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  We did some testing quite a while ago that found that sending 8000 headers at a time could speed stuff up. But we wanted to wait until compressed headers were implemented. Well, they've been implemented!

  ## What was done?
  Bump 2000 -> 8000 triggered by protocol version

  ## How Has This Been Tested?
  Hasn't, we should setup a few nodes running this and sync them from each other

  ## Breaking Changes
  New protocol version, not breaking but should add notes? I should probably add release notes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] 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 _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    light ACK 48c7f98b1a
  knst:
    utACK 48c7f98b1a

Tree-SHA512: 54c68b9496131ab7f32504d44398d776a151df809d0120d093bbabb18904a783bd9b58796820209f5d75552df5476e30eaa09d68f7c5057882f94b5766a64f4c
2024-09-23 11:50:26 -05:00
pasta
2b92b3e29e
Merge #6261: fix: assert in signing_shares for quorums with 3 members but 2 nodes only
f44edde8fe tests: use only 2 MN and 2 Evo nodes in feature_asset_locks.py to be sure that is enough (Konstantin Akimov)
8286bdf611 fix: assert in signing_shares - amount of members can match with amount of attempts (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Currently we have several quorums which have size 3 with threshold 2 nodes: `llmq_test_instantsend`, `llmq_test_platform`, `llmq_test` and they are used on RegTest.

  For extreme case when only 2 nodes exist the assert happens:

  ```
    AssertionError: Unexpected stderr dashd: llmq/signing_shares.cpp:812: static CDeterministicMNCPtr llmq::CSigSharesManager::SelectMemberForRecovery(const llmq::CQuorumCPtr&, const uint256&, size_t): Assertion `size_t(attempt) < quorum->members.size()' failed.
    Posix Signal: Aborted
       0#: (0x5BF40CE70DA2) stl_vector.h:115       - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_copy_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data const&)
       1#: (0x5BF40CE70DA2) stl_vector.h:127       - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_swap_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data&)
       2#: (0x5BF40CE70DA2) stl_vector.h:1962      - std::vector<unsigned long, std::allocator<unsigned long> >::_M_move_assign(std::vector<unsigned long, std::allocator<unsigned long> >&&, std::integral_constant<bool, true>)
       3#: (0x5BF40CE70DA2) stl_vector.h:771       - std::vector<unsigned long, std::allocator<unsigned long> >::operator=(std::vector<unsigned long, std::allocator<unsigned long> >&&)
       4#: (0x5BF40CE70DA2) stacktraces.cpp:777    - HandlePosixSignal
       5#: (0x7664C9245320) libc_sigaction.c       - ???
       6#: (0x7664C929EB1C) pthread_kill.c:44      - __pthread_kill_implementation
       7#: (0x7664C929EB1C) pthread_kill.c:78      - __pthread_kill_internal
       8#: (0x7664C929EB1C) pthread_kill.c:89      - __GI___pthread_kill
       9#: (0x7664C924526E) raise.c:27             - __GI_raise
      10#: (0x7664C92288FF) abort.c:81             - __GI_abort
      11#: (0x7664C922881B) loadmsgcat.c:1177      - _nl_load_domain
      12#: (0x7664C923B507) <unknown-file>         - ???
      13#: (0x5BF40C6E88C8) signing_shares.cpp:823 - llmq::CSigSharesManager::SelectMemberForRecovery(std::shared_ptr<llmq::CQuorum const> const&, uint256 const&, unsigned long)
      14#: (0x5BF40C94A285) quorums.cpp:737        - operator()
      15#: (0x5BF40C94A514) std_function.h:292     - _M_invoke
      16#: (0x5BF40CE082C6) util.cpp:510           - RPCHelpMan::HandleRequest(JSONRPCRequest const&) const
      17#: (0x5BF40C89824A) univalue.h:17          - UniValue::operator=(UniValue&&)
      18#: (0x5BF40C89824A) server.h:108           - CRPCCommand::CRPCCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, RPCHelpMan (*)())::{lambda(JSONRPCRequest const&, UniValue&, bool)#1}::operator()(JSONRPCRequest const&, UniValue&, bool) const
      19#: (0x5BF40C9976F4) std_function.h:591     - std::function<bool (JSONRPCRequest const&, UniValue&, bool)>::operator()(JSONRPCRequest const&, UniValue&, bool) const
      20#: (0x5BF40C9976F4) server.cpp:622         - ExecuteCommand
      21#: (0x5BF40C99879F) server.cpp:511         - ExecuteCommands
      22#: (0x5BF40C99879F) server.cpp:543         - CRPCTable::execute(JSONRPCRequest const&) const
      23#: (0x5BF40CB75F24) httprpc.cpp:247        - HTTPReq_JSONRPC
  ```

  Discovered during implementation of https://github.com/dashpay/dash-issues/issues/77

  ## What was done?
  Changed condition in assert, implemented special case of using Nth element from array size N for `SelectMemberForRecovery`, added test for this case.

  ## How Has This Been Tested?
  Improved functional test `feature_asset_locks.py` to test this corner case for quorum `llmq_test_instantsend` and `llmq_test_platform`

  ## 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
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK f44edde8fe
  PastaPastaPasta:
    utACK f44edde8fe

Tree-SHA512: 5e8035960100778820bbbb242a8a354a27bce00c169bbebc4f3867737301dbdd3cc5993a8d806d55bf6eb467bfe1f36443087a271acc227ba7bb301c4f75bb7a
2024-09-23 11:17:51 -05:00
pasta
13e3dd9dfa
Merge #5481: feat: Split quorum contrib data out of evodb
ad35c1ab2f apply suggestions (UdjinM6)
600dcf3dda refactor: make clang-format happy (UdjinM6)
da9b8e038b feat: Split quorum contribution db out of evodb (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Quorum data is not stored on-chain, it's a temporary data produced during dkg and should not be a part of evodb.

  ## What was done?
  Use new db in `llmq/` to store quorum data, migrate old data to it.

  ## How Has This Been Tested?
  Run tests, run a node on testnet

  ## 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 _(for repository code-owners and collaborators only)_

ACKs for top commit:
  knst:
    utACK ad35c1ab2f
  PastaPastaPasta:
    utACK ad35c1ab2f

Tree-SHA512: b394a53815897f02ec28776c948a32c258ad7f0d9b78fbfd509146a92c8af53e7577d503bc62ae53c40f88aab2c30160fec09f45f0d3447ba64c05c0887676eb
2024-09-23 11:15:49 -05:00
Konstantin Akimov
d6946aaba1
fix: offset fee for 1 duff in commission in wallet_basic.py due to missing bitcoin/bitcoin#22949 2024-09-23 02:13:14 +07:00
MarcoFalke
3ba99b9c42
Merge bitcoin/bitcoin#21786: wallet: ensure sat/vB feerates are in range (mantissa of 3)
847288df07b45ca535c849e518b22818ab492896 test: fee rate values that cannot be represented as sat/vB (Jon Atack)
06a90fa0381c790f7bde2ab9bf47d2b22acef4a5 rpc: for sat/vB fee rates, limit ParseFixedPoint decimals to 3 (Jon Atack)
0742c7840f03505597fd2de87db97f12597ef667 rpc: enable passing decimals to AmountFromValue, add doxygen (Jon Atack)
8ce3ef57a3e9ad13c0aaa4648e8584241d53592d test: ParseFixedPoint with 3 decimals for sat/vB fee rates (Jon Atack)
b5033275979a2a495b02b25f70cadbdcc8b6eb6a test: type error and out of range fee rates where missing (Jon Atack)
c5fd4344f7fcc257062a610c8ff26ffcc9b53953 test: explicit fee rates with invalid amounts (Jon Atack)
ea6f76b66ecc52360719053489e0ec9f9a673eab test: improve zero-value explicit fee rate coverage (Jon Atack)

Pull request description:

  - Improve/close gaps in existing test coverage before making the change
  - Enable passing `decimals` to `ParseFixedPoint()` when calling `AmountFromValue()`
  - Limit explicit fee rates in sat/vB passed in by users to 3 decimals, and raise otherwise
  - Add regression test coverage

  Closes #20534.

ACKs for top commit:
  MarcoFalke:
    review ACK 847288df07b45ca535c849e518b22818ab492896 🔷

Tree-SHA512: c539d07ae9b21c0d6c8ea460beb9c8dad5559445518aace560abc3c05c588907bae189b6fd7602b3b397de4a42356136c3ec6f960d3dcf2d5d16377aef4ab5a2
2024-09-23 02:13:14 +07:00
W. J. van der Laan
22435f1898
Merge bitcoin/bitcoin#21787: test: fix off-by-ones in rpc_fundrawtransaction assertions
f09e6b2585200040be2e8ee44fa79b86b1970d70 test: fix off-by-ones in rpc_fundrawtransaction (Jon Atack)

Pull request description:

  The variables in these assertions should be the same within each line.

ACKs for top commit:
  laanwj:
    ACK f09e6b2585200040be2e8ee44fa79b86b1970d70
  theStack:
    ACK f09e6b2585200040be2e8ee44fa79b86b1970d70

Tree-SHA512: 7ac754eaadd8cb00a725afa55bccbb8de7547dedac9350d79a9a470918245617e075c56a91adc36fb653bbe8a0a325d59b00443155a7e1a81ebf22e4e4cf56d9
2024-09-23 02:13:14 +07:00
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