aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-04-28script: match multisigs with up to MAX_PUBKEYS_PER_MULTISIG keysAntoine Poinsot
We were previously ruling out 17-20 pubkeys multisig, while they are only invalid under P2SH context. This makes multisigs with up to 20 keys be detected as valid by the solver. This is however *not* a policy change as it would only apply to bare multisigs, which are already limited to 3 pubkeys. Note that this does not change the sigOpCount calculation (as it would break consensus). Therefore 1-16 keys multisigs are counted as 1-16 sigops and 17-20 keys multisigs are counted as 20 sigops. Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-04-27Merge bitcoin/bitcoin#19160: multiprocess: Add basic spawn and IPC supportW. J. van der Laan
84934bf70e11fe4cda1cfda60113a54895d4fdd5 multiprocess: Add echoipc RPC method and test (Russell Yanofsky) 7d76cf667eff512043a28d4407cc89f58796c42b multiprocess: Add comments and documentation (Russell Yanofsky) ddf7ecc8dfc64cf121099fb047e1ac871de94f4c multiprocess: Add bitcoin-node process spawning support (Russell Yanofsky) 10afdf0280fa93bfffb0a7665c60dc155cd84514 multiprocess: Add Ipc interface implementation (Russell Yanofsky) 745c9cebd50fea1664efef571dc1ee1bddc96102 multiprocess: Add Ipc and Init interface definitions (Russell Yanofsky) 5d62d7f6cd48bbc4e9f37ecc369f38d5e1e0036c Update libmultiprocess library (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). --- This PR adds basic process spawning and IPC method call support to `bitcoin-node` executables built with `--enable-multiprocess`[*]. These changes are used in https://github.com/bitcoin/bitcoin/pull/10102 to let node, gui, and wallet functionality run in different processes, and extended in https://github.com/bitcoin/bitcoin/pull/19460 and https://github.com/bitcoin/bitcoin/pull/19461 after that to allow gui and wallet processes to be started and stopped independently and connect to the node over a socket. These changes can also be used to implement new functionality outside the `bitcoin-node` process like external indexes or pluggable transports (https://github.com/bitcoin/bitcoin/pull/18988). The `Ipc::spawnProcess` and `Ipc::serveProcess` methods added here are entry points for spawning a child process and serving a parent process, and being able to make bidirectional, multithreaded method calls between the processes. A simple example of this is implemented in commit "Add echoipc RPC method and test." Changes in this PR aside from the echo test were originally part of #10102, but have been split and moved here for easier review, and so they can be used for other applications like external plugins. Additional notes about this PR can be found at https://bitcoincore.reviews/19160 [*] Note: the `--enable-multiprocess` feature is still experimental, and not enabled by default, and not yet supported on windows. More information can be found in [doc/multiprocess.md](https://github.com/bitcoin/bitcoin/blob/master/doc/multiprocess.md) ACKs for top commit: fjahr: re-ACK 84934bf70e11fe4cda1cfda60113a54895d4fdd5 ariard: ACK 84934bf. Changes since last ACK fixes the silent merge conflict about `EnsureAnyNodeContext()`. Rebuilt and checked again debug command `echoipc`. Tree-SHA512: 52a948b5e18a26d7d7a09b83003eaae9b1ed2981978c36c959fe9a55abf70ae6a627c4ff913a3428be17400a3dace30c58b5057fa75c319662c3be98f19810c6
2021-04-27Merge bitcoin/bitcoin#21009: Remove RewindBlockIndex logicW. J. van der Laan
d831e711cab83c70bf2ded62fe33f484844e73dd [validation] RewindBlockIndex no longer needed (Dhruv Mehta) Pull request description: Closes #17862 Context from [original comment](https://github.com/bitcoin/bitcoin/issues/17862#issuecomment-744285188) (minor edits): `RewindBlockIndex()` is a mechanism to allow nodes to be upgraded after segwit activation, while still keeping their chainstate/datadir in a consistent state. It works as follows: - A pre-segwit (i.e. v0.13.0 or older) node is running. - Segwit activates. The pre-segwit node remains sync'ed to the tip, but is not enforcing the new segwit rules. - The user upgrades the node to a segwit-aware version (v0.13.1 or newer). - On startup, in `AppInitMain()`, `RewindBlockIndex()` is called. This walks the chain backwards from the tip, disconnecting and erasing blocks that from after segwit activation that weren't validated with segwit rules. - those blocks are then redownloaded (with witness data) and validated with segwit rules. This logic probably isn't required any more since: - Segwit activated at height 481824, when the block chain was 130GB and the total number of txs was 250 million. Today, we're at height 667704, the blockchain is over 315GB and the total number of txs is over 600 million. Even if 20% of that added data is witness data (a high estimate), then around 150GB of transactions would need to be rewound to get back to segwit activation height. It'd probably be faster to simply validate from genesis, especially since we won't be validating any scripts before the assumevalid block. It's also unclear whether rewinding 150GB of transactions would even work. It's certainly never been tested. - Bitcoin Core v0.13 is hardly used any more. https://luke.dashjr.org/programs/bitcoin/files/charts/software.html shows less than 50 nodes running it. The software was EOL on Aug 1st 2018. It's very unlikely that anyone is running 0.13 and will want to upgrade to 0.22. This PR introduces `NeedsRedownload()` which merely checks for insufficiently validated segwit blocks and requests that the user restarts the node with `-reindex`. Reindexing the block files upon restart will make the node rebuild chain state and block index from the `blk*.dat` files on disk. The node won't be able to index the blocks with `BLOCK_OPT_WITNESS`, so they will be missing from the chain and be re-downloaded, with witness data. Removing this code allows the following (done in follow-up #21090): - removal of tests using `segwitheight=-1` in `p2p_segwit.py`. - in turn, that allows us to drop support for `-segwitheight=-1`, which is only supported for that test. - that allows us to always set `NODE_WITNESS` in our local services. The only reason we don't do that is to support `-segwitheight=-1`. - that in turn allows us to drop all of the `GetLocalServices() & NODE_WITNESS` checks inside `net_processing.cpp`, since our local services would always include `NODE_WITNESS` ACKs for top commit: jnewbery: utACK d831e711cab83c70bf2ded62fe33f484844e73dd jamesob: ACK https://github.com/bitcoin/bitcoin/pull/21009/commits/d831e711cab83c70bf2ded62fe33f484844e73dd laanwj: Cursory code review ACK d831e711cab83c70bf2ded62fe33f484844e73dd. Agree with the direction of the change, thanks for simplifying the logic here. glozow: utACK d831e711cab83c70bf2ded62fe33f484844e73dd Tree-SHA512: 3eddf5121ccd081ad7f15a5c6478ef867083edc8ba0bf1ee759e87bc070ee3d2f0698a3feba8db8dc087987c8452887b6f72cff05b3e178f41cb10a515fb8053
2021-04-27Merge bitcoin/bitcoin#21746: refactor: init: mark fReset constMarcoFalke
785f9cc46a43661c63a5ec56a9e82f4ce9d42f44 refactor: init: mark fReset const (James O'Beirne) Pull request description: Small thing, but hey - it doesn't change. ACKs for top commit: theStack: Code-review ACK 785f9cc46a43661c63a5ec56a9e82f4ce9d42f44 Tree-SHA512: 3cb8d7037f517162f6315d561accc4932b0f1e340162c3283871433f2e355d57b3740c9d2e953ce33fbfa3b277c8437f91955fb70331b3fe9c8e6a8589dc2b49
2021-04-26Merge bitcoin/bitcoin#21714: refactor: Drop CCoinControl::SetNullMarcoFalke
c5a470eee1ac864b7c02b6a1669327b68411d806 refactor: Drop CCoinControl::SetNull (João Barbosa) Pull request description: The only external call to `SetNull` is changed as follow ```diff - m_coin_control->SetNull(); + m_coin_control = std::make_unique<CCoinControl>(); ``` ACKs for top commit: theStack: Code-Review ACK c5a470eee1ac864b7c02b6a1669327b68411d806 MarcoFalke: review ACK c5a470eee1ac864b7c02b6a1669327b68411d806 🍤 Tree-SHA512: 2588828720cdcf405fc4fb06f2aa17ad4eef2a645e12d820311006127e732258dd084993f17f23742f8e7f782e18289a6199dcec3690efc9b92458f90b816a8f
2021-04-25Merge bitcoin-core/gui#284: refactor: Simplify ↵Hennadii Stepanov
SendCoinsDialog::updateCoinControlState 5f438d66c1fbc0e524d12fef233f2ed2952e6f17 refactor, qt: Simplify SendCoinsDialog::updateCoinControlState (João Barbosa) Pull request description: This PR doesn't change behaviour, removes the coin control argument from `updateCoinControlState` since it's a class member. ACKs for top commit: hebasto: ACK 5f438d66c1fbc0e524d12fef233f2ed2952e6f17, I have reviewed the code and it looks OK, I agree it can be merged. jonatack: Code review ACK 5f438d66c1fbc0e524d12fef233f2ed2952e6f17 kristapsk: utACK 5f438d66c1fbc0e524d12fef233f2ed2952e6f17. Code looks correct. Tree-SHA512: 14abaa3d561f8c8854fed989b6aca886dcca42135880bac76070043f61c0042ec8967f2b83e50bbbb82050ef0f074209e97fa300cb4dc51ee182316e0846506d
2021-04-25Merge bitcoin/bitcoin#21563: net: Restrict period when cs_vNodes mutex is lockedMarcoFalke
8c8237a4a10feb2ac9ce46f67b5d14bf879b670f net, refactor: Fix style in CConnman::StopNodes (Hennadii Stepanov) 229ac1892d807a1eea5a7c24ae0fe27dc913b1bd net: Combine two loops into one, and update comments (Hennadii Stepanov) a3d090d1103cd6c25daf07afdf4e65febca6d3f7 net: Restrict period when cs_vNodes mutex is locked (Hennadii Stepanov) Pull request description: This PR restricts the period when the `cs_vNodes` mutex is locked, prevents the only case when `cs_vNodes` could be locked before the `::cs_main`. This change makes the explicit locking of recursive mutexes in the explicit order redundant. ACKs for top commit: jnewbery: utACK 8c8237a4a10feb2ac9ce46f67b5d14bf879b670f vasild: ACK 8c8237a4a10feb2ac9ce46f67b5d14bf879b670f ajtowns: utACK 8c8237a4a10feb2ac9ce46f67b5d14bf879b670f - logic seems sound MarcoFalke: review ACK 8c8237a4a10feb2ac9ce46f67b5d14bf879b670f 👢 Tree-SHA512: a8277924339622b188b12d260a100adf5d82781634cf974320cf6007341f946a7ff40351137c2f5369aed0d318f38aac2d32965c9b619432440d722a4e78bb73
2021-04-23multiprocess: Add echoipc RPC method and testRussell Yanofsky
Add simple interfaces::Echo IPC interface with one method that just takes and returns a string, to test multiprocess framework and provide an example of how it can be used to spawn and call between processes.
2021-04-23Merge bitcoin/bitcoin#21732: MOVEONLY: Move common init code to init/commonMarcoFalke
615965cfd1ef1e0627d69970d99bdfedb9176833 Move common package version code to init/common (Russell Yanofsky) 5bed2ab42c4f1a820468f7005ce62e39001f6611 Move common logging start code to init/common (Russell Yanofsky) 1fb7fcfa52569a652d3ea55c210b725e60b7d86f Move common logging GetArgs code to init/common (Russell Yanofsky) 90469c16906ab451bb1250df5e51563870a7ef3b Move common logging AddArg code to init/common (Russell Yanofsky) 387c4cf5887bfdaf1606e1b287d901e4c449514f Move common sanity check code to init/common (Russell Yanofsky) a67b54855b294802d52f09fa60d3f63550cbada7 Move common global init code to init/common (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). --- This change is move-only and can be easily reviewed with `--color-moved=dimmed_zebra`. The moves are needed to avoid duplicating common init code between different binaries (`bitcoin-node`, `bitcoin-wallet`, etc) in #10102. In #10102, each binary has it's own init file (`src/init/bitcoin-node.cpp`, `src/init/bitcoin-wallet.cpp`) so this PR moves the common code to `src/init/common.cpp`. ACKs for top commit: MarcoFalke: review ACK 615965cfd1ef1e0627d69970d99bdfedb9176833 🖱 practicalswift: cr ACK 615965cfd1ef1e0627d69970d99bdfedb9176833: dimmed zebra looks correct Tree-SHA512: 859e1d86aee17eb50a49d806cf62d30d12f6b15018e41c096da41d7e535a9d2d088481cb340fee59e6c68e512a74b61c7146f2683465f553dc4953bf32f2a7b4
2021-04-23multiprocess: Add comments and documentationRussell Yanofsky
2021-04-23multiprocess: Add bitcoin-node process spawning supportRussell Yanofsky
Add bitcoin-node startup code to let it spawn and be spawned by other processes
2021-04-23multiprocess: Add Ipc interface implementationRussell Yanofsky
2021-04-23multiprocess: Add Ipc and Init interface definitionsRussell Yanofsky
2021-04-22net, refactor: Fix style in CConnman::StopNodesHennadii Stepanov
2021-04-22net: Combine two loops into one, and update commentsHennadii Stepanov
2021-04-22net: Restrict period when cs_vNodes mutex is lockedHennadii Stepanov
2021-04-22Merge bitcoin/bitcoin#21564: net: Avoid calling getnameinfo when formatting ↵MarcoFalke
IPv4 addresses in CNetAddr::ToStringIP 58580a827d10c0675c3483e2aeca1d3ab8050ae0 net: Avoid calling getnameinfo when formatting IPv4 addresses in CNetAddr::ToStringIP (practicalswift) 58580573843858068db69a378b6e9363889b1f6d net: Add IPv4ToString (we already have IPv6ToString) (practicalswift) Pull request description: Avoid calling `getnameinfo` when formatting IPv4 addresses in `CNetAddr::ToStringIP`. ACKs for top commit: naumenkogs: ACK 58580a827d10c0675c3483e2aeca1d3ab8050ae0 0xB10C: ACK 58580a827d10c0675c3483e2aeca1d3ab8050ae0 vasild: ACK 58580a827d10c0675c3483e2aeca1d3ab8050ae0 Tree-SHA512: 25e3c416acb74908d001baf1cf64c04cbc0d94ce8e7ce5a601f1343062d5d748cb406a3404e6f2b6e7e979c6300b38439e1bfd70ea90ec8c0ec2d7568f09fbcd
2021-04-21refactor: init: mark fReset constJames O'Beirne
2021-04-21[validation] RewindBlockIndex no longer neededDhruv Mehta
Instead of rewinding blocks, we request that the user restarts with -reindex
2021-04-21Merge bitcoin/bitcoin#21719: refactor: Add and use EnsureConnman in rpc codeMarcoFalke
fafb68add5e16e8bd5b9428bcffcaee2639747cf refactor: Add and use EnsureConnman in rpc code (MarcoFalke) faabeb854a6e46b46e4f26b22dc2c81e68e2d863 refactor: Mark member functions const (MarcoFalke) Pull request description: This removes the 10 occurrences of `throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");` and replaces them with `EnsureConnman`. ACKs for top commit: jarolrod: re-ACK fafb68add5e16e8bd5b9428bcffcaee2639747cf theStack: ACK fafb68add5e16e8bd5b9428bcffcaee2639747cf ryanofsky: Code review ACK fafb68add5e16e8bd5b9428bcffcaee2639747cf Tree-SHA512: 84c63cfe31e548645d906f7191a3526c7bea99ed0d54c2a75c2041452a44fe149ede343d8e1943b0e7770816c828bb047dfec8bc541a1f2b89920a126ee54d68
2021-04-20Merge bitcoin-core/gui#263: Revamp context menusHennadii Stepanov
16c157de3c316517e095994fa8d526253225a672 qt, refactor: Use better QMenu::addAction overloaded function (Hennadii Stepanov) 79311750b58d650d49a3f0edd59d31dd132ab8c0 qt: Do not assign Alt+<KEY> shortcuts to context menu actions (Hennadii Stepanov) 963e12058f3ca3cdaeefd9aa5a8305fa41afd1a0 qt: Drop menu separator that separates nothing (Hennadii Stepanov) 1398a6536c710368d9f1d0cf6e280fe63d07c9f0 qt, refactor: Make AddressBookPage::deleteAction a local variable (Hennadii Stepanov) Pull request description: This PR: 1. removes useless `Alt` + `<KEY>` shortcuts from context menu items 2. replaces 3 lines of code with the only call of [`QMenu::addAction`](https://doc.qt.io/qt-5/qmenu.html#addAction-5) for each context menu item (it became possible since https://github.com/bitcoin/bitcoin/pull/21286 was merged) 3. makes other minor cleanups No behavior change. ACKs for top commit: kristapsk: ACK 16c157de3c316517e095994fa8d526253225a672 promag: Code review ACK 16c157de3c316517e095994fa8d526253225a672. Nice code cleanup that takes advantage of more recent Qt API. jarolrod: ACK 16c157de3c316517e095994fa8d526253225a672 Tree-SHA512: e5555fe957058cc67b351aaf9f09fe3635edb2d07a2223d3093913a25607ae538f0a2fde84c0b0cd43e7475b248949548eb4a5d4b21d8f7391fa2fa8541c04ff
2021-04-20Merge #21694: build: Use XLIFF file to provide more context to Transifex ↵W. J. van der Laan
translators 35d52397e72f3ab96a7797148666b501d50b445d Add bitcoin_en.xlf intermediate translation file to the repo (Hennadii Stepanov) 99686b65195fe990144be1a6326061e9c6ae506c qt [experimental]: Add a translation comment and a disambiguation string (Hennadii Stepanov) f959b75e8c5964dec59a1dce937ee2244cce33df build: Add Qt lconvert tool to depends (Hennadii Stepanov) 2045e4cdd26920665300f21be5b08fe66bde4a41 build: Use XLIFF file to provide more context to Transifex translators (Hennadii Stepanov) Pull request description: Currently, only a class name is provided to the Transifex translators as a context. Neither `disambiguation` parameter of the `tr()` function nor [translator comments](https://doc.qt.io/qt-5/i18n-source-translation.html#translator-comments), being included as XML elements to `*.ts` translation files, are not parsed by the Transifex due to its [limited support](https://docs.transifex.com/formats/qt-ts) of such files. This PR makes possible to provide all of the context details via an intermediate [XLIFF](https://docs.transifex.com/formats/xliff) translation file. With this PR `make -C src translate` produces the `src/qt/locale/bitcoin_en.xlf` file which must be provided to the Transifex as a translation source instead of `src/qt/locale/bitcoin_en.ts`. Closes #21465. An example translatable string with additional `<context>` and `<note>` XML elements: https://github.com/bitcoin/bitcoin/blob/35d52397e72f3ab96a7797148666b501d50b445d/src/qt/locale/bitcoin_en.xlf#L126-L132 ACKs for top commit: laanwj: ACK 35d52397e72f3ab96a7797148666b501d50b445d Tree-SHA512: cc19e3c09501d240153550d75d7697b5f824cb553f4223beaff66be4d3e6f98d7b5bb14f2d1e1d5ad014eaaa498a7f672e7ff0054ced53ace8c1e6f7e49f6d8a
2021-04-20Add bitcoin_en.xlf intermediate translation file to the repoHennadii Stepanov
As the bitcoin_en.xlf file is created by the `make -C src translate` command, other translation-related files are also updated.
2021-04-20qt [experimental]: Add a translation comment and a disambiguation stringHennadii Stepanov
The goal is to see the way the Transifex presents the added items to translators using an intermediate XLIFF translation file.
2021-04-20build: Use XLIFF file to provide more context to Transifex translatorsHennadii Stepanov
Details: https://docs.transifex.com/formats/xliff
2021-04-20Merge #21595: cli: create -addrinfoW. J. van der Laan
06c43201a714b0426cc68b2fd5c681e5df10af99 cli: use C++17 std::array class template argument deduction (CTAD) (Jon Atack) edf3167151f7a6d08cf733b4e230e2d745819ac8 addrinfo: raise helpfully on server error or incompatible server version (Jon Atack) bb85cbc4f7638a85049658ed951a0e06e7959cd4 doc: add cli -addrinfo release note (Jon Atack) 5056a37624b64588b277419f7ed8c325477a8ec7 cli: add -addrinfo command (Jon Atack) db4d2c282afd46709792aaf2d36ffbfc1745b776 cli: create AddrinfoRequestHandler class (Jon Atack) Pull request description: While looking at issue #21351, it turned out that the problem was a lack of tor v3 addresses known to the node. It became clear (e.g. https://github.com/bitcoin/bitcoin/issues/21351#issuecomment-811004779) that a CLI command returning the number of addresses the node knows per network (with a tor v2 / v3 breakdown) would be very helpful. This patch adds that. `-addrinfo` is useful to see if your node knows enough addresses in a network to use options like `-onlynet=<network>`, or to upgrade to the upcoming tor release that no longer supports tor v2, for which you'll need to be sure your node knows enough tor v3 peers. ``` $ bitcoin-cli --help | grep -A1 addrinfo -addrinfo Get the number of addresses known to the node, per network and total. $ bitcoin-cli -addrinfo { "addresses_known": { "ipv4": 14406, "ipv6": 2511, "torv2": 5563, "torv3": 2842, "i2p": 8, "total": 25330 } } $ bitcoin-cli -addrinfo 1 error: -addrinfo takes no arguments ``` This can be manually tested, for example, with commands like this: ``` $ bitcoin-cli getnodeaddresses 0 | jq '.[] | (select(.address | contains(".onion")) | select(.address | length <= 22)) | .address' | wc -l 5563 $ bitcoin-cli getnodeaddresses 0 | jq '.[] | (select(.address | contains(".onion")) | select(.address | length > 22)) | .address' | wc -l 2842 $ bitcoin-cli getnodeaddresses 0 | jq '.[] | .address' | wc -l 25330 ``` ACKs for top commit: laanwj: Tested ACK 06c43201a714b0426cc68b2fd5c681e5df10af99 Tree-SHA512: b668b47718a4ce052aff218789f3da629bca730592c18fcce9a51034d95a0a65f8e6da33dd47443cdd8f60c056c02696db175b0fe09a688e4385a76c1d8b7aeb
2021-04-20cli: use C++17 std::array class template argument deduction (CTAD)Jon Atack
Credit to João Barbosa (promag) for the suggestions. Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2021-04-20doc: Fix doxygen comment silent merge conflict in descriptor.cppW. J. van der Laan
It looks like #21238 introduced a silent merge conflict in the documentation, which fails with `-Wdocumentation` in the CI.
2021-04-20Merge #21238: A few descriptor improvements to prepare for Taproot supportW. J. van der Laan
0b188b751f970027c52729e0c223cc9257669322 Clean up context dependent checks in descriptor parsing (Pieter Wuille) 33275a96490445e293c322a29a3b146ccb91083c refactor: move uncompressed-permitted logic into ParsePubkey* (Pieter Wuille) 17e006ff8d5e42f22474c5191d1b745bbc97571f refactor: split off subscript logic from ToStringHelper (Pieter Wuille) 6ba5dda0c9de75196c6a427d9e59d39e5a41bff7 Account for key cache indices in subexpressions (Pieter Wuille) 4441c6f3c046c0b28ce3f0ca6d938af71d797586 Make DescriptorImpl support multiple subscripts (Pieter Wuille) a917478db0788b244c0c799b98bf67a94df7035e refactor: move population of out.scripts from ExpandHelper to MakeScripts (Pieter Wuille) 84f3939ece9f4901141b28fd2dd6e3899d01d66e Remove support for subdescriptors expanding to multiple scripts (Pieter Wuille) Pull request description: These are a few refactors and non-invasive improvements to the descriptors code to prepare for adding Taproot descriptors. None of the commits change behavior in any way, except the last one which improves error reporting a bit. ACKs for top commit: S3RK: reACK 0b188b7 Sjors: re-ACK 0b188b7 achow101: re-ACK 0b188b751f970027c52729e0c223cc9257669322 Tree-SHA512: cb4e999134aa2bace0e13d4883454c65bcf1369e1c8585d93cc6444ddc245f3def5a628d58af7dab577e9d5a4a75d3bb46f766421fcc8cc5c85c01a11f148b3f
2021-04-20Merge bitcoin/bitcoin#21691: test: Check that no versionbits are re-usedMarcoFalke
fa8eaee6a8531db970cc84436bf2ae8150a58642 test: Run versionbits_sanity for all chains (MarcoFalke) faec1e9ee1f12612831ad5b0f0a767d87bd2d024 test: Address outstanding versionbits_test feedback (MarcoFalke) fad4167871c3c9fde462e64e3ef3be937e585084 test: Check that no versionbits are re-used (MarcoFalke) Pull request description: ACKs for top commit: jnewbery: Code review ACK fa8eaee6a8531db970cc84436bf2ae8150a58642 ajtowns: ACK fa8eaee6a8531db970cc84436bf2ae8150a58642 code review only Tree-SHA512: e99ffcca8970921fd07fa9e04cf1ea2515a317409865d34ddfd70be0f0b0616b29d1fad58262d96a3c3418c0cf7018a6a955802a178b8f78f6ecfaa30a37d91c
2021-04-20Merge #21244: Move GetDataDir to ArgsManagerfanquake
bb8d1c6e029a2fd01387599d2ff3bfc879a8ada5 Change ClearDataDirPathCache() to ArgsManager.ClearPathCache(). (Kiminuo) b4190eff72c00e384ad238f9c2f10c8b91be969b Change GetBlocksDir() to ArgsManager.GetBlocksDirPath(). (Kiminuo) 83292e2a700afbf39936bd67bb89fab5398d0066 scripted-diff: Modify unit tests to use the ArgsManager in the BasicTestingSetup class instead of implicitly relying on gArgs. (Kiminuo) 55c68e6f011ee604c8a65b9bca668eb4dec452aa scripted-diff: Replace m_args with m_local_args in getarg_tests.cpp (Kiminuo) 511ce3a26b3b78e14acd0d85496b5422a236cf63 BasicTestingSetup: Add ArgsManager. (Kiminuo) 1cb52ba0656e78ca6c2ef84b1558198ad113b76a Modify "util_datadir" unit test to not use gArgs. (Kiminuo) 1add318704108faa98f5b1b8e9c96d960e9d23a8 Move GetDataDir(fNetSpecific) implementation to ArgsManager. (Kiminuo) 70cdf679f8e665dbdc3301873a0267fe9faa72cd Move StripRedundantLastElementsOfPath before ArgsManager class. (Kiminuo) Pull request description: This PR attempts to contribute to "Remove gArgs" (#21005). Main changes: * `GetDataDir()` function is moved to `ArgsManager.GetDataDirPath()`. * `GetBlocksDir()` function is moved to `ArgsManager.GetBlocksDirPath()`. ACKs for top commit: ryanofsky: Code review ACK bb8d1c6e029a2fd01387599d2ff3bfc879a8ada5. Just minor const/naming changes and splitting/scripting commits since last review MarcoFalke: review ACK bb8d1c6e029a2fd01387599d2ff3bfc879a8ada5 📓 hebasto: re-ACK bb8d1c6e029a2fd01387599d2ff3bfc879a8ada5, addressed comments, and two commits made scripted-diffs since my [previous](https://github.com/bitcoin/bitcoin/pull/21244#pullrequestreview-638270583) review. Tree-SHA512: ba9408c22129d6572beaa103dca0324131766f06d562bb7d6b9e214a0a4d40b0216ce861384562bde24b744003b3fbe6fac239061c8fd798abd3981ebc1b9019
2021-04-20Merge #21728: remove executable flag for src/net_processing.cppfanquake
f2f2541ee7ad36191515ff351b667fe12a2ab871 remove executable flag for src/net_processing.cpp (Sebastian Falbesoner) Pull request description: The file permissions for `src/net_processing.cpp` have been changed in #21713, as discovered by fanquake (https://github.com/bitcoin/bitcoin/pull/21713#issuecomment-822245960). This PR removes the executable flag again. ACKs for top commit: kiminuo: ACK f2f2541ee7ad36191515ff351b667fe12a2ab871 :) jnewbery: ACK f2f2541ee7ad36191515ff351b667fe12a2ab871 promag: ACK f2f2541ee7ad36191515ff351b667fe12a2ab871. Tree-SHA512: 1d5a62afb1152029e69fccea2ae53dcb262a91724a5c03dfc4de8c409b280814d0c211c2f9a71f1a6e927f4ed571ba4ac311de9de8ebb797eaf1051674241bdb
2021-04-19refactor: Add and use EnsureConnman in rpc codeMarcoFalke
2021-04-19Move common package version code to init/commonRussell Yanofsky
2021-04-19Merge bitcoin-core/gui#276: Elide long strings in their middle in the Peers tabHennadii Stepanov
4e0613369f446b0a57783bf9e7258fec6c474981 qt: Elide long strings in their middle in the Peers tab (Hennadii Stepanov) Pull request description: The eliding of long addresses (Onion v3 etc) in the Peers tab in their middle was [discussed](https://github.com/bitcoin-core/gui/issues/262#issuecomment-810490396) in #262. On master (f0fa32450ec35056b3e1025262aeaef4a24c35ee): ![DeepinScreenshot_select-area_20210410141435](https://user-images.githubusercontent.com/32963518/114267903-24eea400-9a07-11eb-8c80-99f68d5cc522.png) With this PR: ![DeepinScreenshot_select-area_20210410140430](https://user-images.githubusercontent.com/32963518/114267796-83675280-9a06-11eb-921f-ca47c2075496.png) This PR suggests the minimal diff to achieve the goal. OTOH, this change in behavior is common for all columns in the Peers table, but it seems harmless. ACKs for top commit: jarolrod: tACK 4e0613369f446b0a57783bf9e7258fec6c474981 promag: Code review ACK 4e0613369f446b0a57783bf9e7258fec6c474981. Tree-SHA512: 1d5a62afb1152029e69fccea2ae53dcb262a91724a5c03dfc4de8c409b280814d0c211c2f9a71f1a6e927f4ed571ba4ac311de9de8ebb797eaf1051674241bdb
2021-04-19Move common logging start code to init/commonRussell Yanofsky
2021-04-19Move common logging GetArgs code to init/commonRussell Yanofsky
2021-04-19Move common logging AddArg code to init/commonRussell Yanofsky
2021-04-19Move common sanity check code to init/commonRussell Yanofsky
2021-04-19Move common global init code to init/commonRussell Yanofsky
2021-04-19Merge bitcoin/bitcoin#21280: test: bug fix in transaction_testsMarcoFalke
b109bde46a8730afbc09c107b802a2c321293f4b [test] check that mapFlagNames is up to date (glozow) 5d3ced72f9b5f36db1a76bd8bc918d11b87dfd72 [test] remove unnecessary OP_1s from invalid tests (glozow) 5aee73d1759bcc0d1e951776942e616843934af1 [test] minor improvements / followups (glozow) 8a365df5586b36d1772c78069f9d93c56a81df6f [test] fix bug in ExcludeIndividualFlags (glozow) 8cac2923f57ac33848ff41b74c3be520b75936df [test] remove invalid test from tx_valid.json (glozow) Pull request description: This is a followup to #19698. - There was a bug in the `ExcludeIndividualFlags` function which is fixed here. - Fixing this bug also showed that there is a test that's supposed to fail (already existing in tx_invalid.json) in tx_valid.json, so I removed it. Other than that, the tests should all pass. - Also implements a few suggestions I received offline: removing the `OP_1`s from the invalid tests (similar to https://github.com/bitcoin/bitcoin/commit/19db590d044efe7d474a16720e5b56e7b55db54c), comments, and style. - A few other small fixes, like adding asserts, putting all the flags in `mapFlagNames`, better error messages ACKs for top commit: jnewbery: utACK b109bde46a8730afbc09c107b802a2c321293f4b Tree-SHA512: 7233a8c0f1ae1172fac8000ea6e05384ecf79074c39948d118464868505c7f02f17e96503c81bd05c07adb2087648a5d93d9899e16fdefa6b7efcb51319444a9
2021-04-19remove executable flag for src/net_processing.cppSebastian Falbesoner
2021-04-19Merge #21679: rpc: Keep default argument value in correct typeMarcoFalke
bee56c78e94417f89b1f48682404e2821b57bdec rpc: Check default value type againts argument type (João Barbosa) f81ef4303e057e85aa24772c865287c17ffa4350 rpc: Keep default argument value in correct type (João Barbosa) Pull request description: Store default values of RPC arguments in the corresponding type instead of a string. The value is then serialized when the help output is needed. This change simplifies #20017. The following examples illustrates how to use the new `RPCArg::Default` and `RPCArg::DefaultHint`: ```diff - {"verbose", RPCArg::Type::BOOL, /* default */ "false", "True for a json object, false for array of transaction ids"} + {"verbose", RPCArg::Type::BOOL, RPCArg::Default(false), "True for a json object, false for array of transaction ids"} ``` ```diff - {"nblocks", RPCArg::Type::NUM, /* default */ "one month", "Size of the window in number of blocks"} + {"nblocks", RPCArg::Type::NUM, RPCArg::DefaultHint("one month"), "Size of the window in number of blocks"} ``` No behavior change is expected. ACKs for top commit: LarryRuane: ACK bee56c78e94417f89b1f48682404e2821b57bdec MarcoFalke: ACK bee56c78e94417f89b1f48682404e2821b57bdec 🦅 Tree-SHA512: c47d78c918e996d36631d4ad3c933b270a34c5b446b8d736be94cf4a0a7b8c0e33d954149ec786cf9550639865b79deb6a130ad044de6030f95aac33f524293a
2021-04-19Merge #21713: Refactor ProcessNewBlock to reduce code duplicationMarcoFalke
9a0653553a0ec403b4e7c6713466e0c7fa10ec94 Refactor ProcessNewBlock to reduce code duplication (R E Broadley) Pull request description: There are probably a few issues with this code (maybe there's even a reason this code is duplicated as it currently is), so apologies in advance that I'm still a little (maybe very) bad with C++ ACKs for top commit: MarcoFalke: ACK 9a0653553a0ec403b4e7c6713466e0c7fa10ec94 💻 promag: Code review ACK 9a0653553a0ec403b4e7c6713466e0c7fa10ec94. theStack: Code-review ACK 9a0653553a0ec403b4e7c6713466e0c7fa10ec94 🌴 Tree-SHA512: f8634ffad4b2370204d1a0945db4e27248b9e579d9912784da432b8ee3303cae424fa9f7500000dcfb31e6d29d04a8f7d322d17a6fe3d4adaddd10c539458a8c
2021-04-19Merge #21718: rpc: Improve error message for getblock invalid datatype.fanquake
a41149426168b8ea96099f10576022c6a09033d1 rpc: Improve getblock error message for invalid data type. (klementtan) Pull request description: Improve error messages for getblock invalid datatype. fixes: #21717 ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/21718/commits/a41149426168b8ea96099f10576022c6a09033d1 theStack: ACK a41149426168b8ea96099f10576022c6a09033d1 promag: Code review ACK a41149426168b8ea96099f10576022c6a09033d1. Tree-SHA512: 6e7d8290681e8ab375629f81669d0f8e0c21f9eb7ed9e2455cd19ea013e69b2d95fa7a9ee795315b2d5c60c96035c6cefc3d6e1039a06fd88c1dc7fe275ee6a1
2021-04-18refactor, qt: Simplify SendCoinsDialog::updateCoinControlStateJoão Barbosa
2021-04-18refactor: Drop CCoinControl::SetNullJoão Barbosa
2021-04-18Change ClearDataDirPathCache() to ArgsManager.ClearPathCache().Kiminuo
2021-04-18Change GetBlocksDir() to ArgsManager.GetBlocksDirPath().Kiminuo
2021-04-18scripted-diff: Modify unit tests to use the ArgsManager in the ↵Kiminuo
BasicTestingSetup class instead of implicitly relying on gArgs. -BEGIN VERIFY SCRIPT- git ls-files src/test/dbwrapper_tests.cpp src/test/denialofservice_tests.cpp src/test/flatfile_tests.cpp src/test/fs_tests.cpp src/test/settings_tests.cpp src/test/util_tests.cpp | xargs sed -i 's/GetDataDir()/m_args.GetDataDirPath()/g'; -END VERIFY SCRIPT-