aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-17fuzz: actually test garbage >64b in p2p transport testPieter Wuille
2024-03-15wallet refactor: use CWalletTx member functions to determine tx stateishaanam
2024-03-15ci: Bump `TIDY_LLVM_V`Hennadii Stepanov
This change switches to the latest IWYU 0.22, which is compatible with Clang 18.
2024-03-15Merge bitcoin/bitcoin#29487: lint: Fix lint-whitespace issuesfanquake
5555395c15e896230a55c131fc3cbfd9d116adf8 lint: Use git --no-pager to print any output in one go (MarcoFalke) fa5729436ca12b20cfa2cd1f0c6f54af7192f0a6 lint: Fix lint-whitespace issues (MarcoFalke) Pull request description: The lint check has many issues: * It uses `COMMIT_RANGE`, which is brittle code, apparently making it harder to run the CI locally, or self-hosted. See https://github.com/bitcoin/bitcoin/pull/29274#discussion_r1457739319 * The result depends on `COMMIT_RANGE`, or the number of commits passed to the script, which can cause false negatives or false positives. * It is based on the diff output, parsing it, and printing it again, which is brittle as well. * The output does not include line number, making it harder to act on a lint error. Fix all issues by removing the script and replacing it with a simple call to `git grep -I --line-number ...`. ACKs for top commit: TheCharlatan: Re-ACK 5555395c15e896230a55c131fc3cbfd9d116adf8 Tree-SHA512: 71ea8b6382af064beb72fb17f21a0ae9e9238c97e7fa43c2ec353fd1dd73a7bbd696ba0f0a9f65d1eff7c86cbf6cc104a992cb5450a3d50f122955e835270065
2024-03-15Merge bitcoin/bitcoin#29650: depends: drop 1 Qt determinism patchfanquake
76d6537698e46f52d6c45a76f7d99ba427d57dca depends: drop 1 qt determinism patch (fanquake) Pull request description: No-longer required now that we are building with GCC 12. Guix Build (x86_64 && aarch64): ```bash e1c5b2c1c1a184e9d6985f26d26c61ca049e4541c699c6c9ce334beb832ed8da guix-build-76d6537698e4/output/aarch64-linux-gnu/SHA256SUMS.part 22f5d39fd9eac2d1fdbf2794fd6272ce05a1dfda2aeb2280a5dbafe76d0eec3d guix-build-76d6537698e4/output/aarch64-linux-gnu/bitcoin-76d6537698e4-aarch64-linux-gnu-debug.tar.gz 1cc798fb30b9e85e3b94049a671e2881b6b8694e52ae5e6468805c8ea6ea637f guix-build-76d6537698e4/output/aarch64-linux-gnu/bitcoin-76d6537698e4-aarch64-linux-gnu.tar.gz a8c4ecc550aba01292885343ae9d53e31dfc0ef26f885fcf00493c754c5f9deb guix-build-76d6537698e4/output/arm-linux-gnueabihf/SHA256SUMS.part d037b87949640d441b1ea000fd3fb27a508a699c5a6d69b6647611325cb9b7f5 guix-build-76d6537698e4/output/arm-linux-gnueabihf/bitcoin-76d6537698e4-arm-linux-gnueabihf-debug.tar.gz a858a0bce444a9eaf2b36d188198e54cdc14d85e344863d9e176dca94e458537 guix-build-76d6537698e4/output/arm-linux-gnueabihf/bitcoin-76d6537698e4-arm-linux-gnueabihf.tar.gz a802412eb9f2bbe2c573052581c21c44281e78c65d6ebc243105d5004768f0f9 guix-build-76d6537698e4/output/arm64-apple-darwin/SHA256SUMS.part 20eeb2a28f096f53eeae61c64082c7eef0fb4d4e8dd7fb173a6cc19bf1960165 guix-build-76d6537698e4/output/arm64-apple-darwin/bitcoin-76d6537698e4-arm64-apple-darwin-unsigned.tar.gz 54fae4652f21772d4d861b1a9dd3dcb913f088e6b7049a566c748ccdf2acede3 guix-build-76d6537698e4/output/arm64-apple-darwin/bitcoin-76d6537698e4-arm64-apple-darwin-unsigned.zip e986f3d8311df3ab26860c8747e9634687617609a317fdf242365d408235f417 guix-build-76d6537698e4/output/arm64-apple-darwin/bitcoin-76d6537698e4-arm64-apple-darwin.tar.gz 3efced764d3b62362c906f1fbbdecf347be1aab877afb2d6ce8f39d24b3d7437 guix-build-76d6537698e4/output/dist-archive/bitcoin-76d6537698e4.tar.gz 6bd047bd080ae0d0a08a15e83a79dfd17bf29227599517d0bccae17a0224a741 guix-build-76d6537698e4/output/powerpc64-linux-gnu/SHA256SUMS.part 102909ef544962e08577464b3293c0013237391b7577d7abc26f1244d3d0157d guix-build-76d6537698e4/output/powerpc64-linux-gnu/bitcoin-76d6537698e4-powerpc64-linux-gnu-debug.tar.gz 01cf35c37093f768c953697c8d0102316e1e719befd2853a74266bcc2105c52c guix-build-76d6537698e4/output/powerpc64-linux-gnu/bitcoin-76d6537698e4-powerpc64-linux-gnu.tar.gz 467f858d1aba32ee290e6ba00feee632fcb56907f77e5b48f4de969d8ce78457 guix-build-76d6537698e4/output/riscv64-linux-gnu/SHA256SUMS.part 893cb65a79709c58ebafb003ce43b1cd51434d9c0a9175b7dfede6aa99fec3d2 guix-build-76d6537698e4/output/riscv64-linux-gnu/bitcoin-76d6537698e4-riscv64-linux-gnu-debug.tar.gz be3bd03cdef59928eb8a18bd59f48ad27ae38a6382bf94651774845adbd28308 guix-build-76d6537698e4/output/riscv64-linux-gnu/bitcoin-76d6537698e4-riscv64-linux-gnu.tar.gz 1ff2b04cccd44c4c6526387307fb381f52fbc36b31a51730435d6b99e0fa4610 guix-build-76d6537698e4/output/x86_64-apple-darwin/SHA256SUMS.part 9c84639c4b7e1e39c06da4c9430efe94993ce97fbc279b38502c1d4fc25ac801 guix-build-76d6537698e4/output/x86_64-apple-darwin/bitcoin-76d6537698e4-x86_64-apple-darwin-unsigned.tar.gz e65c009c728aa42f24b6970018336058adc78fba09b85aa76310de98fdabb8ad guix-build-76d6537698e4/output/x86_64-apple-darwin/bitcoin-76d6537698e4-x86_64-apple-darwin-unsigned.zip 1a85307eec81cc13e5d599db1bb7cddd3d4f6847f2bad7685e096c439b44489a guix-build-76d6537698e4/output/x86_64-apple-darwin/bitcoin-76d6537698e4-x86_64-apple-darwin.tar.gz 10189926b6ccef3ab1feee3edce34a80a30e60ee67c00519e344fefd6c9880d0 guix-build-76d6537698e4/output/x86_64-linux-gnu/SHA256SUMS.part 0094570197c0a91b7a903c1250bf899ea50d7452608da03f5dd825febd5e216b guix-build-76d6537698e4/output/x86_64-linux-gnu/bitcoin-76d6537698e4-x86_64-linux-gnu-debug.tar.gz 8375afd9ea4376b354548270323fa0f5f3244579b59dcdf9c26330337b5719ab guix-build-76d6537698e4/output/x86_64-linux-gnu/bitcoin-76d6537698e4-x86_64-linux-gnu.tar.gz 5a30053ee8db9eb2d083e8569a1a69b24acc84de1028f3f40d5e902a1174e49e guix-build-76d6537698e4/output/x86_64-w64-mingw32/SHA256SUMS.part 1d624077e027dd6f213c85d75fdbac12d61c45235946817c406132fbd222c939 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64-debug.zip e75107ce5608d83708b4e9b5a64d50e0282560ee2d8d915a20993fd383d2d456 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64-setup-unsigned.exe 7fb1f412fd71e0e8302add6bcc5679ad6990d87c16688a396769844f72ae7c82 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64-unsigned.tar.gz be24df85e0834823f0ad9611667100330972d3a18460099d7df5b4386fbd6403 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64.zip ``` ACKs for top commit: TheCharlatan: ACK 76d6537698e46f52d6c45a76f7d99ba427d57dca Tree-SHA512: 69e698e9b0036ecb1f89db82427c25d0368d2178c3dc2bc751181c19a1139929bf0da160af6f3e021ca3da59ea66f7b7330aa6295f5e65c6ef0bbcf369fcbc94
2024-03-14scripted-diff: wallet: s/TxStateConflicted/TxStateBlockConflictedishaanam
-BEGIN VERIFY SCRIPT- sed -i 's/TxStateConflicted/TxStateBlockConflicted/g' src/wallet/wallet.cpp src/wallet/interfaces.cpp src/wallet/transaction.h src/wallet/transaction.cpp sed -i 's/isConflicted/isBlockConflicted/g' src/wallet/transaction.h src/wallet/wallet.cpp -END VERIFY SCRIPT-
2024-03-14test: Add tests for wallet mempool conflictsishaanam
2024-03-14depends: always configure with --with-picfanquake
We currently do this sporadically. Not only amongst packages, but across OS's, i.e sometimes it's done for BSDs/Android, and sometimes not. Configure with `--with-pic` globally instead. I think this generally makes more sense, and should not have any downsides. See related discussion in https://github.com/bitcoin/bitcoin/pull/28846#discussion_r1399123100.
2024-03-14Remove unused g++-10 workaroundMarcoFalke
This reverts d4999d40b9bd04dc20111aaaa6ed2d3db1a5caf9
2024-03-14guix: bump time-machine to dc4842797bfdc5f9f3f5f725bf189c2b68bd6b5afanquake
This includes a commit to fix building LLVM 17 on riscv64, see https://git.savannah.gnu.org/cgit/guix.git/commit/?id=4e26331a5ee87928a16888c36d51e270f0f10f90. Followup to discussion in https://github.com/bitcoin/bitcoin/pull/28880#issuecomment-1843313196. If you don't have riscv64 hardware, this can be tested with the following: ```bash guix time-machine --commit=d5ca4d4fd713a9f7e17e074a1e37dda99bbb09fc -- build --target=riscv64-linux-gnu llvm .... riscv64-linux-gnu-ld: CMakeFiles/dsymutil.dir/dsymutil.cpp.o: undefined reference to symbol '__atomic_fetch_and_1@@LIBATOMIC_1.0' riscv64-linux-gnu-ld: /gnu/store/i4ga0pnr1b74bir2bjyp8mcrrbsvk7d3-gcc-cross-riscv64-linux-gnu-11.3.0-lib/riscv64-linux-gnu/lib/libatomic.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status guix time-machine --commit=dc4842797bfdc5f9f3f5f725bf189c2b68bd6b5a -- build --target=riscv64-linux-gnu llvm .... grafting '/gnu/store/7y0j0y8jaz4mjx2nz0y42wdnxxjp6id6-llvm-17.0.6-opt-viewer' -> '/gnu/store/8xvahrrjscbprh6cjj0qp5bm9mm78wwa-llvm-17.0.6-opt-viewer'... grafting '/gnu/store/bjhw648bz7ijd2p9hgzzdbw1q8hpagk8-llvm-17.0.6' -> '/gnu/store/x50qi8i2ywgpx6azv4k55ms0w5xjxxg5-llvm-17.0.6'... successfully built /gnu/store/q9xvk8gzzvb4dxfzf6yi5164zd0d1vj2-llvm-17.0.6.drv ```
2024-03-14Merge bitcoin/bitcoin#29459: test: check_mempool_result negative feerateglozow
bf264e05981e3809715f34f548138d53991db6f2 test: check_mempool_result negative feerate (kevkevin) Pull request description: Adds test coverage in `mempool_accept.py` to check if a negative `maxfeerate` is input into `check_mempool_result` Asserts "Amount out of range" error message and `-3` error code Motivated by this [comment](https://github.com/bitcoin/bitcoin/pull/29434/files#r1491112250) ACKs for top commit: maflcko: lgtm ACK bf264e05981e3809715f34f548138d53991db6f2 brunoerg: nice, utACK bf264e05981e3809715f34f548138d53991db6f2 davidgumberg: Looks great, ACK https://github.com/bitcoin/bitcoin/pull/29459/commits/bf264e05981e3809715f34f548138d53991db6f2 Tree-SHA512: 58931b774cc887c616f2fd91af3ee65cc5db55acd8e2875c76de448c80bd4e020b057c5f4f85556431377f0d0e7553771fb285d1ec20cf64f64ec92a47776b78
2024-03-14build: Bump g++ minimum supported version to 11MarcoFalke
2024-03-14depends: drop 1 qt determinism patchfanquake
No-longer required now that we are building with GCC 12.
2024-03-14Merge bitcoin/bitcoin#27897: guix: use GCC 12.3.0 to build releasesfanquake
10d56530e097cbf70f7ecbc464550d89b4d91b87 guix: temporarily disable powerpcle taget (fanquake) 001412a4d2da685cd881fc37bbe87af427edc21a guix: use GCC 12.3.0 (fanquake) ce54330cf6c5ce37e1369e5e8cb58923233d67ca ci: use Debian Bookworm (GCC 12) for ARM ci job (fanquake) 0da6451c58c253ee60095aaafdf542247b2ff60b ci: use Debian Bookworm (GCC 12) for win64 job (fanquake) Pull request description: Switch to using [GCC `12.3.0`](https://gcc.gnu.org/gcc-12/) to build release binaries. Temporarily disables the `powerpc64le-linux-gnu` target due to non-determinism issues when building across `aarch64` and `x86_64`. Trying to fix the non-determinism was going to require trying to selectively disable optimization flags, which is already not ideal (and didn't fix all issues), and the migration to GCC 12 as our release compiler is now the blocker for multiple other (c++20 and similar) changes, so leaving this blocked on the `powerpc64le` binaries does not seem like a good tradeoff. ACKs for top commit: TheCharlatan: ACK 10d56530e097cbf70f7ecbc464550d89b4d91b87 Tree-SHA512: 401bbaaf2b72c795a06a24875ffd666151b41bae8f45bda10526ff4f6b59782704246afc6585f6b849021cbff8a7b861961d139bffe45536aaaeb3952b72ae57
2024-03-14Merge bitcoin/bitcoin#29497: test: simplify test_runner.pyfanquake
0831b54dfca1b9e728295fff500215da14589fc0 test: simplify test_runner.py (tdb3) Pull request description: Implements the simplifications to test_runner.py proposed by sipa in PR #23995. Remove the num_running variable as it can be implied by the length of the jobs list. Remove the i variable as it can be implied by the length of the test_results list. Instead of counting results to determine if finished, make the queue object itself responsible (by looking at running jobs and jobs left). ACKs for top commit: mzumsande: re-ACK 0831b54 davidgumberg: reACK https://github.com/bitcoin/bitcoin/commit/0831b54dfca1b9e728295fff500215da14589fc0 marcofleon: re-ACK 0831b54dfca1b9e728295fff500215da14589fc0 Tree-SHA512: e5473e68d49cd779b29d97635329283ae7195412cb1e92461675715ca7eedb6519a1a93ba28d40ca6f015d270f7bcd3e77cef279d9cd655155ab7805b49638f1
2024-03-14Merge bitcoin/bitcoin#29649: netbase: remove unnecessary log messagefanquake
c70e4fc9a311bf98a3a252a8d3e7f619763d81be netbase: remove unnecessary log message (Matthew Zipkin) Pull request description: This is a follow-up to #27375 that removes a spammy non-debug-level log message we don't need. See https://github.com/bitcoin/bitcoin/pull/27375#issuecomment-1994498888 ACKs for top commit: fanquake: ACK c70e4fc9a311bf98a3a252a8d3e7f619763d81be - thanks. Merging this now because it's swamping non-debug logs. i.e: Tree-SHA512: 837682860abdf740fce5dc88c8599e066660cf16b4cab1473391eb51ad538ae52d236ecd3543df866e2a2165870397a8bf21ad9f5125ed8212a3fe207d615553
2024-03-14ci: Better tidy errorsMarcoFalke
2024-03-13netbase: remove unnecessary log messageMatthew Zipkin
see https://github.com/bitcoin/bitcoin/pull/27375#issuecomment-1994498888
2024-03-13lint: Use git --no-pager to print any output in one goMarcoFalke
2024-03-13Merge bitcoin/bitcoin#29478: test: Test new header sync behavior in loadtxoutsetAva Chow
1ec6684b08614f593b37e627a0a08e54b19318b6 test: Add test for loadtxoutset when headers are not synced (Fabian Jahr) 2bc1ecfaa9b69a20388e913ec64967de2f506cd3 test: Remove unnecessary sync_blocks in assumeutxo tests (Fabian Jahr) Pull request description: It adds a test for the change to `loadtxoutset` made in #29345. Before that change the test doesn't fail right away but times out after 10 minutes. Also removes a `sync_blocks` call that didn't seem to do anything valuable. ACKs for top commit: achow101: ACK 1ec6684b08614f593b37e627a0a08e54b19318b6 pablomartin4btc: tACK 1ec6684b08614f593b37e627a0a08e54b19318b6 BrandonOdiwuor: ACK 1ec6684b08614f593b37e627a0a08e54b19318b6 theStack: ACK 1ec6684b08614f593b37e627a0a08e54b19318b6 Tree-SHA512: 1337decdf91e4a4f7213fcf8ace1d705e5c1422e0ac3872a59b5be9c33e743850cb8f5f7474750a534952eefd5cfe43fe85a54efb9bc0e47515136a2903676e5
2024-03-13Avoid divide-by-zero in header sync logs when NodeClock is behindMarcoFalke
2024-03-13refactor: Modernize header sync logsMarcoFalke
No change in behavior, only the modern aliases and types are used.
2024-03-13Merge bitcoin/bitcoin#28193: test: add script compression coverage for ↵Ava Chow
not-on-curve P2PK outputs 28287cfbe18b6c468f76389e9f66bdcf2d00f8d1 test: add script compression coverage for not-on-curve P2PK outputs (Sebastian Falbesoner) Pull request description: This PR adds unit test coverage for the script compression functions `{Compress,Decompress}Script` in the special case of uncompressed P2PK outputs (scriptPubKey: OP_PUSH65 <0x04 ....> OP_CHECKSIG) with [pubkeys that are not fully valid](https://github.com/bitcoin/bitcoin/blob/44b05bf3fef2468783dcebf651654fdd30717e7e/src/pubkey.cpp#L297-L302), i.e. where the encoded point is not on the secp256k1 curve. For those outputs, script compression is not possible, as the y coordinate of the pubkey can't be recovered (see also call-site of `IsToPubKey`): https://github.com/bitcoin/bitcoin/blob/44b05bf3fef2468783dcebf651654fdd30717e7e/src/compressor.cpp#L49-L50 Likewise, for a compressed script of an uncompressed P2PK script (i.e. compression ids 4 and 5) where the x coordinate is not on the curve, decompression fails: https://github.com/bitcoin/bitcoin/blob/44b05bf3fef2468783dcebf651654fdd30717e7e/src/compressor.cpp#L122-L129 Note that the term "compression" is used here in two different meanings (though they are related), which might be a little confusing. The encoding of a pubkey can either be compressed (33-bytes with 0x02/0x03 prefixes) or uncompressed (65-bytes with 0x04 prefix). On the other hand there is also compression for whole output scripts, which is used for storing scriptPubKeys in the UTXO set in a compact way (and also for the `dumptxoutset` result, accordingly). P2PK output scripts with uncompressed pubkeys get compressed by storing only the x-coordinate and the sign as a prefix (0x04 = even, 0x05 = odd). Was diving deeper into the subject while working on https://github.com/bitcoin/bitcoin/pull/27432, where the script decompression of uncompressed P2PK needed special handling (see also https://github.com/bitcoin/bitcoin/issues/24628#issuecomment-1108798536). Trivia: as of now (block 801066), there are 13 uncompressed P2PK outputs in the UTXO set with a pubkey not on the curve (which obviously means they are unspendable). ACKs for top commit: achow101: ACK 28287cfbe18b6c468f76389e9f66bdcf2d00f8d1 tdb3: ACK for 28287cfbe18b6c468f76389e9f66bdcf2d00f8d1. cbergqvist: ACK 28287cf! marcofleon: Nicely done, ACK 28287cfbe18b6c468f76389e9f66bdcf2d00f8d1. Built the PR branch, ran the unit and functional tests, everything passed. Tree-SHA512: 777b6c3065654fbfa1ce94926f4cadb91a9ca9dc4dd4af6008ad77bd1da5416f156ad0dfa880d26faab2e168bf9b27e0a068abc9a2be2534d82bee61ee055c65
2024-03-13RPC: Add maxfeerate and maxburnamount args to submitpackageGreg Sanders
And thread the feerate value through ProcessNewPackage to reject individual transactions that exceed the given feerate. This allows subpackage processing, and is compatible with future package RBF work.
2024-03-13Merge bitcoin/bitcoin#29606: refactor: Reserve memory for ToLower/ToUpper ↵Ava Chow
conversions 6f2f4a4d096a3b261258c8cdd96cca532988d1d3 Reserve memory for ToLower/ToUpper conversions (Lőrinc) Pull request description: Similarly to https://github.com/bitcoin/bitcoin/pull/29458, we're preallocating the result string based on the input string's length. The methods were already [covered by tests](https://github.com/bitcoin/bitcoin/blob/master/src/test/util_tests.cpp#L1250-L1276). ACKs for top commit: tdb3: ACK for 6f2f4a4d096a3b261258c8cdd96cca532988d1d3 maflcko: lgtm ACK 6f2f4a4d096a3b261258c8cdd96cca532988d1d3 achow101: ACK 6f2f4a4d096a3b261258c8cdd96cca532988d1d3 Empact: Code Review ACK https://github.com/bitcoin/bitcoin/pull/29606/commits/6f2f4a4d096a3b261258c8cdd96cca532988d1d3 stickies-v: ACK 6f2f4a4d096a3b261258c8cdd96cca532988d1d3 Tree-SHA512: e3ba7af77decdc73272d804c94fef0b11028a85f3c0ea1ed6386672611b1c35fce151f02e64f5bb5acb5ba506aaa54577719b07925b9cc745143cf5c7e5eb262
2024-03-13Merge bitcoin/bitcoin#29619: refactor: consolidate MempoolAcceptResult ↵Ava Chow
processing 07cd510ffe791a4dfc1824c67fb440be780a4e2b [refactor] consolidate invalid MempoolAcceptResult processing (glozow) 9353aa4066a85705154800efa61c5601036be921 [refactor] consolidate valid MempoolAcceptResult processing (glozow) Pull request description: Every time we try to `ProcessTransaction` (i.e. submit a tx to mempool), we use the result to update a few net processing data structures. For example, after a failure, the {wtxid, txid, both, neither} (depending on reason) should be cached in `m_recent_rejects` so we don't try to download/validate it again. There are 2 current places and at least 1 future place where we need to process `MempoolAcceptResult`: - In the `ProcessMessage` logic after receiving and validating a tx - In `ProcessOrphanTx` where we retry orphans - With #28970, after processing a package of transactions, we should do these updates for each tx in the package. Consolidate this code so it isn't repeated in 2 places and so we can reuse it in a future PR. ACKs for top commit: instagibbs: ACK 07cd510ffe791a4dfc1824c67fb440be780a4e2b achow101: ACK 07cd510ffe791a4dfc1824c67fb440be780a4e2b dergoegge: Code review ACK 07cd510ffe791a4dfc1824c67fb440be780a4e2b TheCharlatan: ACK 07cd510ffe791a4dfc1824c67fb440be780a4e2b Tree-SHA512: c4e74cb65e4f52882fca52e6682efa5dcf1562d98418454e09be256ffd026caae642a90aa5b9cccaae214be240d6f4be9d87b516953b2ee69a655f16ea569ed9
2024-03-13Merge bitcoin/bitcoin#27375: net: support unix domain sockets for -proxy and ↵Ava Chow
-onion 567cec9a05e1261e955535f734826b12341684b6 doc: add release notes and help text for unix sockets (Matthew Zipkin) bfe51928911daf484ae07deb52a7ff0bcb2526ae test: cover UNIX sockets in feature_proxy.py (Matthew Zipkin) c65c0d01630b44fa71321ea7ad68d5f9fbb7aefb init: allow UNIX socket path for -proxy and -onion (Matthew Zipkin) c3bd43142eba77dcf1acd4984e437759f65e237a gui: accomodate unix socket Proxy in updateDefaultProxyNets() (Matthew Zipkin) a88bf9dedd1d8c1db0a9c8b663dab3e3c2f0f030 i2p: construct Session with Proxy instead of CService (Matthew Zipkin) d9318a37ec09fe0b002815a7e48710e530620ae2 net: split ConnectToSocket() from ConnectDirectly() for unix sockets (Matthew Zipkin) ac2ecf3182fb5ad9bcd41540b19382376114d6ee proxy: rename randomize_credentials to m_randomize_credentials (Matthew Zipkin) a89c3f59dc44eaf4f59912c1accfc0ce5d61933a netbase: extend Proxy class to wrap UNIX socket as well as TCP (Matthew Zipkin) 3a7d6548effa6cd9a4a5413b690c2fd85da4ef65 net: move CreateSock() calls from ConnectNode() to netbase methods (Matthew Zipkin) 74f568cb6fd5c74b7b9bf0ce69876430746a53b1 netbase: allow CreateSock() to create UNIX sockets if supported (Matthew Zipkin) bae86c8d318d06818aa75a9ebe3db864197f0bc6 netbase: refactor CreateSock() to accept sa_family_t (Matthew Zipkin) adb3a3e51de205cc69b1a58647c65c04fa6c6362 configure: test for unix domain sockets (Matthew Zipkin) Pull request description: Closes https://github.com/bitcoin/bitcoin/issues/27252 UNIX domain sockets are a mechanism for inter-process communication that are faster than local TCP ports (because there is no need for TCP overhead) and potentially more secure because access is managed by the filesystem instead of serving an open port on the system. There has been work on [unix domain sockets before](https://github.com/bitcoin/bitcoin/pull/9979) but for now I just wanted to start on this single use-case which is enabling unix sockets from the client side, specifically connecting to a local Tor proxy (Tor can listen on unix sockets and even enforces strict curent-user-only access permission before binding) configured by `-onion=` or `-proxy=` I copied the prefix `unix:` usage from Tor. With this patch built locally you can test with your own filesystem path (example): `tor --SocksPort unix:/Users/matthewzipkin/torsocket/x` `bitcoind -proxy=unix:/Users/matthewzipkin/torsocket/x` Prep work for this feature includes: - Moving where and how we create `sockaddr` and `Sock` to accommodate `AF_UNIX` without disturbing `CService` - Expanding `Proxy` class to represent either a `CService` or a UNIX socket (by its file path) Future work: - Enable UNIX sockets for ZMQ (https://github.com/bitcoin/bitcoin/pull/27679) - Enable UNIX sockets for I2P SAM proxy (some code is included in this PR but not tested or exposed to user options yet) - Enable UNIX sockets on windows where supported - Update Network Proxies dialog in GUI to support UNIX sockets ACKs for top commit: Sjors: re-ACK 567cec9a05e1261e955535f734826b12341684b6 tdb3: re ACK for 567cec9a05e1261e955535f734826b12341684b6. achow101: ACK 567cec9a05e1261e955535f734826b12341684b6 vasild: ACK 567cec9a05e1261e955535f734826b12341684b6 Tree-SHA512: de81860e56d5de83217a18df4c35297732b4ad491e293a0153d2d02a0bde1d022700a1131279b187ef219651487537354b9d06d10fde56225500c7e257df92c1
2024-03-12test: simplify test_runner.pytdb3
Remove the num_running variable as it can be implied by the length of the jobs list. Remove the i variable as it can be implied by the length of the test_results list. Instead of counting results to determine if finished, make the queue object itself responsible (by looking at running jobs and jobs left). Originally proposed by @sipa in PR #23995. Co-authored-by: Pieter Wuille <pieter@wuille.net>
2024-03-12test: fix intermittent failures with test=addrmanMartin Zumsande
The nKey of the addrman is generated the first time the node is started. Therefore, restarting a node or turning it off and on again won't make a previously non-deterministic addrman deterministic. Co-authored-by: 0xb10c <b10c@b10c.me>
2024-03-12Merge bitcoin/bitcoin#29633: log: Remove error() referencefanquake
d0e6564240857994db53d06f66ea09da0edbaf0f log: Remove error() reference (Fabian Jahr) Pull request description: Mini-followup to #29236 that was just merged. Removes a reference to `error()` that was missed in a comment. ACKs for top commit: ryanofsky: Code review ACK d0e6564240857994db53d06f66ea09da0edbaf0f. Just dropped LogPrintf reference since last review stickies-v: ACK d0e6564240857994db53d06f66ea09da0edbaf0f Empact: ACK https://github.com/bitcoin/bitcoin/pull/29633/commits/d0e6564240857994db53d06f66ea09da0edbaf0f Tree-SHA512: 8abe4895951013c2ceca9a57743aacabaf8af831d07eee9ae8372c121c16e88b7226f0e537200c3464792e19ac7e03b57ba0be31f43add8802753972b0aefc48
2024-03-12Merge bitcoin/bitcoin#26415: rpc,rest,zmq: faster getblock, NotifyBlock and ↵Ava Chow
rest_block by reading raw block e710cefd5701cd33d1e55034b3e37cea78582733 rest: read raw block in rest_block and deserialize for json (Andrew Toth) 95ce0783a6dab325038a64d6c529c9e7816e3072 rpc: read raw block in getblock and deserialize for verbosity > 0 (Andrew Toth) 0865ab8712429761bc69f09d93760f8c6081c99c test: check more details on zmq raw block response (Andrew Toth) 38265cc14e7d646bf27882329d374d42167eb49f zmq: read raw block with ReadRawBlockFromDisk (Andrew Toth) da338aada7943c392013c36c542af621fbc6edd1 blockstorage: check nPos in ReadRawBlockFromDisk before seeking back (Andrew Toth) Pull request description: For the `getblock` endpoint with `verbosity=0`, the `rest_block` REST endpoint for `bin` and `hex`, and zmq `NotifyBlock` we don't have to deserialize the block since we're just sending the raw data. This PR uses `ReadRawBlockFromDisk` instead of `ReadBlockFromDisk` to serve these requests, and only deserializes for `verbosity > 0` and `json` REST requests. See benchmarks in https://github.com/bitcoin/bitcoin/pull/26684. Benchmarked using ApacheBench. Requesting block 750,000 in binary 10k times on a single core (set `-rest=1` in config): `ab -n 10000 -c 1 "http://127.0.0.1:8332/rest/block/0000000000000000000592a974b1b9f087cb77628bb4a097d5c2c11b3476a58e.bin"` On master, mean time 15ms. On this branch, mean time 1ms. For RPC ``` echo '{"jsonrpc": "1.0", "id": "curltest", "method": "getblock", "params": ["0000000000000000000592a974b1b9f087cb77628bb4a097d5c2c11b3476a58e", 0]}' > /tmp/data.json ab -p /tmp/data.json -n 1000 -c 1 -A user:password "http://127.0.0.1:8332/" ``` On master, mean time 32ms On this branch, mean time 13ms ACKs for top commit: achow101: re-ACK e710cefd5701cd33d1e55034b3e37cea78582733 Tree-SHA512: 4cea13c7b563b2139d041b1fdcfdb793c8cc688654ae08db07e7ee6b875c5e582b8185db3ae603abbfb06d2164724f29205774620b48c493726b991999af289e
2024-03-12Merge bitcoin/bitcoin#27114: p2p: Allow whitelisting manual connectionsAva Chow
0a533613fb44207053796fd01a9f4b523a3153d4 docs: add release notes for #27114 (brunoerg) e6b8f19de9a6d1c477d0bbda18d17794cd81a6f4 test: add coverage for whitelisting manual connections (brunoerg) c985eb854cc86deb747caea5283c17cf51b6a983 test: add option to speed up tx relay/mempool sync (brunoerg) 66bc6e2d1749f43d7b314aa2784a06af78440170 Accept "in" and "out" flags to -whitelist to allow whitelisting manual connections (Luke Dashjr) 8e06be347c5e14cbe75256eba170e0867f95f360 net_processing: Move extra service flag into InitializeNode (Luke Dashjr) 9133fd69a5cc9a0ab1a06a60d09f1b7e1039018e net: Move `NetPermissionFlags::Implicit` verification to `AddWhitelistPermissionFlags` (Luke Dashjr) 2863d7dddb62d987b3e1c3b8bfad7083f0f774b2 net: store `-whitelist{force}relay` values in `CConnman` (brunoerg) Pull request description: Revives #17167. It allows whitelisting manual connections. Fixes #9923 Since there are some PRs/issues around this topic, I'll list some motivations/comments for whitelisting outbound connections from them: - Speed-up tx relay/mempool sync for testing purposes (my personal motivation for this) - In #26970, theStack pointed out that we whitelist peers to speed up tx relay for fast mempool synchronization, however, since it applies only for inbound connections and considering the topology `node0 <--- node1 <---- node2 <--- ... <-- nodeN`, if a tx is submitted from any node other than node0, the mempool synchronization can take quite long. - https://github.com/bitcoin/bitcoin/pull/29058#issuecomment-1865155764 - "Before enabling -v2transport by default (which I'd image may happen after https://github.com/bitcoin/bitcoin/pull/24748) we could consider a way to force manual connections to be only-v1 or even only-v2 (disabling reconnect-with-v1). A possibility could be through a net permission flag, if https://github.com/bitcoin/bitcoin/pull/27114 makes it in." - https://github.com/bitcoin/bitcoin/pull/17167#issuecomment-1168606032 - "This would allow us to use https://github.com/bitcoin/bitcoin/pull/25355 when making outgoing connections to all nodes, except to whitelisted ones for which we would use our persistent I2P address." - Force-relay/mempool permissions for a node you intentionally connected to. ACKs for top commit: achow101: ACK 0a533613fb44207053796fd01a9f4b523a3153d4 sr-gi: re-ACK [0a53361](https://github.com/bitcoin/bitcoin/pull/27114/commits/0a533613fb44207053796fd01a9f4b523a3153d4) pinheadmz: ACK 0a533613fb44207053796fd01a9f4b523a3153d4 Tree-SHA512: 97a79bb854110da04540897d2619eda409d829016aafdf1825ab5515334b0b42ef82f33cd41587af235b3af6ddcec3f2905ca038b5ab22e4c8a03d34f27aebe1
2024-03-12rest: read raw block in rest_block and deserialize for jsonAndrew Toth
Note that for speed this commit also removes the proof of work and signet signature checks before returning the block in getblock. It is assumed if a block is stored it will be valid.
2024-03-12rpc: read raw block in getblock and deserialize for verbosity > 0Andrew Toth
Note that for speed this commit also removes the proof of work and signet signature checks before returning the block in getblock. It is assumed if a block is stored it will be valid.
2024-03-12test: check more details on zmq raw block responseAndrew Toth
2024-03-12zmq: read raw block with ReadRawBlockFromDiskAndrew Toth
2024-03-12blockstorage: check nPos in ReadRawBlockFromDisk before seeking backAndrew Toth
ReadRawBlockFromDisk assumes a non-null pos that has an nPos >= 8. This simple check makes the function safer to call in the future, so callers don't need to worry about causing UB if the pos is null.
2024-03-12guix: temporarily disable powerpcle tagetfanquake
There non-determinism issues when compiling for this target across x86_64 and aarch64.
2024-03-12guix: use GCC 12.3.0fanquake
Retain native GCC 10 toolchain for macOS, to prevent compile failures in native tools (this will be removed entirely when we tansition to LLD). Update the vmov-alignment patch, for changes in GCC 12.
2024-03-12ci: use Debian Bookworm (GCC 12) for ARM ci jobfanquake
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
2024-03-12ci: use Debian Bookworm (GCC 12) for win64 jobfanquake
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
2024-03-12Merge bitcoin/bitcoin#29306: policy: enable sibling eviction for v3 transactionsAva Chow
1342a31f3ab61d964b9a24825bee24f53ba4e1cc [functional test] sibling eviction (glozow) 5fbab378597126eb1d0c2b2addb0859f79e508f4 [unit test] sibling not returned from SingleV3Checks if 1p2c or 3gen (glozow) 170306728aa23a4d5fcc383ddabd97f66fed5119 [policy] sibling eviction for v3 transactions (glozow) b5d15f764fed0b30c9113429163700dea907c2b1 [refactor] return pair from SingleV3Checks (glozow) Pull request description: When we receive a v3 transaction that would bust a mempool transaction's descendant limit, instead of rejecting the new tx, consider replacing the other descendant if it is much higher feerate (using existing RBF criteria to assess that it's more incentive compatible and to avoid DoS). Delving post with more background and motivation: https://delvingbitcoin.org/t/sibling-eviction-for-v3-transactions/472 ACKs for top commit: sdaftuar: ACK 1342a31f3ab61d964b9a24825bee24f53ba4e1cc achow101: ACK 1342a31f3ab61d964b9a24825bee24f53ba4e1cc instagibbs: ACK https://github.com/bitcoin/bitcoin/pull/29306/commits/1342a31f3ab61d964b9a24825bee24f53ba4e1cc Tree-SHA512: dd957d49e51db78758f566c49bddc579b72478e371275c592d3d5ba097d20de47a6c81952045021b99d82a787f5b799baf16dd0ee0e6de90ba12e21e275352be
2024-03-12log: Remove error() referenceFabian Jahr
2024-03-12refactor: init, simplify index shutdown codefurszy
2024-03-12index: decrease ThreadSync cs_main contentionfurszy
Only NextSyncBlock requires cs_main lock. The other function calls like Commit or Rewind will lock or not cs_main internally when they need it. Avoiding keeping cs_main locked when Commit() or Rewind() write data to disk.
2024-03-12index: cache last block filter headerfurszy
Avoid disk read operations on every new processed block.
2024-03-12blockstorage: do not flush block to disk if it is already thereMatthew Zipkin
test: ensure we can reindex from read-only block files now
2024-03-12lint: Fix lint-whitespace issuesMarcoFalke
2024-03-12index: blockfilter, decouple header lookup into its own functionfurszy
2024-03-12index: blockfilter, decouple Write into its own functionfurszy