aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-07-06Update getmempoolinfo RPC with `mempoolfullrbf`Antoine Riard
2022-07-06Introduce `mempoolfullrbf` node setting.Antoine Riard
This new node policy setting enables to accept replaced-by-fee transaction without inspection of the replaceability signaling as described in BIP125 "explicit signaling". If turns on, the node mempool accepts transaction replacement as described in `policy/mempool-replacements.md`. The default setting value is `false`, implying opt-in RBF is enforced.
2022-06-29Merge bitcoin/bitcoin#25502: upstream: update minisketch subtreeAndrew Chow
28a28a0c5bfae1a4149c795676a3109fd614b22a Squashed 'src/minisketch/' changes from 7eeb778fef..47f0a2d26f (fanquake) Pull request description: Contains: * https://github.com/sipa/minisketch/pull/65 * https://github.com/sipa/minisketch/pull/66 Required for #25493. ACKs for top commit: achow101: ACK dc375e5ccee5599374dddc2f0141a44a67c363b8 hebasto: ACK dc375e5ccee5599374dddc2f0141a44a67c363b8, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: fbcd6cdc551770ff67d1df65ab171ce43c9eb7e7668da76da5c5b06865ed550527abcff661741a86c1535018a85a165619ff94ae3e6c7a695374b6c4f843c5ca
2022-06-29Merge bitcoin/bitcoin#25497: wallet: more accurate target for large transactionsAndrew Chow
25e4762ae7a09906020e62cd947e9f71300439cf wallet: more accurate tx_noinputs_size (S3RK) Pull request description: Rationale: more accurate non-input fee estimation for txs with >=253 inputs ACKs for top commit: laanwj: Concept and code review ACK 25e4762ae7a09906020e62cd947e9f71300439cf achow101: ACK 25e4762ae7a09906020e62cd947e9f71300439cf furszy: Code review ACK 25e4762a. left a small nit. Tree-SHA512: bda8fad725d32ad3e13c007fa56ddb6679ac1a32098ddb08d9a114054acfa681cb66cd703ac675297f731cb381b09067a99a4efa31320140bbdd03f0cfdc81af
2022-06-29Update minisketch subtree to latest masterfanquake
2022-06-29Merge bitcoin/bitcoin#25495: Revert "bnb: exit selection when best_waste is 0"fanquake
af56d63eca8a246c02506c2aef7ea8a22e2d07bb Revert "bnb: exit selection when best_waste is 0" (Murch) Pull request description: This reverts commit 9b5950db8683f9b4be03f79ee0aae8a780b01a4b. Waste can be negative. At feerates lower than long_term_feerate this means that a waste of 0 may be a suboptimal solution and this causes the search to exit prematurely. Only when the feerate is equal to the long_term_feerate would achieving a waste of 0 indicate that we have achieved an optimal solution, because it would mean that the excess is 0. It seems unlikely that this would ever occur outside of test cases, and even then we should prefer solutions with more inputs over solutions with fewer according to previous decisions—but solutions with more inputs are found later in the branch exploration. The "optimization" described in #18257 and implemented in #18262 is therefore a premature exit on a suboptimal solution and should be reverted. ACKs for top commit: sipa: utACK af56d63eca8a246c02506c2aef7ea8a22e2d07bb S3RK: utACK af56d63eca8a246c02506c2aef7ea8a22e2d07bb achow101: ACK af56d63eca8a246c02506c2aef7ea8a22e2d07bb glozow: utACK af56d63eca8a246c02506c2aef7ea8a22e2d07bb, agree it is incorrect to stop here unless we could rule out the possibility of a better solution with negative waste. `SelectCoinsBnB` doesn't know what long term feerate and effective feerate are (and probably shouldn't) so it's better to have no exit early condition at all. Tree-SHA512: 470f1a49041a0042cb69d239fccac7512ace79871d43508b6e7f7a2f3aca3523930b16e00c5513b816d5fe078d9ab53e42b0a80fd3c3d48e6434f24c2b009077
2022-06-29util: remove MSVC warning pragmasfanquake
4786 - I don't think this exists any more? 4805 - Is already defined (globally) in the MSVC project. Dropped 4717 and 4804, as it seems they are no-longer supressing anything. See: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warnings-c4000-c5999
2022-06-29Merge bitcoin/bitcoin#25290: [kernel 3a/n] Decouple `CTxMemPool` from ↵MacroFake
`ArgsManager` d1684beabe5b738c2cc83de83e1aaef11a761b69 fees: Pass in a filepath instead of referencing gArgs (Carl Dong) 9a3d825c30e8e6118d74a4e568744cb9d03f7f5d init: Remove redundant -*mempool*, -limit* queries (Carl Dong) 6c5c60c4124293d948735756f84efc85262ea66f mempool: Use m_limit for UpdateTransactionsFromBlock (Carl Dong) 9e93b1030182eff92ef91181e17c7dd498c7e164 node/ifaces: Use existing MemPoolLimits (Carl Dong) 38af2bcf358a72b9457d370282e57f4be1c5c849 mempoolaccept: Use limits from mempool in constructor (Carl Dong) 9333427014695ac235c96d48791098168dfdc9db mempool: Introduce (still-unused) MemPoolLimits (Carl Dong) 716bb5fbd31077bbe99d11a54d6c2c250afc8085 scripted-diff: Rename anc/desc size limit vars to indicate SI unit (Carl Dong) 1ecc77321deb61b9f6888e4e10752b9d972fd26e scripted-diff: Rename DEFAULT_MEMPOOL_EXPIRY to indicate time unit (Carl Dong) aa9141cd8185cb7ad532bc16feb9d302b05d9697 mempool: Pass in -mempoolexpiry instead of referencing gArgs (Carl Dong) 51c7a41a5eb6fcb60333812c770d80227cf7b64d init: Only determine maxmempool once (Carl Dong) 386c9472c8764738282e6d163b42e15a8feda7ea mempool: Make GetMinFee() with custom size protected (Carl Dong) 82f00de7a6a60cbc9ad0c6e1d0ffb1bc70c49af5 mempool: Pass in -maxmempool instead of referencing gArgs (Carl Dong) f1941e8bfd2eecc478c7660434b1ebf6a64095a0 pool: Add and use MemPoolOptions, ApplyArgsManOptions (Carl Dong) 0199bd35bb44e32ee0db9b51c9d1bd7518c26f19 fuzz/rbf: Add missing TestingSetup (Carl Dong) ccbaf546a68d6cda8ed3efd0598c0e4121b366bb scripted-diff: Rename DEFAULT_MAX_MEMPOOL_SIZE to indicate SI unit (Carl Dong) fc02f77ca604f0221171bfde3059b34f5d0fb1cd ArgsMan: Add Get*Arg functions returning optional (Carl Dong) Pull request description: This is part of the `libbitcoinkernel` project: #24303, https://github.com/bitcoin/bitcoin/projects/18 ----- As mentioned in the Stage 1 Step 2 description of [the `libbitcoinkernel` project](https://github.com/bitcoin/bitcoin/issues/24303), `ArgsManager` will not be part of `libbitcoinkernel`. Therefore, it is important that we remove any dependence on `ArgsManager` by code that will be part of `libbitcoinkernel`. This is the first in a series of PRs aiming to achieve this. This PR removes `CTxMemPool+MempoolAccept`'s dependency on `ArgsManager` by introducing a `CTxMemPool::Options` struct, which is used to specify `CTxMemPool`'s various options at construction time. These options are: - `-maxmempool` -> `CTxMemPool::Options::max_size` - `-mempoolexpiry` -> `CTxMemPool::Options::expiry` - `-limitancestorcount` -> `CTxMemPool::Options::limits::ancestor_count` - `-limitancestorsize` -> `CTxMemPool::Options::limits::ancestor_size` - `-limitdescendantcount` -> `CTxMemPool::Options::limits::descendant_count` - `-limitdescendantsize` -> `CTxMemPool::Options::limits::descendant_size` More context can be gleaned from the commit messages. The important commits are: - 56eb479ded8bfb2ef635bb6f3b484f9d5952c70d "pool: Add and use MemPoolOptions, ApplyArgsManOptions" - a1e08b70f3068f4e8def1c630d8f50cd54da7832 "mempool: Pass in -maxmempool instead of referencing gArgs" - 6f4bf3ede5812b374828f08fc728ceded2f10024 "mempool: Pass in -mempoolexpiry instead of referencing gArgs" - 5958a7fe4806599fc620ee8c1a881ca10fa2dd16 "mempool: Introduce (still-unused) MemPoolLimits" Reviewers: Help needed in the following commits (see commit messages): - a1e08b70f3068f4e8def1c630d8f50cd54da7832 "mempool: Pass in -maxmempool instead of referencing gArgs" - 0695081a797e9a5d7787b78b0f8289dafcc6bff7 "node/ifaces: Use existing MemPoolLimits" Note to Reviewers: There are perhaps an infinite number of ways to architect `CTxMemPool::Options`, the current one tries to keep it simple, usable, and flexible. I hope we don't spend too much time arguing over the design here since that's not the point. In the case that you're 100% certain that a different design is strictly better than this one in every regard, please show us a fully-implemented branch. ----- TODO: - [x] Use the more ergonomic `CTxMemPool::Options` where appropriate - [x] Doxygen comments for `ApplyArgsManOptions`, `MemPoolOptions` ----- Questions for Reviewers: 1. Should we use `std::chrono::seconds` for `CTxMemPool::Options::expiry` and `CTxMemPool::m_expiry` instead of an `int64_t`? Something else? (`std::chrono::hours`?) 2. Should I merge `CTxMemPool::Limits` inside `CTxMemPool::Options`? ACKs for top commit: MarcoFalke: ACK d1684beabe5b738c2cc83de83e1aaef11a761b69 🍜 ryanofsky: Code review ACK d1684beabe5b738c2cc83de83e1aaef11a761b69. Just minor cleanups since last review, mostly switching to brace initialization Tree-SHA512: 2c138e52d69f61c263f1c3648f01c801338a8f576762c815f478ef5148b8b2f51e91ded5c1be915e678c0b14f6cfba894b82afec58d999d39a7bb7c914736e0b
2022-06-29wallet: more accurate tx_noinputs_sizeS3RK
2022-06-29Merge bitcoin-core/gui#617: Reset options, notify user about backup creationHennadii Stepanov
ac4fb3bbbe207d0744201a9df8a971af06db5476 gui: reset options, notify user about the backup creation (furszy) Pull request description: Quick follow-up to first point of https://github.com/bitcoin-core/gui/pull/602#pullrequestreview-1002780997 ACKs for top commit: ryanofsky: Code review ACK ac4fb3bbbe207d0744201a9df8a971af06db5476, just fixing displayed backup directory since last review jarolrod: tACK ac4fb3bbbe207d0744201a9df8a971af06db5476 Tree-SHA512: cfeca5cd6d6d3d69bbd81211cf1bfd490de13ac96bf53be081a5ceb88611afa57dff2be35f8e0a41b1088b7b892f75a21a9abf47f2e1d77e9e316467eb7c12be
2022-06-28Revert "bnb: exit selection when best_waste is 0"Murch
This reverts commit 9b5950db8683f9b4be03f79ee0aae8a780b01a4b. Waste can be negative. At feerates lower than long_term_feerate this means that a waste of 0 may be a suboptimal solution and this causes the search to exit prematurely. Only when the feerate is equal to the long_term_feerate would achieving a waste of 0 indicate that we have achieved an optimal solution, because it would mean that the excess is 0. It seems unlikely that this would ever occur outside of test cases, and even then we should prefer solutions with more inputs over solutions with fewer according to previous decisions—but solutions with more inputs are found later in the branch exploration. The "optimization" described in #18257 and implemented in #18262 is therefore a premature exit on a suboptimal solution and should be reverted.
2022-06-28fees: Pass in a filepath instead of referencing gArgsCarl Dong
2022-06-28init: Remove redundant -*mempool*, -limit* queriesCarl Dong
Now that MemPoolOptions has correctly-determined max_size and limits members, perform sanity checks on that instead of re-determining the options.
2022-06-28mempool: Use m_limit for UpdateTransactionsFromBlockCarl Dong
Since: - UpdateTransactionsFromBlock is only called by MaybeUpdateMempoolForReorg, which calls it with the gArgs-determined ancestor limits - UpdateForDescendants is only called by UpdateTransactionsFromBlock with the ancestor limits unchanged We can remove the requirement to specify the ancestor limits for both UpdateTransactionsFromBlock and UpdateForDescendants and just use the values in the m_limits member. Also move some removed comments to MemPoolLimits struct members. The uint64_t cast in UpdateForDescendants is not new behavior, see the diff in CChainState::MaybeUpdateMempoolForReorg for where they were previously.
2022-06-28node/ifaces: Use existing MemPoolLimitsCarl Dong
2022-06-28mempoolaccept: Use limits from mempool in constructorCarl Dong
2022-06-28mempool: Introduce (still-unused) MemPoolLimitsCarl Dong
They live as a CTxMemPool member. [META] These limits will be used in subsequent commits to replace calls to gArgs.
2022-06-28scripted-diff: Rename anc/desc size limit vars to indicate SI unitCarl Dong
Better to be explicit when it comes to sizes to avoid unintentional bugs. We use MB and KB all over the place. -BEGIN VERIFY SCRIPT- find_regex="DEFAULT_(ANCESTOR|DESCENDANT)_SIZE_LIMIT" \ && git grep -l -E "$find_regex" \ | xargs sed -i -E "s@$find_regex@\0_KVB@g" -END VERIFY SCRIPT-
2022-06-28scripted-diff: Rename DEFAULT_MEMPOOL_EXPIRY to indicate time unitCarl Dong
Better to be explicit when it comes to time to avoid unintentional bugs. -BEGIN VERIFY SCRIPT- find_regex="DEFAULT_MEMPOOL_EXPIRY" \ && git grep -l -E "$find_regex" \ | xargs sed -i -E "s@$find_regex@\0_HOURS@g" -END VERIFY SCRIPT-
2022-06-28mempool: Pass in -mempoolexpiry instead of referencing gArgsCarl Dong
- Store the mempool expiry (-mempoolexpiry) in CTxMemPool as a std::chrono::seconds member. - Remove the requirement to explicitly specify a mempool expiry for LimitMempoolSize(...), just use the newly-introduced member. - Remove all now-unnecessary instances of: std::chrono::hours{gArgs.GetIntArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY)}
2022-06-28init: Only determine maxmempool onceCarl Dong
Now that MemPoolOptions has a correctly-determined max_size member, use that instead of redetermining it to print the log line.
2022-06-28mempool: Make GetMinFee() with custom size protectedCarl Dong
The version of GetMinFee() with a custom size specification is and should only be used by tests. Mark it as protected and use a derived class exposing GetMinFee() as public in tests.
2022-06-28mempool: Pass in -maxmempool instead of referencing gArgsCarl Dong
- Store the mempool size limit (-maxmempool) in CTxMemPool as a member. - Remove the requirement to explicitly specify a mempool size limit for CTxMemPool::GetMinFee(...) and LimitMempoolSize(...), just use the stored mempool size limit where possible. - Remove all now-unnecessary instances of: gArgs.GetIntArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE_MB) * 1000000 The code change in CChainState::GetCoinsCacheSizeState() is correct since the coinscache should not repurpose "extra" mempool memory headroom for itself if the mempool doesn't even exist.
2022-06-28pool: Add and use MemPoolOptions, ApplyArgsManOptionsCarl Dong
Reviewers: Note that CTxMemPool now requires a non-defaulted CTxMemPool::Options for its constructor. Meaning that there's no need to worry about a stray CTxMemPool constructor somewhere defaulting to something incorrect. All instances of CTxMemPool construction are addressed here in this commit. We set options for CTxMemPool and construct it in many different ways. A good example can be seen in how we determine CTxMemPool's check_ratio in AppInitMain(...). 1. We first set the default based on chainparams's DefaultConsistencyChecks() 2. Then, we apply the ArgsManager option on top of that default 3. Finally, we clamp the result of that between 0 and 1 Million With this patch, most CTxMemPool construction are along the lines of: MemPoolOptions mempool_opts{...default overrides...}; ApplyArgsManOptions(argsman, mempool_opts); ...hard overrides... CTxMemPool pool{mempool_opts}; This "compositional" style of building options means that we can omit unnecessary/irrelevant steps wherever we want but also maintain full customizability. For example: - For users of libbitcoinkernel, where we eventually want to remove ArgsManager, they simply won't call (or even know about) ApplyArgsManOptions. - See src/init.cpp to see how the check_ratio CTxMemPool option works after this change. A MemPoolOptionsForTest helper was also added and used by tests/fuzz tests where a local CTxMemPool needed to be created. The change in src/test/fuzz/tx_pool.cpp seemingly changes behaviour by applying ArgsManager options on top of the CTxMemPool::Options defaults. However, in future commits where we introduce flags like -maxmempool, the call to ApplyArgsManOptions is actually what preserves the existing behaviour. Previously, although it wasn't obvious, our CTxMemPool would consult gArgs for flags like -maxmempool when it needed it, so it already relied on ArgsManager information. This patchset just laid bare the obfuscatory perils of globals. [META] As this patchset progresses, we will move more and more CTxMemPool-relevant options into MemPoolOptions and add their ArgsMan-related logic to ApplyArgsManOptions.
2022-06-28Merge bitcoin/bitcoin#24924: bench: Make WalletLoading benchmark run fasterfanquake
e673d8b475995075b696208386c9e45ae7ca3e20 bench: Enable loading benchmarks depending on what's compiled (Andrew Chow) 4af3547ebac672a2d516e8696fd3580a766c27eb bench: Use mock wallet database for wallet loading benchmark (Andrew Chow) 49910f255f77e14fccf189353d188efac00d1445 sqlite: Use in-memory db instead of temp for mockdb (Andrew Chow) a1080802f8d7c3d1251ec6f2be33031f568deafa walletdb: Create a mock database of specific type (Andrew Chow) 7c0d34476df446e3825198b27c6f62bba4c0b974 bench: reduce the number of txs in wallet for wallet loading bench (Andrew Chow) f85b54ed27bd6eddb1e7035db02d542575b3ab24 bench: Add transactions directly instead of mining blocks (Andrew Chow) d94244c4bf37365272a16eb2ce6517605b4c8a47 bench: reduce number of epochs for wallet loading benchmark (Andrew Chow) 817c051364208d3f9e7e2af5700bd2bee5c9f303 bench: use unsafesqlitesync in wallet loading benchmark (Andrew Chow) 9e404a98312d73c969adf4f8e87aad1ac4b3029d bench: Remove minEpochIterations from wallet loading benchmark (Andrew Chow) Pull request description: `minEpochIterations` is probably unnecessary to set, so removing it makes the runtime much faster. ACKs for top commit: Rspigler: tACK e673d8b475995075b696208386c9e45ae7ca3e20 furszy: Code review ACK e673d8b4, nice PR. glozow: Concept ACK e673d8b475995075b696208386c9e45ae7ca3e20. For each commit, verified that there was a performance improvement without negating the purpose of the bench, and made some effort to verify that the code is correct. Tree-SHA512: 9337352ef846cf18642d5c14546c5abc1674b4975adb5dc961a1a276ca91f046b83b7a5e27ea6cd26264b96ae71151e14055579baf36afae7692ef4029800877
2022-06-28Merge bitcoin/bitcoin#25480: Replace CountSecondsDouble with ↵fanquake
Ticks<SecondsDouble> fa956e7508986991008e2f6126ab307924b3f353 Replace CountSecondsDouble with Ticks<SecondsDouble> (MacroFake) Pull request description: Seems odd to have two ways to say exactly the same thing when one is sufficient. ACKs for top commit: fanquake: ACK fa956e7508986991008e2f6126ab307924b3f353 shaavan: ACK fa956e7508986991008e2f6126ab307924b3f353 w0xlt: ACK https://github.com/bitcoin/bitcoin/pull/25480/commits/fa956e7508986991008e2f6126ab307924b3f353 Tree-SHA512: b599470e19b693da1ed1102d1e86b08cb03adaddf2048752b6d050fdf86055be117ff0ae10b6953d03e00eaaf7b0cfa350137968b67d6c5b3ca68c5aa50ca6aa
2022-06-28Merge bitcoin/bitcoin#24565: Remove LOCKTIME_MEDIAN_TIME_PAST constantfanquake
fa1fe2e5004a6bacded464ed9778ff196e05859c Remove LOCKTIME_MEDIAN_TIME_PAST constant (MarcoFalke) Pull request description: The constant is exposed in policy code, which doesn't make sense: * Wallet and mempool need to assume the flag to be always active to function properly. * Setting (or unsetting) the flag has no effect on policy code. The constant is only used in `ContextualCheckBlock` (consensus code) to set a flag and then read the flag again. I think this can be better achieved by using a `bool`. If there is a need to use a flag in the future, it will be trivial to do so then. (The previous use for the constant was removed in df562d698a386166ef93d03326c0480ea9bc11fe) ACKs for top commit: Sjors: utACK fa1fe2e5004a6bacded464ed9778ff196e05859c glozow: code review ACK fa1fe2e5004a6bacded464ed9778ff196e05859c, AFAICT this is safe and makes sense as `SequenceLocks` doesn't use it, wallet/ATMP no longer need it since #24080, and `ContextualCheckBlock` effectively uses it as a roundabout boolean. instagibbs: utACK fa1fe2e5004a6bacded464ed9778ff196e05859c Tree-SHA512: de1972498c545d608a09630d77d8c7e38ed50a6ec40d6c0d720310a1647ed5b48b4ace0078c80db10e7f97aacc552fffae251fe3256e9a19a908b933ba2dc552
2022-06-28Merge bitcoin/bitcoin#22558: psbt: Taproot fields for PSBTlaanwj
b80de4c505bf6377f2e476133dce6f2a803f1fa1 test: Test signing psbts without explicitly having scripts (Andrew Chow) a73b56888a1562d9fe46b7b1d2eea08802d98dfe wallet: also search taproot pubkeys in FillPSBT (Andrew Chow) 6cff82722f47b589a6a2cb264bfce20f4d45426a sign: Use sigdata taproot spenddata when signing (Andrew Chow) 5f12fe3f36bc8a9ad2733986d9493354265a525c psbt: Implement merge for Taproot fields (Andrew Chow) 1ece9a371510d887ed9612f2d219f8dfae278658 psbt, test: Check for taproot fields in taproot psbt test (Andrew Chow) 496a1bbe5e442ffc0948f626cca1b85a46ef58db taproot: Use pre-existing signatures if available (Andrew Chow) 0ad21e7c558da47f50d6b39974d0d2713e829d25 tests: Test taproot fields for PSBT (Andrew Chow) 103c6fd2791f7e73eeab7f3900fbedd5b550211d psbt: Remove non_witness_utxo for segwit v1+ (Andrew Chow) 7dccdd3157a87f55f5398316b98f909d6d6f1feb Implement decodepsbt for Taproot fields (Andrew Chow) ac7747585fb0629be502a089c9c9be876bd7107d Fill PSBT Taproot output data to/from SignatureData (Andrew Chow) 25b6ae46e7249a1b363ef4fb12375f368903c58e Assert that TaprootBuilder is Finalized during GetSpendData (Andrew Chow) 3ae5b6af21cf45b3da5e341e84f50e0717eaf589 Store TaprootBuilder in SigningProviders instead of TaprootSpendData (Andrew Chow) 4d1223e5123e60be93b5ad42ba0aee72d0612ea7 Fetch key origins for Taproot keys (Andrew Chow) 52e3f2f88ef1ac7062e905bf2d745b70463ee3e9 Fill PSBT Taproot input data to/from SignatureData (Andrew Chow) 05e2cc9a302ba7f14fc65ba255594c047cb44559 Implement de/ser of PSBT's Taproot fields (Andrew Chow) d557eff2add151781537978e27d6f1aff1b83ef7 Add serialization methods to XOnlyPubKey (Andrew Chow) d43923c38155fdadad3837d79c19a84c9d2d7f50 Add TaprootBuilder::GetTreeTuples (Andrew Chow) ce911204e42b8653cad791d1727aa625de9d0079 Move individual KeyOriginInfo de/ser to separate function (Andrew Chow) Pull request description: Implements the Taproot fields for PSBT described in [BIP 371](https://github.com/bitcoin/bips/blob/master/bip-0371.mediawiki). ACKs for top commit: laanwj: Code review ACK b80de4c505bf6377f2e476133dce6f2a803f1fa1 Tree-SHA512: 50b79bb44f353c9ec2ef4c98aac08a81eba560987e5264a5684caa370e9c4e7a8255c06747fc47749511be45b32d01492e015f92b82be8d22bc8bf192073bd26
2022-06-28gui: reset options, notify user about the backup creationfurszy
2022-06-28Merge bitcoin/bitcoin#24378: refactor: make bind() and listen() ↵laanwj
mockable/testable b2733ab6a85b234a88b83bdc77a0d043e18385b3 net: add new method Sock::Listen() that wraps listen() (Vasil Dimov) 3ad7de225efce3e76530f56bee8a8f7a75ea0f3c net: add new method Sock::Bind() that wraps bind() (Vasil Dimov) Pull request description: _This is a piece of #21878, chopped off to ease review._ Add new methods `Sock::Bind()` and `Sock::Listen()` that wrap `bind()` and `listen()`. This will help to increase `Sock` usage and make more code mockable. ACKs for top commit: pk-b2: ACK b2733ab6a85b234a88b83bdc77a0d043e18385b3 laanwj: Code review ACK b2733ab6a85b234a88b83bdc77a0d043e18385b3 Tree-SHA512: c6e737606703e2106fe60cc000cfbbae3a7f43deadb25f70531e2cac0457e0b0581440279d14c76c492eb85c12af4adde52c30baf74542c41597e419817488e8
2022-06-28Merge bitcoin/bitcoin#25426: net: add new method Sock::GetSockName() that ↵laanwj
wraps getsockname() and use it in GetBindAddress() a8d6abba5ec4ae2a3375e9be0b739f298899eca2 net: change GetBindAddress() to take Sock argument (Vasil Dimov) 748dbcd9f29dbe4110da8a06f08e3eefa95f5321 net: add new method Sock::GetSockName() that wraps getsockname() (Vasil Dimov) Pull request description: _This is a piece of #21878, chopped off to ease review._ Wrap the syscall `getsockname()` in `Sock::GetSockName()` and change `GetBindAddress()` to take a `Sock` argument so that it can use the wrapper. This further encapsulates syscalls inside the `Sock` class and makes the callers mockable. ACKs for top commit: laanwj: Code review ACK a8d6abba5ec4ae2a3375e9be0b739f298899eca2 Tree-SHA512: 3a73463258c0057487fb3fd67215816b03a1c5160f45e45930eaeef86bb3611ec385794cdb08339aa074feba8ad67cd2bfd3836f6cbd40834e15d933214a05dc
2022-06-28Merge bitcoin/bitcoin#25485: rpc: Use enum instead of string for ↵MacroFake
`filtertype_name` baf4efe02f363b70011b04cadd2d7aace18d48e9 rpc: use enum instead of string for filter type (w0xlt) Pull request description: This PR changes the `getblockfilter` RPC to use `BlockFilterType` enum instead of a repeated string for `filtertype_name`. ACKs for top commit: furszy: ACK baf4efe0 brunoerg: ACK baf4efe02f363b70011b04cadd2d7aace18d48e9 Tree-SHA512: 31c79c0a5f0b17fd69b399bb026f523003b656733d6b7d5ffe665921a8cc0f1e0334d2e465145cd89fbd85e196059cf56f4f11563bbc92948b0606080ca76524
2022-06-27wallet: also search taproot pubkeys in FillPSBTAndrew Chow
When filling a PSBT, we search the listed pubkeys in order to determine whether the current DescriptorScriptPubKeyMan could sign the transaction even if it is not watching the scripts. With Taproot, the taproot pubkeys need to be searched as well.
2022-06-27sign: Use sigdata taproot spenddata when signingAndrew Chow
The taproot spenddata stored in a sigdata is the combination of data existing previously (e.g. in a PSBT) and the data stored in a SigningProvider. In order to use the external data when signing, we need to be using the sigdata's spenddata.
2022-06-27psbt: Implement merge for Taproot fieldsAndrew Chow
2022-06-27taproot: Use pre-existing signatures if availableAndrew Chow
Actually use pre-existing signatures in CreateTaprootScriptSig if a signature is found for the given key and leaf hash.
2022-06-27psbt: Remove non_witness_utxo for segwit v1+Andrew Chow
If all inputs are segwit v1+, the non_witness_utxos can be removed.
2022-06-27Implement decodepsbt for Taproot fieldsAndrew Chow
2022-06-27Fill PSBT Taproot output data to/from SignatureDataAndrew Chow
2022-06-27Assert that TaprootBuilder is Finalized during GetSpendDataAndrew Chow
GetSpendData needs to be finalized in order to be used. To avoid future bugs, assert `!m_output_key.IsNull()` as m_output_key is only set during Finalize.
2022-06-27Store TaprootBuilder in SigningProviders instead of TaprootSpendDataAndrew Chow
TaprootSpendData can be gotten from TaprootBuilder, however for PSBT, we also need TaprootBuilders directly (for the outputs). So we store the TaprootBuilder in the FlatSigningProvider and when the TaprootSpendData is needed, we generate it on the fly using the stored builder.
2022-06-27Fetch key origins for Taproot keysAndrew Chow
2022-06-27Fill PSBT Taproot input data to/from SignatureDataAndrew Chow
2022-06-27Implement de/ser of PSBT's Taproot fieldsAndrew Chow
2022-06-27Add serialization methods to XOnlyPubKeyAndrew Chow
It is useful to have serialzation methods for XOnlyPubKey. These will serialize the internal uint256, so it is not prefixed with the length as CPubKey does.
2022-06-27Add TaprootBuilder::GetTreeTuplesAndrew Chow
GetTreeTuples returns the leaves in DFS order as tuples of depth, leaf version, and script. This is a representation of the tree that can be serialized.
2022-06-27Move individual KeyOriginInfo de/ser to separate functionAndrew Chow
To make it easier to de/serialize individual KeyOriginInfo for PSBTs, separate the actual de/serialization of KeyOriginInfo to its own function. This is an additional separation where any length prefix is processed by the caller.
2022-06-27fuzz/rbf: Add missing TestingSetupCarl Dong
MarcoFalke mentioned that this is likely a bug since "any log messages should be muted, not accumulated and turned into an OOM when fuzzing for a long time".
2022-06-27rpc: use enum instead of string for filter typew0xlt
2022-06-27Merge bitcoin/bitcoin#25404: p2p, doc: Use MAX_BLOCKS_TO_ANNOUNCE consistentlyfanquake
e357c8953880715a943b892deed04e7777187999 p2p, doc: Use MAX_BLOCKS_TO_ANNOUNCE consistently (Martin Zumsande) Pull request description: Block announcements via headers may have up to `MAX_BLOCKS_TO_ANNOUNCE = 8` entries according to the definition of this constant. However, there are a few spots saying they should have a size _less than_ `MAX_BLOCKS_TO_ANNOUNCE`. Fix these. I don't think that this is critical (this only changes behavior when we get a headers announcement with exactly `MAX_BLOCKS_TO_ANNOUNCE` blocks which we can't connect), but it would be nice to handle this limit consistently. ACKs for top commit: dergoegge: utACK e357c8953880715a943b892deed04e7777187999 - This PR makes the usage and docs of `MAX_BLOCKS_TO_ANNOUNCE` consistent with its description. Tree-SHA512: f3772026ab0f402e3a551127ef6e4a98fa9e7af250715fe317c05988b5b33f2f3e098a00e03960d4d28c8bd2b7a97231f7f99f22f1c152c000b2e27b658cf8f2