aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
AgeCommit message (Collapse)Author
2022-01-06[moveonly] Move MapIntoRange() to separate util/fastrange.hPieter Wuille
2022-01-06Merge bitcoin/bitcoin#23828: scripted-diff: Rename libbitcoin_server.a to ↵MarcoFalke
libbitcoin_node.a 172096e9dd5b0e04b88ffd6dc1f6d43190070e14 scripted-diff: Rename libbitcoin_server.a to libbitcoin_node.a (Russell Yanofsky) Pull request description: Goal along with namespacing PR #23497 is to make code organization more obvious and have `src/node/` code in `node::` namespace in `libbitcoin_node.a` library ACKs for top commit: MarcoFalke: cr ACK 172096e9dd5b0e04b88ffd6dc1f6d43190070e14 Tree-SHA512: a2e787eeaa3ab769b0f5376473072cae584d237aa8b67b677bea833bb36b0134a0eca17eb01722389639473b8463f4953bc3a5e4801a6b2c8965ac1075cba005
2021-12-20scripted-diff: Rename libbitcoin_server.a to libbitcoin_node.aRussell Yanofsky
Goal along with namespacing PR #23497 is to have src/node/ code in node:: namespace in libbitcoin_node.a library -BEGIN VERIFY SCRIPT- bash -c ' # Bash shell needed for brace expansion {a,b} git mv build_msvc/libbitcoin_{server,node} git mv build_msvc/libbitcoin_node/libbitcoin_{server,node}.vcxproj.in ren() { git grep -l "$1" src build_msvc | xargs sed -i "s/$1/$2/g"; } ren LIBBITCOIN_{SERVER,NODE} ren libbitcoin_{server,node} ' -END VERIFY SCRIPT-
2021-12-17Move AdditionOverflow to util, Add CheckedAdd with unit testsMarcoFalke
2021-12-10Merge bitcoin/bitcoin#23280: init: Coalesce Chainstate loading sequence ↵MarcoFalke
between {,non-}unittest codepaths 7f15eff2ddd86034e84a19413e1a42883987f660 style-only: Remove redundant scope in *Chainstate (Carl Dong) 89bec827fdea1cedd560be85201f04e0a78aa48d Collapse the 2 cs_main locks in LoadChainstate (Carl Dong) 3b1584b794499158e0df07bd1bee1b803c568614 Remove all #include // for * comments (Carl Dong) 9a5a5a3d08b2c130ab9147914739ff3583b0dc84 test/setup: Use LoadChainstate (Carl Dong) c541da0d62eaf5e96eca00d7508899f98bdfc1bc node/chainstate: Add options for in-memory DBs (Carl Dong) ceb979034184345a662be4e3b327a573fbb31c63 node/caches: Remove intermediate variables (Carl Dong) ac4bf138b849a8544798f3891d6623803040c265 node/caches: Extract cache calculation logic (Carl Dong) 15f2e33bb3d1ad3bc997f6a84956337f46495091 validation: VerifyDB only needs Consensus::Params (Carl Dong) 4da9c076d1cf12728730bb1f7e8906d4e9bfaba5 node/chainstate: Decouple from ShutdownRequested (Carl Dong) 05441c2dc5f60e2025476d8ec94c9025032d118c node/chainstate: Decouple from GetTime (Carl Dong) 2414ebc18b8bebf79c47e58a4293d0fc6420a811 init: Delay RPC block notif until warmup finished (Carl Dong) 8d466a8504bfb81ce8699d650aa72ec9cc8b0a54 Move -checkblocks LogPrintf to AppInitMain (Carl Dong) aad8d597890c3707ae96fdb2b9fadc270ca574dd node/chainstate: Reduce coupling of LogPrintf (Carl Dong) b345979a2b03b671c0984edd7e48e0baec2e2f34 node/chainstate: Decouple from concept of uiInterface (Carl Dong) ca7c0b934db68acdc410e3a82f1ed898382da2e5 Split off VerifyLoadedChainstate (Carl Dong) adf4912d77496b9a243476c5944528f95641f14d node/chainstate: Remove do/while loop (Carl Dong) 975235ca0a8f5bcf9df880698b3b0d4bbde9f7fb Move init logistics message for BAD_GENESIS_BLOCK to init.cpp (Carl Dong) 8715658983a0a07c56513acd8ded8dfc59c5c169 Move mempool nullptr Assert out of LoadChainstate (Carl Dong) 9162a4f93ef5aeb57fe11a6e09f5881cf431f5e6 node/chainstate: Decouple from concept of NodeContext (Carl Dong) c7a5c46e6fd6d6ff46ca7a65fc3f0fff3cbdb24e node/chainstate: Decouple from ArgsManager (Carl Dong) ae9121f958a4124ea6238cad0c3f2acb8b9eb4bb node/chainstate: Decouple from stringy errors (Carl Dong) cbac28b72f5b831f6f84b7628f73e85627af3d94 node/chainstate: Decouple from GetTimeMillis (Carl Dong) cb64af9635a9553e335f2dc0b1cca20c6bbd0933 node: Extract chainstate loading sequence (Carl Dong) Pull request description: This PR: 1. Coalesce the Chainstate loading sequence between `AppInitMain` and `*TestingSetup` (which makes it more tested) 2. Makes the Chainstate loading sequence reusable in preparation for future work extracting out our consensus engine. Code-wise, this PR: 1. Extracts `AppInitMain`'s Chainstate loading sequence into a `::LoadChainstateSequence` function 2. Makes this `::LoadChainstateSequence` function reusable by 1. Decoupling it from various concepts (`ArgsManager`, `uiInterface`, etc) 2. Making it report errors using an `enum` rather than by setting a `bilingual_str` 3. Makes `*TestingSetup` use this new `::LoadChainstateSequence` Reviewers: Aside from commentary, I've also included `git diff` flags of interest in the commit messages which I hope will aid review! ACKs for top commit: ryanofsky: Code review ACK 7f15eff2ddd86034e84a19413e1a42883987f660. Thanks for updates! MarcoFalke: review ACK 7f15eff2ddd86034e84a19413e1a42883987f66 💳 Tree-SHA512: fb9a6cbd1c511a52b477c62a5e68e53a8be5dec2fff0e44a279966afb91efbab44bf1fe7c6b1519f8464ecc25f42dd4bae8e1efbf55ee91fc90fa0b92e3a83e2
2021-12-08Merge bitcoin/bitcoin#20295: rpc: getblockfrompeerMarcoFalke
dce8c4c38111556ca480aa0e63c46b71f66b508f rpc: getblockfrompeer (Sjors Provoost) b884ababc29ce963826d8a4327ed6a5e629ff175 rpc: move Ensure* helpers to server_util.h (Sjors Provoost) Pull request description: This adds an RPC method to fetch a block directly from a peer. This can used to fetch stale blocks with lower proof of work that are normally ignored by the node (`headers-only` in `getchaintips`). Usage: ``` bitcoin-cli getblockfrompeer HASH peer_n ``` Closes #20155 Limitations: * you have to specify which peer to fetch the block from * the node must already have the header ACKs for top commit: jnewbery: ACK dce8c4c38111556ca480aa0e63c46b71f66b508f fjahr: re-ACK dce8c4c38111556ca480aa0e63c46b71f66b508f Tree-SHA512: 843ba2b7a308f640770d624d0aa3265fdc5c6ea48e8db32269b96a082b7420f7953d1d8d1ef2e6529392c7172dded9d15639fbc9c24e7bfa5cfb79e13a5498c8
2021-12-08MOVEONLY: Move rpcwallet to rpc/walletSamuel Dobson
2021-12-08MOVEONLY: Move spending RPCs to spend.cppSamuel Dobson
2021-12-08MOVEONLY: Move balance and utxo RPCs to coins.cppSamuel Dobson
2021-12-08MOVEONLY: Move address related functions from rpcwallet to addresses.cppSamuel Dobson
2021-12-08MOVEONLY: Move transaction related wallet RPCs to transactions.cppSamuel Dobson
2021-12-07node/caches: Extract cache calculation logicCarl Dong
I strongly recommend reviewing with the following git-diff flags: --color-moved=dimmed_zebra --color-moved-ws=allow-indentation-change [META] In a future commit, this function will be re-used in TestingSetup so that the behaviour matches across test and non-test init codepaths.
2021-12-06node: Extract chainstate loading sequenceCarl Dong
I strongly recommend reviewing with the following git-diff flags: --color-moved=dimmed_zebra --color-moved-ws=allow-indentation-change [META] This commit is intended to be as close to a move-only commit as possible, and lingering ugliness will be resolved in subsequent commits. A few variables that are passed in by value instead of by reference deserve explanation: - fReset and fReindexChainstate are both local variables in AppInitMain and are not modified in the sequence - fPruneMode, despite being a global, is only modified in AppInitParameterInteraction, long before LoadChainstate is called ---- [META] This semantic will change in a future commit named "node/chainstate: Decouple from stringy errors"
2021-12-03MOVEONLY: Move wallet encryption RPCs to encrypt.cppSamuel Dobson
2021-12-03MOVEONLY: Move rpcdump.cpp to wallet/rpc/backup.cppSamuel Dobson
2021-12-02rpc: move Ensure* helpers to server_util.hSjors Provoost
2021-12-01Introduce wallet/rpc/utilSamuel Dobson
2021-11-26wallet: Split signmessage from rpcwalletMarcoFalke
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
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-25Merge bitcoin/bitcoin#23152: build: add `--enable-lto` configuration optionfanquake
68e5aafde3e87c16da95410a0474f38f589afb36 build: add `--enable-lto` configuration option (fanquake) Pull request description: It's been 5 years since using LTO was first suggested for use when building Bitcoin Core, and it's time to revisit it again. Compilers, and their LTO implementations, have matured, and Bitcoin Core has come a long way in terms of pruning dependencies which may have proved troublesome (i.e Boost previously had issues when using LTO). We'll have even less Boost code after moving to `std::filesystem` (#20744). Experimenting with LTO came up on IRC last night: > sipa: jamesob: i'm interested in knowing whether "-flto" and/or "-fdata-sections -ffunction-sections -Wl,--gc-sections" are possible/beneficial with our current compiler suite; what would be a good way to have your test infrastructure benchmark things? So this PR just adds the bare minimum to make it easier to configure, compile and perform some bench-marking using `-flto`. This PR doesn't do anything depends wise, however if we decide this is what we want to do, I'll expand the changes here. I had previously had a PR open (#18605) to perform link time garbage collection (`-ffunction-sections -fdata-sections` & `-Wl,--gc-sections`), however moving straight to using LTO would be preferable. Note that our minimum required set of compilers, GCC 8.1 and Clang 7, all support the `-flto` option. Related #18579. Previous discussion: #10616, #14277. Previous related PRs: #10800 (`-flto`), #16791 (ThinLTO). Guix build: ```bash bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum 1f3a7c5be4169aaa444b481d3e65a7bb72da9007fee6e6c416ded2e70f97374b guix-build-68e5aafde3e8/output/aarch64-linux-gnu/SHA256SUMS.part fa8f4cf223d9aaf0b2c1ef55ce61256a19cd1ad7f42b99d0b98c9a52fe6ad8ba guix-build-68e5aafde3e8/output/aarch64-linux-gnu/bitcoin-68e5aafde3e8-aarch64-linux-gnu-debug.tar.gz 9a9967078cd1849b4e85db619e1f55d305c6d44e9e013067c0e8d62c1ba54087 guix-build-68e5aafde3e8/output/aarch64-linux-gnu/bitcoin-68e5aafde3e8-aarch64-linux-gnu.tar.gz 18c71f30722102baaf3dfda67f7c7aac38723510b142e8df8ee7063c5d499368 guix-build-68e5aafde3e8/output/arm-linux-gnueabihf/SHA256SUMS.part 0854cc0d17c045a118df2a24e4cf36d727e7e7e2dea37c2492ee21b71cb79b4b guix-build-68e5aafde3e8/output/arm-linux-gnueabihf/bitcoin-68e5aafde3e8-arm-linux-gnueabihf-debug.tar.gz 215256897dde4e8412ed60473376c694a80c5479fb08039107fb62435f2816ef guix-build-68e5aafde3e8/output/arm-linux-gnueabihf/bitcoin-68e5aafde3e8-arm-linux-gnueabihf.tar.gz 5fad0d9d12bc514ec46ed5d66fd29b7da1376a4a69c3b692936f1ab2356e2f85 guix-build-68e5aafde3e8/output/dist-archive/bitcoin-68e5aafde3e8.tar.gz 4f32989d4ab1946048ca7caee9a983fa875be262282562f5a3e040f4bf92158e guix-build-68e5aafde3e8/output/powerpc64-linux-gnu/SHA256SUMS.part ae45df309ae8ada52891efac0a369a69fed4ab93847a7bc4150a62230df4c8d7 guix-build-68e5aafde3e8/output/powerpc64-linux-gnu/bitcoin-68e5aafde3e8-powerpc64-linux-gnu-debug.tar.gz 0ced227de15cb578567131271e2effe80681b4d7a436c92bf1caec735a576fa4 guix-build-68e5aafde3e8/output/powerpc64-linux-gnu/bitcoin-68e5aafde3e8-powerpc64-linux-gnu.tar.gz 26fc5d2ccc1bc17ee0a146cacada6f4909d90c136ae640c8337332adce414ee0 guix-build-68e5aafde3e8/output/powerpc64le-linux-gnu/SHA256SUMS.part 9956b544d90a62a8ba9fc9dc6b6b7f0efe193357332ec19e88053a89d4aab37e guix-build-68e5aafde3e8/output/powerpc64le-linux-gnu/bitcoin-68e5aafde3e8-powerpc64le-linux-gnu-debug.tar.gz be8e39ceea1d36086ce5fa93bfb138c68d3bdf0dd6950b192dfa27a65cce3836 guix-build-68e5aafde3e8/output/powerpc64le-linux-gnu/bitcoin-68e5aafde3e8-powerpc64le-linux-gnu.tar.gz a7755edc394972885c4c77a7798007e5ba4126b177c4ff6224275c4fb8f3b1c4 guix-build-68e5aafde3e8/output/riscv64-linux-gnu/SHA256SUMS.part b6d252993d8aae7582ad6385fe53c61c54c284c68ece6cb2b2d1ac9554e06139 guix-build-68e5aafde3e8/output/riscv64-linux-gnu/bitcoin-68e5aafde3e8-riscv64-linux-gnu-debug.tar.gz bb4860f3bbd815f800333124ff901d880741792ab47097f49bda3a6931144da0 guix-build-68e5aafde3e8/output/riscv64-linux-gnu/bitcoin-68e5aafde3e8-riscv64-linux-gnu.tar.gz 3dd17deed5c5935fb28b62dfc7afca5caab0d67862cdcbf3337edae73e1d0c4c guix-build-68e5aafde3e8/output/x86_64-apple-darwin19/SHA256SUMS.part fa2d68c54fda0816188c81ce2201a77340b82645da2ffe412526f92c297a82df guix-build-68e5aafde3e8/output/x86_64-apple-darwin19/bitcoin-68e5aafde3e8-osx-unsigned.dmg f6e5accdcd201f522b6426e4d8cc9b3643d4d43a57d268fa0e79ea9a34cfac01 guix-build-68e5aafde3e8/output/x86_64-apple-darwin19/bitcoin-68e5aafde3e8-osx-unsigned.tar.gz 4e5a127df957d1c73b65925d685f6620e7bc5667efcb6dcd98be76effc22fc12 guix-build-68e5aafde3e8/output/x86_64-apple-darwin19/bitcoin-68e5aafde3e8-osx64.tar.gz 56ccd216a69acafacbdc6bae0bdcc1faa50b6a51be1aebfa7068206c88b3241a guix-build-68e5aafde3e8/output/x86_64-linux-gnu/SHA256SUMS.part 77b93dd5fad322636853e5b0244ffafd97cc97f3b4b4ee755d5f830b75d77d13 guix-build-68e5aafde3e8/output/x86_64-linux-gnu/bitcoin-68e5aafde3e8-x86_64-linux-gnu-debug.tar.gz 1feda932fc127b900316a232432b91e46e57ee12a81e12a7d888fdc3296219c1 guix-build-68e5aafde3e8/output/x86_64-linux-gnu/bitcoin-68e5aafde3e8-x86_64-linux-gnu.tar.gz aa7c53ab4164b3736049065c3c24391fc5bd7f26b4bda4aa877c378f0636a125 guix-build-68e5aafde3e8/output/x86_64-w64-mingw32/SHA256SUMS.part 5e76148e67aef7e91e70074bfadc08e94373449ac3b966f4343b04d230c778fd guix-build-68e5aafde3e8/output/x86_64-w64-mingw32/bitcoin-68e5aafde3e8-win-unsigned.tar.gz 34123e3d818beeb70113caeda66945bc7cb9d9e987515d5b149bd17b4b38da90 guix-build-68e5aafde3e8/output/x86_64-w64-mingw32/bitcoin-68e5aafde3e8-win64-debug.zip 2bba7f40a2b23c6ea3d47c4f564ab54201bf27f7f57103a98cc9bceea4e70c4d guix-build-68e5aafde3e8/output/x86_64-w64-mingw32/bitcoin-68e5aafde3e8-win64-setup-unsigned.exe 0e7e124144af4a92a4344cf70a3b7c06fbd2b8782aee7ede7263893afa3a5ef0 guix-build-68e5aafde3e8/output/x86_64-w64-mingw32/bitcoin-68e5aafde3e8-win64.zip ``` ACKs for top commit: laanwj: Code review ACK 68e5aafde3e87c16da95410a0474f38f589afb36 Tree-SHA512: 5c25249cc178b9d54159e268390c974b739df9458d773e23c14b14d808f87f7afe314058b3c068601a9132042321973b0c9b6f81becb925665eca2738ae9a613
2021-11-16style: Sort file list after renameMarcoFalke
2021-11-16scripted-diff: Move miner to src/nodeMarcoFalke
-BEGIN VERIFY SCRIPT- # Move module git mv src/miner.cpp src/node/ git mv src/miner.h src/node/ # Replacements sed -i 's:miner\.h:node/miner.h:g' $(git grep -l miner) sed -i 's:miner\.cpp:node/miner.cpp:g' $(git grep -l miner) sed -i 's:MINER_H:NODE_MINER_H:g' $(git grep -l MINER_H) -END VERIFY SCRIPT-
2021-11-16Merge bitcoin/bitcoin#23491: scripted-diff: Move minisketchwrapper to src/nodefanquake
faba1abe469833b2dad01bac4e4d8a4ebb4bc97a Sort file list after rename (MarcoFalke) fa8f60e31102e1153ad1452fbced51e54487a3d4 scripted-diff: Move minisketchwrapper to src/node (MarcoFalke) Pull request description: The newly added wrapper is currently in the node library, but not placed in the node directory. While it is possible to use the wrapper outside of a node context (for example in a utility), it seems unlikely. Either way, I think the wrapper should either be moved to the util lib+dir or the node lib+dir, not something in-between. Also, fix incorrect comment `BITCOIN_DBWRAPPER_H`. ACKs for top commit: fanquake: ACK faba1abe469833b2dad01bac4e4d8a4ebb4bc97a. I saw the comment in #21515, however given there hasn't been any new activity there, I'm going to merge this now. Tree-SHA512: fccc0cfd1fee661152a1378587b96795ffb7a7eceb6d2c27ea5401993fd8b9c0a92579fdba61203917ae6565269cb28d0973464fb6201dabf72a5143495d3e77
2021-11-16build: add `--enable-lto` configuration optionfanquake
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com> Co-authored-by: Elichai Turkel <elichai.turkel@gmail.com>
2021-11-15refactor: Make CWalletTx sync state type-safeRussell Yanofsky
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.
2021-11-13build: Drop unneeded dependencies for bitcoin-wallet toolHennadii Stepanov
2021-11-12Sort file list after renameMarcoFalke
2021-11-12scripted-diff: Move minisketchwrapper to src/nodeMarcoFalke
-BEGIN VERIFY SCRIPT- # Move module git mv src/minisketchwrapper.cpp src/node/ git mv src/minisketchwrapper.h src/node/ # Replacements sed -i 's:minisketchwrapper:node/minisketchwrapper:g' $(git grep -l minisketchwrapper) sed -i 's:MINISKETCHWRAPPER_H:NODE_MINISKETCHWRAPPER_H:g' $(git grep -l MINISKETCHWRAPPER_H) sed -i 's:DBWRAPPER_H:NODE_MINISKETCHWRAPPER_H:g' ./src/node/minisketchwrapper.h -END VERIFY SCRIPT-
2021-11-12Merge bitcoin/bitcoin#23114: Add minisketch subtree and integrate into ↵fanquake
build/test 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a ubsan: add minisketch exceptions (Cory Fields) 54b5e1aeab73953c1f12ec2c041572038f6f59da Add thin Minisketch wrapper to pick best implementation (Pieter Wuille) ee9dc71c1bc16205494f2a0aebe575a3c062ff52 Add basic minisketch tests (Pieter Wuille) 0659f12b131fc5915fe7a493306af197f4fb838b Add minisketch dependency (Gleb Naumenko) 0eb7928ab8d9dcb840e4965bfa81deb752b00dfa Add MSVC build configuration for libminisketch (Pieter Wuille) 8bc166d5b179205fc56855e2b462aa273a6f8661 build: add minisketch build file and include it (Cory Fields) b2904ceb85b4d440b1f4bbd716fcb601411cc2c9 build: add configure checks for minisketch (Cory Fields) b6487dc4ef47ec9ea894eceac25f37d0b806f8aa Squashed 'src/minisketch/' content from commit 89629eb2c7 (fanquake) Pull request description: This takes over #21859, which has [recently switched](https://github.com/bitcoin/bitcoin/pull/21859#issuecomment-921899200) to my integration branch. A few more build issues came up (and have been fixed) since, and after discussing with sipa it was decided I would open a PR to shepherd any final changes through. > This adds a `src/minisketch` subtree, taken from the master branch of https://github.com/sipa/minisketch, to prepare for Erlay implementation (see #21515). It gets configured for just supporting 32-bit fields (the only ones we're interested in in the context of Erlay), and some code on top is added: > * A very basic unit test (just to make sure compilation & running works; actual correctness checking is done through minisketch's own tests). > * A wrapper in `minisketchwrapper.{cpp,h}` that runs a benchmark to determine which field implementation to use. Only changes since my last update to the branch in the previous PR have been rebasing on master and fixing an issue with a header in an introduced file. ACKs for top commit: naumenkogs: ACK 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a Tree-SHA512: 1217d3228db1dd0de12c2919314e1c3626c18a416cf6291fec99d37e34fb6eec8e28d9e9fb935f8590273b8836cbadac313a15f05b4fd9f9d3024c8ce2c80d02
2021-10-26Merge bitcoin/bitcoin#23006: multiprocess: Add new bitcoin-gui, bitcoin-qt, ↵MarcoFalke
bitcoin-wallet init implementations d5f985e51f2863fda0c0d632e836eba42a5c3e15 multiprocess: Add new bitcoin-gui, bitcoin-qt, bitcoin-wallet init implementations (Russell Yanofsky) Pull request description: Add separate `interfaces::Init` subclasses for `bitcoin-wallet`, `bitcoin-gui`, and `bitcoin-qt` binaries instead of sharing `bitcoind` and `bitcoin-node` init subclasses in different binaries. After this, the new init subclasses can be customized in #10102, so node and wallet code is dropped from the `bitcoin-gui` binary and wallet code is dropped from into the `bitcoin-node` binary. --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). ACKs for top commit: lsilva01: reACK d5f985e hebasto: re-ACK d5f985e51f2863fda0c0d632e836eba42a5c3e15, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/23006#pullrequestreview-787537444) review. Tree-SHA512: 6784210bd9ce3a6fbc66852680d0e9bc513c072dc538aeb7f48cb6a41580d3f567ccef04f975ee767a714a4b05d4d87273e94a79abda1b9c25d5ac4bbe752006
2021-10-21Merge bitcoin/bitcoin#23137: Move-only: bloom to src/commonfanquake
fa2d611bedc2a755dcf84a82699c70b57b903cf6 style: Sort (MarcoFalke) fa1e5de2db2c7c95b96773a4ac231ab4249317e9 scripted-diff: Move bloom to src/common (MarcoFalke) fac303c504ab19b863fddc7a0093068fee9d4ef3 refactor: Remove unused MakeUCharSpan (MarcoFalke) Pull request description: To avoid having all files at the top level `./src` directory, start moving them to their respective sub directory according to https://github.com/bitcoin/bitcoin/issues/15732. `bloom` currently depends on libconsensus (`CTransaction`, `CScript`, ...) and it is currently located in the libcommon. Thus, move it to `src/common/`. (libutil in `src/util/` is for stuff that doesn't depend on libconsensus). ACKs for top commit: theStack: Code-review ACK fa2d611bedc2a755dcf84a82699c70b57b903cf6 ryanofsky: Code review ACK fa2d611bedc2a755dcf84a82699c70b57b903cf6 fanquake: ACK fa2d611bedc2a755dcf84a82699c70b57b903cf6 - source shuffle starts now. Tree-SHA512: d2fbc31b81741e9f0be539e1149542c9ca39958c240e12e8e757d882beccd0f0debdc10dcce146a05f03ef9f5c6247900a461a7a4799b515e8716dfb9af1fde2
2021-10-21Add thin Minisketch wrapper to pick best implementationPieter Wuille
2021-10-21Add minisketch dependencyGleb Naumenko
2021-10-21build: add minisketch build file and include itCory Fields
2021-10-21Merge bitcoin/bitcoin#23282: build: remove build stubs for external leveldbfanquake
17ae2601c786e6863cee1bd62297d79521219295 build: remove build stubs for external leveldb (Cory Fields) Pull request description: Presumably these stubs indicate to packagers that external leveldb is meant to be supported in some way. It is not. Remove the stubs to avoid sending any mixed messages. For context, this was reported on IRC: > \<Talkless> bitcoind fails to start with undefined symbol: _ZTIN7leveldb6LoggerE in Debian Sid after leveldb upgraded from 1.22 to 1.23: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996486 ACKs for top commit: fanquake: ACK 17ae2601c786e6863cee1bd62297d79521219295 hebasto: ACK 17ae2601c786e6863cee1bd62297d79521219295. I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 2f1ac2cb30dac64791933a245a2b66ce237bde3955e6f4a6b7ec181248f77a9b1b10597d865d3e2c2b6def696af70de40e905ec274e4ae7cccd1daf461473957
2021-10-20Merge bitcoin/bitcoin#22646: build: tighter Univalue integration, remove ↵fanquake
`--with-system-univalue` 0f95247246344510c9a51810c14c633abb382e95 Integrate univalue into our buildsystem (Cory Fields) 9b49ed656fb2b687fbbe8a3236d18285957eee16 Squashed 'src/univalue/' changes from 98fadc0909..a44caf65fe (fanquake) Pull request description: This PR more tightly integrates building Univalue into our build system. This follows the same approach we use for [LevelDB](https://github.com/bitcoin-core/leveldb/), ([`Makefile.leveldb.include`](https://github.com/bitcoin/bitcoin/blob/master/src/Makefile.leveldb.include)), and [CRC32C](https://github.com/bitcoin-core/crc32c) ([`Makefile.crc32c.include`](https://github.com/bitcoin/bitcoin/blob/master/src/Makefile.crc32c.include)), and will be the same approach we use for [minisketch](https://github.com/sipa/minisketch); see #23114. This approach yields a number of benefits, including: * Faster configuration due to one less subconfigure being run during `./configure` i.e 22s with this PR vs 26s * Faster autoconf i.e 13s with this PR vs 17s * Improved caching * No more issues with compiler flags i.e https://github.com/bitcoin/bitcoin/pull/12467 * More direct control means we can build exactly the objects we want There might be one argument against making this change, which is that builders should have the option to use "proper shared/system libraries". However, I think that falls down for a few reasons. The first being that we already don't support building with a number of system libraries (secp256k1, leveldb, crc32c); some for good reason. Univalue is really the odd one out at the moment. Note that the only fork of Core I'm aware of, that actively patches in support for using system libs, also explicitly marks them as ["DANGEROUS"](https://github.com/bitcoinknots/bitcoin/blob/a886811721ce66eb586871706b3f5dd27518ac3e/configure.ac#L1430) and ["NOT SUPPORTED"](https://github.com/bitcoinknots/bitcoin/blob/a886811721ce66eb586871706b3f5dd27518ac3e/configure.ac#L1312). So it would seem they exist more to satisfy a distro requirement, as opposed to something that anyone should, or would actually use in practice. PRs like #22412 highlight the "issue" with us operating with our own Univalue fork, where we actively fix bugs, and make improvements, when upstream (https://github.com/jgarzik/univalue) may not be taking those improvements, and by all accounts, is not currently actively maintained. Bitcoin Core should not be hamstrung into not being able to fix bugs in a library, and/or have to litter our source with "workarounds", i.e #22412, for bugs we've already fixed, based on the fact that an upstream project is not actively being maintained. Allowing builders to use system libs is really only exacerbating this problem, with little benefit to our project. Bitcoin Core is not quite like your average piece of distro packaged software. There is the potential for us to give the same treatment to libsecp256k1, however it seems doing that is currently less straightforward. ACKs for top commit: dongcarl: ACK 0f95247246 less my comment above, always nice to have an include-able `sources.mk` which makes integration easier. theuni: ACK 0f95247246344510c9a51810c14c633abb382e95. Thanks fanquake for keeping this going. Tree-SHA512: a7f2e41ee7cba06ae72388638e86b264eca1b9a8b81c15d1d7b45df960c88c3b91578b4ade020f8cc61d75cf8d16914575f9a78fa4cef9c12be63504ed804b99
2021-10-15build: remove build stubs for external leveldbCory Fields
Presumably these stubs indicate to packagers that external leveldb is meant to be supported in some way. It is not. Remove the stubs to avoid sending any mixed messages.
2021-10-12scripts: use LIEF for ELF checks in symbol-check.pyfanquake
Co-authored-by: Carl Dong <contact@carldong.me>
2021-10-11Integrate univalue into our buildsystemCory Fields
This addresses issues like the one in #12467, where some of our compiler flags end up being dropped during the subconfigure of Univalue. Specifically, we're still using the compiler-default c++ version rather than forcing c++17. We can drop the need subconfigure completely in favor of a tighter build integration, where the sources are listed separately from the build recipes, so that they may be included directly by upstream projects. This is similar to the way leveldb build integration works in Core. Core benefits of this approach include: - Better caching (for ex. ccache and autoconf) - No need for a slow subconfigure - Faster autoconf - No more missing compile flags - Compile only the objects needed There are no benefits to Univalue itself that I can think of. These changes should be a no-op there, and to downstreams as well until they take advantage of the new sources.mk. This also removes the option to use an external univalue to avoid similar ABI issues with mystery binaries. Co-authored-by: fanquake <fanquake@gmail.com>
2021-10-05Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation ↵MarcoFalke
details 021f86953e8a1dff8ecc768186368d345c865cc2 [style] Run changed files through clang formatter. (Amiti Uttarwar) 375750387e35ed751d1f5ab48860bdec93977f64 scripted-diff: Rename CAddrInfo to AddrInfo (Amiti Uttarwar) dd8f7f250095e58bbf4cd4effb481b52143bd1ed scripted-diff: Rename CAddrMan to AddrMan (Amiti Uttarwar) 3c263d3f63c3598954ee2b65a0e721e3c22e52f8 [includes] Fix up included files (Amiti Uttarwar) 29727c2aa1233f7c5b91a17884c405e0aef10c6e [doc] Update comments (Amiti Uttarwar) 14f9e000d05f82b364d5a142cafc70b10406b660 [refactor] Update GetAddr_() function signature (Amiti Uttarwar) 40acd6fc9a8098fed85abf4fb727a5f0dff8a2ff [move-only] Move constants to test-only header (Amiti Uttarwar) 7cf41bbb38db5008f9b69037b88138076d6a6cc5 [addrman] Change CAddrInfo access (Amiti Uttarwar) e3f1ea659c9eb1e8be4579923d6acaaab148c2ef [move-only] Move CAddrInfo to test-only header file (Amiti Uttarwar) 7cba9d56185b9325ce41d79364e448462fff0f6a [net, addrman] Remove external dependencies on CAddrInfo objects (Amiti Uttarwar) 8af5b54f973e11c847345418d8631bc301b96130 [addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation. (Amiti Uttarwar) f2e5f38f09ee40933f752680fe7d75ee8e529fae [move-only] Match ordering of CAddrMan declarations and definitions (Amiti Uttarwar) 5faa7dd6d871eac1a0ec5c4a93f2ad7577781a56 [move-only] Move CAddrMan function definitions to cpp (Amiti Uttarwar) Pull request description: Introduce the pimpl pattern for AddrMan to separate the implementation details from the externally used object representation. This reduces compile-time dependencies and conceptually clarifies AddrMan's interface from the implementation specifics. Since the unit & fuzz tests currently rely on accessing AddrMan internals, this PR introduces addrman_impl.h, which is exclusively imported by addrman.cpp and test files. ACKs for top commit: jnewbery: ACK 021f86953e8a1dff8ecc768186368d345c865cc2 GeneFerneau: utACK [021f869](https://github.com/bitcoin/bitcoin/pull/22950/commits/021f86953e8a1dff8ecc768186368d345c865cc2) mzumsande: ACK 021f86953e8a1dff8ecc768186368d345c865cc2 rajarshimaitra: Concept + Code Review ACK https://github.com/bitcoin/bitcoin/pull/22950/commits/021f86953e8a1dff8ecc768186368d345c865cc2 theuni: ACK 021f86953e8a1dff8ecc768186368d345c865cc2 Tree-SHA512: aa70cb77927a35c85230163c0cf6d3872382d79048b0fb79341493caa46f8e91498cb787d8b06aba4da17b2f921f2230e73f3d66385519794fff86a831b3a71d
2021-10-05style: SortMarcoFalke
2021-10-05scripted-diff: Move bloom to src/commonMarcoFalke
-BEGIN VERIFY SCRIPT- # Move to directory mkdir src/common git mv src/bloom.cpp src/common/ git mv src/bloom.h src/common/ # Replace occurrences sed -i 's|\<bloom\.cpp\>|common/bloom.cpp|g' $(git grep -l 'bloom.cpp') sed -i 's|\<bloom\.h\>|common/bloom.h|g' $(git grep -l 'bloom.h') sed -i 's|BITCOIN_BLOOM_H|BITCOIN_COMMON_BLOOM_H|g' $(git grep -l 'BLOOM_H') -END VERIFY SCRIPT-
2021-10-05Merge bitcoin/bitcoin#22951: consensus: move amount.h into consensusMarcoFalke
9d0379cea6c164610d05287ae6dd4e66f35b92b3 consensus: use <cstdint> over <stdint.h> in amount.h (fanquake) 863e52fe63a67fa020fb1ef527b9095a35ab77a5 consensus: make COIN & MAX_MONEY constexpr (fanquake) d09071da5bc997f2de1f55ca7a9babc3d7619329 [MOVEONLY] consensus: move amount.h into consensus (fanquake) Pull request description: A first step (of a few) towards some source code reorganization, as well as making libbitcoinconsensus slightly more self contained. Related to #15732. ACKs for top commit: MarcoFalke: concept ACK 9d0379cea6c164610d05287ae6dd4e66f35b92b 🏝 Tree-SHA512: 97fc79262dcb8c00996852a288fee69ddf8398ae2c95700bba5b326f1f38ffcfaf8fa66e29d0cb446d9b3f4e608a96525fae0c2ad9cd531ad98ad2a4a687cd6a
2021-10-01Add syscall sandboxing (seccomp-bpf)practicalswift
2021-09-30[MOVEONLY] consensus: move amount.h into consensusfanquake
Move amount.h to consensus/amount.h. Renames, adds missing and removes uneeded includes.
2021-09-28[addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation.Amiti Uttarwar
Introduce the pimpl pattern for CAddrMan to separate the implementation details from the externally used object representation. This reduces compile-time dependencies and conceptually clarifies AddrMan's interface from the implementation specifics. Since the unit & fuzz tests currently rely on accessing CAddrMan internals, this commit introduces addrman_impl.h, which is exclusively imported by addrman.cpp and test files. Review hint: git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2021-09-16multiprocess: Add new bitcoin-gui, bitcoin-qt, bitcoin-wallet init ↵Russell Yanofsky
implementations Add separate init implementations instead of sharing existing bitcoind and bitcoin-node ones, so they can start to be differentiated in upcoming commits with node and wallet code no longer linked into the bitcoin-gui binary and wallet code no longer linked into the bitcoin-node binary.
2021-09-10build: remove glibc-back-compat from build systemfanquake
At this point, or minimum required glibc is implicitly 2.18, due to thread_local support being enabled by default. However, users can disable thread_local support to maintain 2.17 ccompat for now, which is currently done in the Guix build.
2021-09-07Add util/types.h with ALWAYS_FALSE templateMarcoFalke