aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-12-01style: Remove whitespaceMarcoFalke
Can be reviewed via --ignore-all-space
2021-12-01Merge bitcoin/bitcoin#23601: Don't check if the listening socket is validMarcoFalke
6c9ee92ffe390064881ef5bf47e38e345d78a2a1 net: don't check if the listening socket is valid (Vasil Dimov) Pull request description: _This is a piece of #21878, chopped off to ease review._ Listening sockets in `CConnman::vhListenSocket` are always valid (underlying file descriptor is not `INVALID_SOCKET`). ACKs for top commit: theStack: Code-review ACK 6c9ee92ffe390064881ef5bf47e38e345d78a2a1 🔌 Tree-SHA512: b2e29711c6a0c7c85467ca61cfd7fb734eb06bd83a41f88735901caf90aec095ca80707ce5bb897d39c80fdec16819dbf5a84979c9b1ab3dc3fb8b08cebe7c61
2021-12-01miner: Remove uncompiled MTP codeMarcoFalke
2021-12-01style: Add {} to if-bodies in node/minerMarcoFalke
Can be reviewed with --word-diff-regex=. --ignore-all-space
2021-12-01Merge bitcoin/bitcoin#23590: Crash debug builds when mempool ↵MarcoFalke
ConsensusScriptChecks fails faad05c6d2ad1840c26f6fdea7d358bf9ba6efea Crash debug builds when mempool ConsensusScriptChecks fails (MarcoFalke) Pull request description: Currently a bug in the function might sneak around our testing infrastructure. Fix that by turning bugs into crashes during tests. ACKs for top commit: glozow: utACK faad05c6d2ad1840c26f6fdea7d358bf9ba6efea, there's something seriously wrong with the code if this returns false, good to throw in debug mode Tree-SHA512: dfea1cd9ce3f1c303f49cca1417cd5c77c6ed12849aaff7b6ab1b6060f2f0c9cf5d4689017355d11f66639bab35823f65f848e6979042fa875181509dfd5d3d7
2021-12-01MOVEONLY: Move utility functions from rpcwallet to wallet/rpc/utilSamuel Dobson
2021-12-01Introduce wallet/rpc/utilSamuel Dobson
2021-12-01Use std::iota instead of manually pushing rangeSamuel Dobson
2021-12-01Use bounds-checked array lookups in Bech32 error detection codeSamuel Dobson
2021-12-01Simplify encoding of e in GF(1024) tables to (1,0)Samuel Dobson
This follows PR 64 of the sipa/bech32 repo.
2021-12-01Replace GF1024 tables and syndrome constants with compile-time generated ↵Samuel Dobson
constexprs.
2021-11-30Merge bitcoin/bitcoin#21327: net_processing: ignore transactions while in IBDW. J. van der Laan
6aed8b7e9b206e728367fee9edfeb85b536bba69 [test] tx processing before and after ibd (glozow) b9e105b6643bada4c80f8d521394be4d55e8e4fc [net_processing] ignore all transactions during ibd (glozow) Pull request description: This is basically a mini, IBD-only version of #21224 Incoming transactions aren't really relevant until we're caught up. That's why we send a giant feefilter and don't send tx getdatas, but we also shouldn't process them if peers send them anyway. Simply ignore them. ACKs for top commit: jnewbery: reACK 6aed8b7e9b laanwj: Code review ACK 6aed8b7e9b206e728367fee9edfeb85b536bba69 Tree-SHA512: 8e1616bf355f9d0b180bdbc5461f24c757dc5d7bc7bf651470f3b0bffcca5d5e68287106255b5cede2d96b42bce448a0f8c0649de35a530c5e079f7c89c70a35
2021-11-30Remove GetAdjustedTime from init.cppMarcoFalke
2021-11-30rpc: various fixups for dumptxoutsetJames O'Beirne
- Actually generate an assumeutxo hash and display it - Add nchaintx to output (necessary for use in chainparams entry) - Add path of serialized UTXO file to output
2021-11-30Replace addrman.h include with forward decl in net.hMarcoFalke
Also, add missing addrman.h includes
2021-11-30Break validation <-> txmempool circular dependencyglozow
No behavior change. Parameterize removeForReorg using a CChain and callable that encapsulates validation logic. The mempool shouldn't need to know a bunch of details about coinbase maturity and lock finality. Instead, just pass in a callable function that says true/false. Breaks circular dependency by removing txmempool's dependency on validation.
2021-11-30[mempool] always assert coin spentglozow
This is an extremely cheap function (just checks that the coin CTxOut isn't null) that doesn't need to be gated on check_ratio.
2021-11-30[refactor] put finality and maturity checking into a lambdaglozow
No behavior change.
2021-11-30[mempool] only update lockpoints for non-removed entriesglozow
Each entry's lockpoints are independent of one another, so there isn't any reason to update lockpoints for entries that will be removed. Separating the loops also allows us to move validation logic out and leave lockpoints in txmempool.
2021-11-30Merge bitcoin/bitcoin#23602: wallet: Split stuff from rpcwalletMarcoFalke
fae239208d3676452a755f736ee5aaa17adeb493 wallet: Split signmessage from rpcwallet (MarcoFalke) Pull request description: rpcwallet is the file that takes longest to compile, especially with sanitizers enabled it can take several 10s of seconds. Allow faster incremental and parallel builds by starting to split it up. First, split off `signmessage`, which is unrelated to other stuff such as wallet file handling, wallet encryption, tx creation, or wallet status/info. ACKs for top commit: ryanofsky: Code review ACK fae239208d3676452a755f736ee5aaa17adeb493. Confirmed move only meshcollider: Code review ACK fae239208d3676452a755f736ee5aaa17adeb493 Tree-SHA512: 250445cd544e39376f225871270cdcae462f16cfd9d25ede4b148e915642bfac9ee7ef3e8eccdd2443dc74dbf794d3bcd5fe5c58b1d05a2dcec70b8e03b37dff
2021-11-30MOVEONLY: TestLockPointValidity to txmempoolglozow
2021-11-30Add RPC help for getblock verbosity level 3Kiminuo
2021-11-29More Span simplificationsPieter Wuille
Based on suggestions by MarcoFalke <falke.marco@gmail.com>
2021-11-29Replace MakeSpan helper with Span deduction guidePieter Wuille
2021-11-29Merge bitcoin/bitcoin#22513: rpc: Allow walletprocesspsbt to sign without ↵W. J. van der Laan
finalizing a99ed8986554fa1ecc854e43ea373d957e598db8 psbt: sign without finalizing (Andrew Chow) Pull request description: It can be useful to sign an input with `walletprocesspsbt` but not finalize that input if it is complete. This PR adds another option to `walletprocesspsbt` to be able to do that. We will still finalize by default. This does not materially change the PSBT workflow since `finalizepsbt` needs to be called in order to extract the tx for broadcast. ACKs for top commit: meshcollider: utACK a99ed8986554fa1ecc854e43ea373d957e598db8 Sjors: utACK a99ed89 Tree-SHA512: c88e5d3222109c5f4e763b1b9d97ce4655f68f2985a4509caab2d4e7f5bac5047328fd69696e82a330f5c5a333e0312568ae293515689b77a4747ca2f17caca6
2021-11-29[unit test] package submissionglozow
2021-11-29[validation] de-duplicate package transactions already in mempoolglozow
As node operators are free to set their mempool policies however they please, it's possible for package transaction(s) to already be in the mempool. We definitely don't want to reject the entire package in that case (as that could be a censorship vector). We should still return the successful result to the caller, so add another result type to MempoolAcceptResult.
2021-11-29[packages] add sanity checks for package vs mempool limitsglozow
2021-11-29p2p: Don't use timestamps from inbound peersMartin Zumsande
This makes it harder for others to tamper with our adjusted time.
2021-11-29[validation] full package accept + mempool submissionglozow
2021-11-29Merge bitcoin/bitcoin#22902: tracing: utxocache tracepointsW. J. van der Laan
2bc51c5c3215398875c04456a3f3df1c07b830b5 [tracing] tracepoints to utxocache add, spent and uncache (Arnab Sen) a26e8eef43c5ff0f4a5cd44d1d331a7bd72564a5 [tracing] tracepoint for utxocache flushes (Arnab Sen) Pull request description: This PR adds some of the UTXO set cache tracepoints proposed in https://github.com/bitcoin/bitcoin/issues/20981#issuecomment-802688809. The first tracepoints were added in bitcoin#22006. tracepoint | description -- | -- `utxocache:flush` | Is called after the caches and indexes are flushed `utxocache:add` | when a new coin is added to the UTXO cache `utxocache:spent` | when a coin is spent `utxocache:uncache` | when coin is removed from the UTXO cache The tracepoints are further documented in `docs/tracing.md` and the usage is shown via the two newly added example scripts in `contrib/tracing/`. ACKs for top commit: laanwj: Code and documentation review ACK 2bc51c5c3215398875c04456a3f3df1c07b830b5 Tree-SHA512: d6b4f435d3260de4c48b36956f9311f65ab3b52cd03b1e0a4ba9cf47a774d8c4b31878e222b11e0ba5d233a68f7567f8a367b12a6392f688c10c11529341e837
2021-11-29[policy] require submitted packages to be child-with-unconfirmed-parentsglozow
Note that this code path is not ever executed yet, because ProcessNewPackage asserts test_accept=true.
2021-11-29[packages/doc] define and document package rulesglozow
Central place for putting package-related info. This document or parts of it can also be easily ported to other places if deemed appropriate.
2021-11-29test: Add test for block relay only evictionMartin Zumsande
2021-11-29refactor: Fix implicit-signed-integer-truncation in cuckoocache.hMarcoFalke
2021-11-29[unit test] context-free package checksglozow
2021-11-29[packages] add static IsChildWithParents functionglozow
2021-11-29Merge bitcoin/bitcoin#23591: refactor: Use underlying type of isminetype for ↵W. J. van der Laan
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
2021-11-29Merge bitcoin/bitcoin#23397: Avoid excessive lock contention in CCheckQueue::AddMarcoFalke
459e208276a4d1457d37bf41c977e62caf05456d Exit early for an empty vChecks in CCheckQueue::Add (Hennadii Stepanov) c43aa623435a277a692dbde784e8a7146f5573e9 Avoid excessive lock contention in CCheckQueue::Add (Hennadii Stepanov) Pull request description: This PR significantly reduces lock contention in the `CCheckQueue` class by releasing a mutex before calling `std::condition_variable::notify_one` and `std::condition_variable::notify_all`. From C++ [docs](https://en.cppreference.com/w/cpp/thread/condition_variable/notify_one): > The notifying thread does not need to hold the lock on the same mutex as the one held by the waiting thread(s); in fact doing so is a pessimization, since the notified thread would immediately block again, waiting for the notifying thread to release the lock. Related to: - #23167 - #23223 ACKs for top commit: martinus: ACK 459e208, codereview and tested. I first thought this introduced a segfault in `psbt_wallet_tests/psbt_updater_test` because that test failed for me, but thats a different issue fixed in #23403. vasild: ACK 459e208276a4d1457d37bf41c977e62caf05456d theStack: Code-review ACK 459e208276a4d1457d37bf41c977e62caf05456d Tree-SHA512: c197858656392ba3ebcd638d713cf93c9fb48b7b3bad193209490d2828f9c7e3ae4dee6f84674f2f34dceed894139562e29579ee7299e06756c8c990caddc5ed
2021-11-28[tracing] tracepoints to utxocache add, spent and uncacheArnab Sen
Signed-off-by: Arnab Sen <arnabsen1729@gmail.com>
2021-11-28[tracing] tracepoint for utxocache flushesArnab Sen
Signed-off-by: Arnab Sen <arnabsen1729@gmail.com>
2021-11-28Merge bitcoin/bitcoin#23600: doc: Tidy up nMinDiskSpace commentfanquake
fa5a886fa3a1d5bef80248a421b1e11aa991d477 doc: Tidy up nMinDiskSpace comment (MarcoFalke) Pull request description: nMinDiskSpace was removed in commit 04cca33 Also, remove incorrect doxygen comment. See https://doxygen.bitcoincore.org/class_c_chain.html#aeb563751f7362d4308c7c2cb35b834a5 ACKs for top commit: theStack: ACK fa5a886fa3a1d5bef80248a421b1e11aa991d477 Tree-SHA512: d57a6a0f0a66615bebb3cca19dc831cca38be0f18a580bb88e774384c55ccc545279b6d115b86fda70528a86630065393fb692fc2997ef87f97eec2d162808bb
2021-11-27Merge bitcoin/bitcoin#22868: wallet: Call load handlers without cs_wallet lockedSamuel Dobson
f13a22a631efe01e1fbae4ae78a4901d14ebda3c wallet: Call load handlers without cs_wallet locked (João Barbosa) Pull request description: Don't have `cs_wallet` locked while calling each `context.wallet_load_fns`. A load handler can always lock `cs_wallet` if needed. The lock was added in 1c7e25db0c to satisfy TSAN. With 44c430ffac most of the code requiring the lock is in `CWallet::AttachChain`. A comment is added to warn about wallets_mutex and cs_wallet lock ordering. ACKs for top commit: meshcollider: re-utACK f13a22a631efe01e1fbae4ae78a4901d14ebda3c ryanofsky: Code review ACK f13a22a631efe01e1fbae4ae78a4901d14ebda3c. Only change since last review is adding a lock order comment jonatack: ACK f13a22a631efe01e1fbae4ae78a4901d14ebda3c Tree-SHA512: d51976c3aae4bebc2d1997c88edff712d21fc5523801f5614062a10f826e164579973aeb1981bb1cbc243ecff6af3250362f544c02a79e5d135cbbca1704be62
2021-11-26index: Fix backwards search for bestblockMartin Zumsande
This allows filters to be reconstructed when the best known block is the Genesis block without needing to reindex. It fixes Init errors seen in #23289.
2021-11-26wallet: Split signmessage from rpcwalletMarcoFalke
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2021-11-26net: don't check if the listening socket is validVasil Dimov
Listening sockets in `CConnman::vhListenSocket` are always valid (underlying file descriptor is not `INVALID_SOCKET`).
2021-11-26doc: Tidy up nMinDiskSpace commentMarcoFalke
nMinDiskSpace was removed in commit 04cca330944f859b4ed68cb8da8a79f5206fd630 Also, remove incorrect doxygen comment. See https://doxygen.bitcoincore.org/class_c_chain.html#aeb563751f7362d4308c7c2cb35b834a5
2021-11-26Merge bitcoin/bitcoin#23517: scripted-diff: Move miner to src/nodeMarcoFalke
fa4e09924b11b0dc94e377005f86a83c09761265 refactor: Replace validation.h include with forward-decl in miner.h (MarcoFalke) fa0739a7d398aea952a07b73ef565e7c2da75898 style: Sort file list after rename (MarcoFalke) fa53e3a58c94731a90514fe92fad365a49adb10c scripted-diff: Move miner to src/node (MarcoFalke) Pull request description: It is impossible to run the miner without a node (validation, chainstate, mempool, rpc, ...). Also, the module is in the node library. Thus, it should be moved to `src/node`. Also, replace the `validation.h` include in the header with a forward-declaration. ACKs for top commit: theStack: Code-review ACK fa4e09924b11b0dc94e377005f86a83c09761265 Tree-SHA512: 791e6caa5839d8dc83b0f58f3f49bc0a7e3c1710822e8a44dede254c87b6f7531a0586fb95e8a067c181457a3895ad6041718aa2a2fac64cfc136bf04bb851d5
2021-11-25Merge bitcoin/bitcoin#21206: refactor: Make CWalletTx sync state type-safeW. J. van der Laan
d8ee8f3cd32bbfefec931724f5798cbb088ceb6f refactor: Make CWalletTx sync state type-safe (Russell Yanofsky) Pull request description: Current `CWalletTx` state representation makes it possible to set inconsistent states that won't be handled correctly by wallet sync code or serialized & deserialized back into the same form. For example, it is possible to call `setConflicted` without setting a conflicting block hash, or `setConfirmed` with no transaction index. And it's possible update individual `m_confirm` and `fInMempool` data fields without setting an overall consistent state that can be serialized and handled correctly. Fix this without changing behavior by using `std::variant`, instead of an enum and collection of fields, to represent sync state, so state tracking code is safer and more legible. This is a first step to fixing state tracking bugs https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Wallet-Transaction-Conflict-Tracking, by adding an extra margin of safety that can prevent new bugs from being introduced as existing bugs are fixed. ACKs for top commit: laanwj: re-ACK d8ee8f3cd32bbfefec931724f5798cbb088ceb6f jonatack: Code review ACK d8ee8f3cd32bbfefec931724f5798cbb088ceb6f Tree-SHA512: b9f15e9d99dbdbdd3ef7a76764e11f66949f50e6227e284126f209e4cb106af6d55e9a9e8c7d4aa216ddc92c6d5acc6f4aa4746f209bbd77f03831b51a2841c3
2021-11-25refactor: Use underlying type of isminetype for isminefilterMarcoFalke