aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-07Merge bitcoin/bitcoin#28361: fuzz: add ConstructPubKeyBytes util functionfanquake
1580e3be83bd03985b2f288ed70de510903068d9 fuzz: add ConstructPubKeyBytes function (josibake) Pull request description: In https://github.com/bitcoin/bitcoin/pull/28246 and https://github.com/bitcoin/bitcoin/pull/28122 , we add a `PubKeyDestination` and a `V0SilentPaymentsDestination`. Both of these PRs update `fuzz/util.cpp` and need a way to create well-formed pubkeys. Currently in `fuzz/util.cpp`, we have some logic for creating pubkeys in the multisig data provider. This logic is duplicated in #28246 and duplicated again in #28122. Seems much better to have a `ConstructPubKeyBytes` function that both PRs (and any future work) can reuse. This PR introduces a function to do this and has the existing code use it. While the purpose is to introduce a utility function, the previous multisig code used `ConsumeIntegralInRange(4, 7)` which would have created some uncompressed pubkeys with the prefix 0x05, which is incorrect (see https://bitcoin.stackexchange.com/questions/57855/c-secp256k1-what-do-prefixes-0x06-and-0x07-in-an-uncompressed-public-key-signif) tldr; using `PickValueFromArray` is more correct as it limits to the set of defined prefixes for compressed and uncompressed pubkeys. ACKs for top commit: Sjors: ACK 1580e3be83bd03985b2f288ed70de510903068d9 Tree-SHA512: c87c8bcd1f6b3a97ef772be93102efb912811c59f32211cfd531a116f1da8a57c8c6ff106b34f2a2b88d8b34fb5bc30d9f9ed6d2720113ffcaaa2f8d5dc9eb27
2023-09-07index: coinstats reorg, fail when block cannot be reversedfurszy
During a reorg, continuing execution when a block cannot be reversed leaves the coinstats index in an inconsistent state, which was surely overlooked when 'CustomRewind' was implemented.
2023-09-07Merge bitcoin/bitcoin#28412: test: remove unused variables in ↵fanquake
`p2p_invalid_block` 3eb03803c4111d09c63550a6a6c09afbe3430bf6 test: remove unused variables in `p2p_invalid_block` (brunoerg) Pull request description: ACKs for top commit: stickies-v: ACK 3eb03803c4111d09c63550a6a6c09afbe3430bf6 Tree-SHA512: eadae1eb323e5562d1ea0aed43ebf0145f0fdbb6cd6d4646bbf1ca89f384820e7b9cb69f0bb04a949e9f8983a879aee8387d6f7ac3d4e4ea027f8892e656fb98
2023-09-07Merge bitcoin/bitcoin#28422: depends: cctools 986, ld64 711 & libtapi 1300.0.6.5fanquake
7d5815293ed8a3dea68b61a78944e410f02b147f depends: cctools 986 & ld64 711 (fanquake) 1ed1183f47794d1a2d8deced58226b2a4e84eaf0 depends: libtapi 1300.0.6.5 (fanquake) Pull request description: Update [libtapi to `1300.0.6.5`](https://github.com/tpoechtrager/apple-libtapi/tree/1300.6.5), [cctools to `986` & ld64 to `711`](https://github.com/tpoechtrager/cctools-port/commits/986-ld64-711). Updating these dependencies fixes the macOS build failures in #27897, when using a native GCC 12 toolchain, which means after this change, we can use use GCC 12 for all HOSTS, rather than splitting between 12 & 10 (for macOS). Guix Build (x86_64): ```bash a684a3e7668250610d653e5160115fb50b477339423335b185bd4716c8420e14 guix-build-7d5815293ed8/output/aarch64-linux-gnu/SHA256SUMS.part 9c66b82e2c5b6dbdcabdd962481485f71af5770e8bb573eaefb55d45e85e2875 guix-build-7d5815293ed8/output/aarch64-linux-gnu/bitcoin-7d5815293ed8-aarch64-linux-gnu-debug.tar.gz 63f82714a93e7a3c0e922cdcce7d3b27789d63cdf136dc3a71b74d61b0910ce8 guix-build-7d5815293ed8/output/aarch64-linux-gnu/bitcoin-7d5815293ed8-aarch64-linux-gnu.tar.gz dcc79295462e0f585753959247ec02b273f5a933fadc5d528c266d56bbdaaf44 guix-build-7d5815293ed8/output/arm-linux-gnueabihf/SHA256SUMS.part 044fc0ad2a8615dd004579b5003fa981ebc4e3bfaacf5eba8a33cea02a9ba518 guix-build-7d5815293ed8/output/arm-linux-gnueabihf/bitcoin-7d5815293ed8-arm-linux-gnueabihf-debug.tar.gz a032899be14fa2987dfd5a21865567d3beea703e778a2f91ec17eddb099d0c46 guix-build-7d5815293ed8/output/arm-linux-gnueabihf/bitcoin-7d5815293ed8-arm-linux-gnueabihf.tar.gz 27d43a97ea6c4ed2e84d9a9dd6c240e8e199174f4491ee1fb62abb1d950a96bd guix-build-7d5815293ed8/output/arm64-apple-darwin/SHA256SUMS.part 029347186cc55c15152e8c255493ed457e58127ffa536982f3a632fc416b6662 guix-build-7d5815293ed8/output/arm64-apple-darwin/bitcoin-7d5815293ed8-arm64-apple-darwin-unsigned.dmg 791399447c33f7d3ed4d77fd22fde69aa7c87adda9291fca9508237b69b05b80 guix-build-7d5815293ed8/output/arm64-apple-darwin/bitcoin-7d5815293ed8-arm64-apple-darwin-unsigned.tar.gz b9c72b7f37068889a83384598b6de97c8e39e7a097b661152084a5e69236541d guix-build-7d5815293ed8/output/arm64-apple-darwin/bitcoin-7d5815293ed8-arm64-apple-darwin.tar.gz 6a249cc6d02d7398b9ed70b251422bf4bb1c2acdaafb5a885870e8ef20d43a89 guix-build-7d5815293ed8/output/dist-archive/bitcoin-7d5815293ed8.tar.gz 064e5e0df21aa177eaf8d67254ad5166b190559f69da68d34174a323d8c975c6 guix-build-7d5815293ed8/output/powerpc64-linux-gnu/SHA256SUMS.part 6aee00585bdd680d42f3341df523b7173dc06defa8f51f98af38c8518ddf4532 guix-build-7d5815293ed8/output/powerpc64-linux-gnu/bitcoin-7d5815293ed8-powerpc64-linux-gnu-debug.tar.gz d6e51b521c84276d5c9606a96ee36b94bc235370064cf75148d15d3a4011ed9d guix-build-7d5815293ed8/output/powerpc64-linux-gnu/bitcoin-7d5815293ed8-powerpc64-linux-gnu.tar.gz e0a133afe0e0e7894d3c6110b7b1895efff8f45abbe473d95100d3c5615dc855 guix-build-7d5815293ed8/output/powerpc64le-linux-gnu/SHA256SUMS.part 8d62884b81fca76720284ae4d5b2a0d0ebfcbcf533d9936c8aa8ab04739540e9 guix-build-7d5815293ed8/output/powerpc64le-linux-gnu/bitcoin-7d5815293ed8-powerpc64le-linux-gnu-debug.tar.gz c4c90dd3c83a84aa074ab5dc77b82fd2a26d872547037ef2a8a2d11abba1db98 guix-build-7d5815293ed8/output/powerpc64le-linux-gnu/bitcoin-7d5815293ed8-powerpc64le-linux-gnu.tar.gz dd28d196e89f74cf7666b347e1cbdd16eb90bfe0d5b054ac2edbf0e4f755bd9a guix-build-7d5815293ed8/output/riscv64-linux-gnu/SHA256SUMS.part 8d3ace8a17d4c1a13786adb3669b1d929485b164c59efb1fe7cf8fe3aad90f73 guix-build-7d5815293ed8/output/riscv64-linux-gnu/bitcoin-7d5815293ed8-riscv64-linux-gnu-debug.tar.gz bf530b7944dfdd9ffd03b2be541fa349e8598cb39ee5e1bd4be0b5b48bdfcc31 guix-build-7d5815293ed8/output/riscv64-linux-gnu/bitcoin-7d5815293ed8-riscv64-linux-gnu.tar.gz 6172224f94d52eb22a3749b1e3c0639476dfdaff47d15c6a8ec3e6dbf8763f9b guix-build-7d5815293ed8/output/x86_64-apple-darwin/SHA256SUMS.part f59f68ad4783ff1ecb09cd84f15bbfc803c856971de5a131fbb1777cf8f1b79a guix-build-7d5815293ed8/output/x86_64-apple-darwin/bitcoin-7d5815293ed8-x86_64-apple-darwin-unsigned.dmg ac31df20d1e5f3a73aadb5455e804af053b179ca6471b5a57afe3c7df0f09128 guix-build-7d5815293ed8/output/x86_64-apple-darwin/bitcoin-7d5815293ed8-x86_64-apple-darwin-unsigned.tar.gz a33f661386d415f621ab17edf7fe3efa61f0c2b0c3003fecd4f5f6898129992d guix-build-7d5815293ed8/output/x86_64-apple-darwin/bitcoin-7d5815293ed8-x86_64-apple-darwin.tar.gz 03104057b86de994258587ff5a8de16f48354a7493527e5bb2559714c0e2bf39 guix-build-7d5815293ed8/output/x86_64-linux-gnu/SHA256SUMS.part a9c3f233629038978b9fa11c1353b4e686406851c0e84a5539cf3bc90722d98b guix-build-7d5815293ed8/output/x86_64-linux-gnu/bitcoin-7d5815293ed8-x86_64-linux-gnu-debug.tar.gz 61db7ec4aa306a6f79628b217c05387b69002d123fcf07d6784cce03d9a8574d guix-build-7d5815293ed8/output/x86_64-linux-gnu/bitcoin-7d5815293ed8-x86_64-linux-gnu.tar.gz 7f5b42d02d8c026492376b644a94a45613155a0ccc1d3ef9f067b3370d45c4d2 guix-build-7d5815293ed8/output/x86_64-w64-mingw32/SHA256SUMS.part de23de0fb32c77f9ff91ffe554347c7ddc77fae22212d0e609389b4b7a1d6e29 guix-build-7d5815293ed8/output/x86_64-w64-mingw32/bitcoin-7d5815293ed8-win64-debug.zip 2131ce905aa3452883a9f47b6618506a6cb90c2a1725818084bc4e08856ff8d3 guix-build-7d5815293ed8/output/x86_64-w64-mingw32/bitcoin-7d5815293ed8-win64-setup-unsigned.exe 5555d28d9ea14a50ab296c2b1f1db7f7acde933009334999b6be29a2ed469bc0 guix-build-7d5815293ed8/output/x86_64-w64-mingw32/bitcoin-7d5815293ed8-win64-unsigned.tar.gz 7dc29c317c140ae8a8f487d2d66761c3fae90a5521dd4bfd0d071adbfafb30ef guix-build-7d5815293ed8/output/x86_64-w64-mingw32/bitcoin-7d5815293ed8-win64.zip ``` ACKs for top commit: TheCharlatan: ACK 7d5815293ed8a3dea68b61a78944e410f02b147f hebasto: ACK 7d5815293ed8a3dea68b61a78944e410f02b147f Tree-SHA512: 98873733abb2ebc318129d9fa6627d39f751495776338f539bd58985d08246c1fb85d6bb9b5911f0cd692c26e519713b93d496ffbae513a45942357b82497a91
2023-09-07net: detect wrong-network V1 talking to V2TransportPieter Wuille
2023-09-07test: add unit tests for V2TransportPieter Wuille
2023-09-07net: make V2Transport preallocate receive buffer spacePieter Wuille
2023-09-07net: make V2Transport send uniformly random number garbage bytesPieter Wuille
2023-09-07net: add short message encoding/decoding support to V2TransportPieter Wuille
2023-09-07net: make V2Transport auto-detect incoming V1 and fall back to itPieter Wuille
2023-09-07net: add V2Transport class with subset of BIP324 functionalityPieter Wuille
This introduces a V2Transport with a basic subset of BIP324 functionality: * no ability to send garbage (but receiving is supported) * no ability to send decoy packets (but receiving them is supported) * no support for short message id encoding (neither encoding or decoding) * no waiting until 12 non-V1 bytes have been received * (and thus) no detection of V1 connections on the responder side (on the sender side, detecting V1 is not supported either, but that needs to be dealt with at a higher layer, by reconnecting)
2023-09-07crypto: Spanify EllSwiftPubKey constructorPieter Wuille
2023-09-07net: remove unused Transport::SetReceiveVersionPieter Wuille
2023-09-07net: add have_next_message argument to Transport::GetBytesToSend()Pieter Wuille
Before this commit, there are only two possibly outcomes for the "more" prediction in Transport::GetBytesToSend(): * true: the transport itself has more to send, so the answer is certainly yes. * false: the transport has nothing further to send, but if vSendMsg has more message(s) left, that still will result in more wire bytes after the next SetMessageToSend(). For the BIP324 v2 transport, there will arguably be a third state: * definitely not: the transport has nothing further to send, but even if vSendMsg has more messages left, they can't be sent (right now). This happens before the handshake is complete. To implement this, we move the entire decision logic to the Transport, by adding a boolean to GetBytesToSend(), called have_next_message, which informs the transport whether more messages are available. The return values are still true and false, but they mean "definitely yes" and "definitely no", rather than "yes" and "maybe".
2023-09-07Merge bitcoin/bitcoin#25284: net: Use serialization parameters for CAddress ↵fanquake
serialization fa626af3edbe8d98b2de91dd71729ceef90389fb Remove unused legacy CHashVerifier (MarcoFalke) fafa3fc5a62702da72991497e3270034eb9159c0 test: add tests that exercise WithParams() (MarcoFalke) fac81affb527132945773a5315bd27fec61ec52f Use serialization parameters for CAddress serialization (MarcoFalke) faec591d64e40ba7ec7656cbfdda1a05953bde13 Support for serialization parameters (MarcoFalke) fac42e9d35f6ba046999b2e3a757ab720c51b6bb Rename CSerAction* to Action* (MarcoFalke) aaaa3fa9477eef9ea72e4a501d130c57b47b470a Replace READWRITEAS macro with AsBase wrapping function (MarcoFalke) Pull request description: It seems confusing that picking a wrong value for `ADDRV2_FORMAT` could have effects on consensus. (See the docstring of `ADDRV2_FORMAT`). Fix this by implementing https://github.com/bitcoin/bitcoin/issues/19477#issuecomment-1147421608 . This may also help with libbitcoinkernel, see https://github.com/bitcoin/bitcoin/pull/28327 ACKs for top commit: TheCharlatan: ACK fa626af3edbe8d98b2de91dd71729ceef90389fb ajtowns: ACK fa626af3edbe8d98b2de91dd71729ceef90389fb Tree-SHA512: 229d379da27308890de212b1fd2b85dac13f3f768413cb56a4b0c2da708f28344d04356ffd75bfcbaa4cabf0b6cc363c4f812a8f1648cff9e436811498278318
2023-09-07Merge bitcoin/bitcoin#28426: doc: s/--no-substitute/--no-substitutes in ↵fanquake
guix/INSTALL 8f541023b9582f8291d00ed4fc14a0db096b0113 doc: s/--no-substitute/--no-substitutes in guix/INSTALL (fanquake) Pull request description: https://guix.gnu.org/manual/en/html_node/Common-Build-Options.html ACKs for top commit: hebasto: ACK 8f541023b9582f8291d00ed4fc14a0db096b0113. TheCharlatan: ACK 8f541023b9582f8291d00ed4fc14a0db096b0113 Tree-SHA512: 4d79791a8fa772d35723d35e85aaf9ab86304f2a1238e883bbb85051d0cc5f9841dab99ef0fe1e9d67f6259798e98942be00ae7c4320328987234293d9bf3012
2023-09-07Merge bitcoin/bitcoin#28419: fuzz: introduce and use `ConsumePrivateKey` helperfanquake
583af18fd1d0bda5a6a1d0403ffc498a512a546d fuzz: introduce and use `ConsumePrivateKey` helper (Sebastian Falbesoner) Pull request description: In the course of reviewing BIP324 related PRs I noticed a frequent pattern of creating private keys (`CKey` instances) with data consumed from the fuzz data provider: ``` auto key_data = provider.ConsumeBytes<unsigned char>(32); key_data.resize(32); CKey key; key.Set(key_data.begin(), key_data.end(), /*fCompressedIn=*/true); ``` This PR introduces a corresponding helper `ConsumePrivateKey` in order to deduplicate code. The compressed flag can either be set to a fixed value, or, if `std::nullopt` is passed (=default), is also consumed from the fuzz data provider via `.ConsumeBool()`. Note that this is not a pure refactor, as some of the replaced call-sites previously consumed a random length (`ConsumeRandomLengthByteVector`) instead of a fixed size of 32 bytes for key data. As far as I can see, there is not much value in using a random size, as in all those cases we can only proceed or do something useful with a valid private key, and key data with sizes other than 32 bytes always lead to invalid keys. ACKs for top commit: sipa: utACK 583af18fd1d0bda5a6a1d0403ffc498a512a546d brunoerg: crACK 583af18fd1d0bda5a6a1d0403ffc498a512a546d Tree-SHA512: 58a178432ba1eb0a2f7597b6700e96477e8b10f429ef642445a52db12e74d81aec307888315b772bfda9610f90df3e1d556cf024c2bef1d520303b12584feaaa
2023-09-07doc: s/--no-substitute/--no-substitutes in guix/INSTALLfanquake
2023-09-06Merge bitcoin/bitcoin#26567: Wallet: estimate the size of signed inputs ↵Andrew Chow
using descriptors 10546a569c6c96a5ec1b9708abf9ff5c8644f669 wallet: accurately account for the size of the witness stack (Antoine Poinsot) 9b7ec393b82ca9d7ada77d06e0835df0386a8b85 wallet: use descriptor satisfaction size to estimate inputs size (Antoine Poinsot) 8d870a98731e8db5ecc614bb5f7c064cbf30c7f4 script/signingprovider: introduce a MultiSigningProvider (Antoine Poinsot) fa7c46b503f0b69630f55dc43021d2099e3515ba descriptor: introduce a method to get the satisfaction size (Antoine Poinsot) bdba7667d2d65f31484760a8e8420c488fc5f801 miniscript: introduce a helper to get the maximum witness size (Antoine Poinsot) 4ab382c2cdb09fb4056711b4336807845cbe1ad5 miniscript: make GetStackSize independent of P2WSH context (Antoine Poinsot) Pull request description: The wallet currently estimates the size of a signed input by doing a dry run of the signing logic. This is unnecessary since all outputs we can sign for can be represented by a descriptor, and we can derive the size of a satisfaction ("signature") directly from the descriptor itself. In addition, the current approach does not generalize well: dry runs of the signing logic are only possible for the most basic scripts. See for instance the discussion in #24149 around that. This introduces a method to get the maximum size of a satisfaction from a descriptor, and makes the wallet use that instead of the dry-run. ACKs for top commit: sipa: utACK 10546a569c6c96a5ec1b9708abf9ff5c8644f669 achow101: re-ACK 10546a569c6c96a5ec1b9708abf9ff5c8644f669 Tree-SHA512: 43ed1529fbd30af709d903c8c5063235e8c6a03b500bc8f144273d6184e23a53edf0fea9ef898ed57d8a40d73208b5d935cc73b94a24fad3ad3c63b3b2027174
2023-09-06Merge bitcoin/bitcoin#28409: test: Combine sync_send_with_ping and ↵fanquake
sync_with_ping fae0b21e6c7a27f08ea8f8b49198c734f923b5da test: Combine sync_send_with_ping and sync_with_ping (MarcoFalke) Pull request description: This reduces bloat, complexity, and makes tests less fragile to intermittent failures, see https://github.com/bitcoin/bitcoin/pull/27675#discussion_r1315648343. This should not cause any noticeable slowdown, or may even be faster, because active polling will be done at most once. ACKs for top commit: glozow: Concept ACK fae0b21e6c7a27f08ea8f8b49198c734f923b5da theStack: ACK fae0b21e6c7a27f08ea8f8b49198c734f923b5da 🏓 Tree-SHA512: 6c543241a7b85458dc7ff6a6203316b80a6227d83d38427e74f53f4c666a882647a8a221e5259071ee7bb5dfd63476fb03c9b558a1ea546734b14728c3c619ba
2023-09-06doc: add release note for PR #28414Matthew Zipkin
2023-09-06test: remove unnecessary finalizepsbt rpc callsismaelsadeeq
2023-09-06depends: cctools 986 & ld64 711fanquake
2023-09-06depends: libtapi 1300.0.6.5fanquake
2023-09-06fuzz: introduce and use `ConsumePrivateKey` helperSebastian Falbesoner
2023-09-05wallet rpc: return final tx hex from walletprocesspsbt if completeMatthew Zipkin
2023-09-05Merge bitcoin/bitcoin#28151: build: use `-muse-unaligned-vector-move` for ↵fanquake
Windows builds 96f2cf8d2c3e0fba2a39dabd991dee69124cc79d build: use -muse-unaligned-vector-move for Windows (fanquake) Pull request description: We currently work around a longstanding GCC issue with aligned vector instructions, by patching the behaviour we want into GCC (see discussion in #24736). Possibly in response to the GCC thread (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412#c40), a new option was [introduced into the binutils assembler](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c8480b58e1968f209b6365af7422678f348222c2) with the 2.38 release: ``` x86: Add -muse-unaligned-vector-move to assembler Unaligned load/store instructions on aligned memory or register are as fast as aligned load/store instructions on modern Intel processors. Add a command-line option, -muse-unaligned-vector-move, to x86 assembler to encode encode aligned vector load/store instructions as unaligned vector load/store instructions. ``` ACKs for top commit: theuni: ACK 96f2cf8d2c3e0fba2a39dabd991dee69124cc79d. Tree-SHA512: f5aaa125922bb17bbb51454103b3394d293184214b0dea554c36c2f130488a3ede2f39678044ec846fa0fdf4cd441d4227f4565c29d380f5a73b50bf6f3b9a67
2023-09-05test: remove unused variables in `p2p_invalid_block`brunoerg
2023-09-05Merge bitcoin/bitcoin#28195: blockstorage: Drop legacy -txindex checkfanquake
fae405556d56f6f13ce57f69a06b9ec1e825422b scripted-diff: Rename CBlockTreeDB -> BlockTreeDB (MarcoFalke) faf63039cce40f5cf8dea5a1d24945773c3433a1 Fixup style of moved code (MarcoFalke) fa65111b99627289fd47dcfaa5197e0f09b8a50e move-only: Move CBlockTreeDB to node/blockstorage (MarcoFalke) fa8685597e7302fc136f21b6dd3a4b187fa8e251 index: Drop legacy -txindex check (MarcoFalke) fa69148a0a26c5054dbccdceeac8e117bf449275 scripted-diff: Use blocks_path where possible (MarcoFalke) Pull request description: The only reason for the check was to print a warning about an increase in storage use. Now that 22.x is EOL and everyone should have migrated (or decided to not care about storage use), remove the check. Also, a move-only commit is included. (Rebased from https://github.com/bitcoin/bitcoin/pull/22242) ACKs for top commit: TheCharlatan: ACK fae405556d56f6f13ce57f69a06b9ec1e825422b, though I lack historical context to really judge the second commit fa8685597e7302fc136f21b6dd3a4b187fa8e251. stickies-v: ACK fae405556d56f6f13ce57f69a06b9ec1e825422b Tree-SHA512: 9da8f48767ae52d8e8e21c09a40c949cc0838794f1856cc5f58a91acd3f00a3bca818c8082242b3fdc9ca5badb09059570bb3870850d3807b75a8e23b5222da1
2023-09-05test: Combine sync_send_with_ping and sync_with_pingMarcoFalke
2023-09-05Merge bitcoin/bitcoin#28404: Update libsecp256k1 subtree to release 0.4.0fanquake
c0da4f60e2145a9838c0c5d0a02592faf16d2d8d Squashed 'src/secp256k1/' changes from c545fdc374..199d27cea3 (Pieter Wuille) Pull request description: We had previously pulled in a non-released commit along with #27479. The necessary changes have now been released in version 0.4.0, so update to that. ACKs for top commit: hebasto: ACK 0e0fc18c3cf8c0aa4cca85c4294416463f157870, having a zero diff with my local branch that updates the `secp256k1` subtree up to v0.4.0. fanquake: ACK 0e0fc18c3cf8c0aa4cca85c4294416463f157870 Tree-SHA512: 8b771e7da89b9cdb7a680b9dd4eb99a6f737b32914b0b62c485b3c484e5438f9f60942030d3072243aaa196da22d2b1fdb3b6a668d75a46e6ac78c9d86b4bd8b
2023-09-05Merge bitcoin/bitcoin#28359: ci: Asan with -ftrivial-auto-var-init=patternfanquake
fa07ac48d804beac38a98d23be2167f78cadefae ci: Asan with -ftrivial-auto-var-init=pattern (MarcoFalke) Pull request description: This makes memory bugs deterministic. `-ftrivial-auto-var-init=pattern` is incompatible with other memory sanitizers (like valgrind and msan), but that is irrelevant here, because the address sanitizer in this fuzz CI config is already incompatible with them. `-ftrivial-auto-var-init=pattern` goes well with `-fsanitize=bool` and `-fsanitize=enum`, but those are already enabled via `-fsanitize=undefined`. See https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks ACKs for top commit: fanquake: ACK fa07ac48d804beac38a98d23be2167f78cadefae - going to get back to fixing up the cxxflags usage in CI, but not a blocker here: Tree-SHA512: 2ea6c5128a9cd262bdd1b1475c7e1be23ce2c520fad05f6c2aace6c29e203573323c0564d272e25da35ad5ff46fde488a5eae1ed14d3349e793d14a5e2533fb1
2023-09-05Merge bitcoin/bitcoin#28386: test: remove fixed timeouts from ↵fanquake
feature_config_args fbcacd4cf0dbe54e51f89cda05ff3db9e378ea12 test: remove fixed timeouts from feature_config_args (Martin Zumsande) Pull request description: Fixes #28290 These fixed timeouts aren't affected by the `timeout_factor` option and can therefore cause timeouts in slow environments. They are also unnecessary for the test because they measure the wrong thing: While there is an internal waiting time of 60s within `ThreadOpenConnections` (beginning only when that thread is started) for fixed seeds querying, the timeouts here don't measure that but the time from startup until a debug log message is encountered, during which many other things happen in init, so they don't make much sense to me in the first place. ACKs for top commit: MarcoFalke: lgtm ACK fbcacd4cf0dbe54e51f89cda05ff3db9e378ea12 Tree-SHA512: 7bb3b7db2f9666b1929ffb7773c838ee98b0845569428e5d00ecf5234973d534c4f474e213896c71baabd6096a79347bd21b41a17b130053049714eb8a447c79
2023-09-05Merge bitcoin/bitcoin#28396: test: p2p: check that `getaddr` msgs are only ↵fanquake
responded once per connection 668aa6af8d5fbf047d43cf6f85f3335565637fb9 test: p2p: check that `getaddr` msgs are only responded once per connection (Sebastian Falbesoner) Pull request description: This simple PR adds missing test coverage for ignoring repeated `getaddr` requests (introduced in #7856, commit 66b07247a7a9e48e082502338176cc06edf61474): https://github.com/bitcoin/bitcoin/blob/6f03c45f6bb5a6edaa3051968b6a1ca4f84d2ccb/src/net_processing.cpp#L4642-L4648 ACKs for top commit: MarcoFalke: lgtm ACK 668aa6af8d5fbf047d43cf6f85f3335565637fb9 brunoerg: crACK 668aa6af8d5fbf047d43cf6f85f3335565637fb9 Tree-SHA512: edcdc6501c684fb41911e393f55ded9b044cd2f92918877eca152edd5a4287d1a9d57ae999f1cb42185eae00c3a0af411fcb9bcd5b990ef48849c3834b141584
2023-09-05Merge bitcoin/bitcoin#28402: ci: Bump `actions/checkout` versionfanquake
f10acecd436a1ef26a7c139c7d039913560e8f3c ci: Bump `actions/checkout` version (Hennadii Stepanov) Pull request description: See: https://github.com/actions/checkout/releases/tag/v4.0.0. ACKs for top commit: MarcoFalke: lgtm ACK f10acecd436a1ef26a7c139c7d039913560e8f3c Tree-SHA512: fc71876ee1df881a61295fc3b3cd3dac0c17b3651ad725076d3ff0b8975bab0d37c03cd421e6e88ddcf2e28910c96e3f1fa8fd5d5280e06e5a7a7ec683f7b930
2023-09-05Merge bitcoin/bitcoin#28291: rpc: removed StrFormatInternalBug quote ↵fanquake
delimitation 6e8f6468cbf1320b70cf01333002a31b44cb7c33 removed StrFormatInternalBug quote delimitation (Reese Russell) Pull request description: This PR rectifies an unnecessary set of quotes delimiting the contents of ```StrFormatInternalBug```. This is a follow up to MarcoFalke https://github.com/bitcoin/bitcoin/pull/28123#discussion_r1297191493. The method of action was to remove the escaped quotes that were a part of strprintf. A single functional test case was modified to reflect the new output format. ```STR_INTERNAL_BUG``` was applied to https://github.com/bitcoin/bitcoin/pull/28123 in ```std::string RPCArg::ToString(const bool oneline)``` in ```rpc/util.cpp``` The results can be seen below. Previously ![image](https://github.com/bitcoin/bitcoin/assets/3104223/53f9ea59-317f-4c62-9fc1-04255eeb4641) This PR ![image](https://github.com/bitcoin/bitcoin/assets/3104223/5c6a3110-f1f3-4b3c-8e8a-9c8f1c3176e7) Additional context can be found here. https://github.com/bitcoin/bitcoin/pull/28123#discussion_r1271871716 Thank you. ACKs for top commit: MarcoFalke: review ACK 6e8f6468cbf1320b70cf01333002a31b44cb7c33 stickies-v: ACK 6e8f6468cbf1320b70cf01333002a31b44cb7c33 Tree-SHA512: 35317e31a527630495b566407e37db9941dab7f81cfaeb1ea3309683c48e4273284645ad615f73e646a137b4f2ae35933603e9182a7dbdd22cac98d038c491dc
2023-09-05Remove unused legacy CHashVerifierMarcoFalke
2023-09-05test: add tests that exercise WithParams()MarcoFalke
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
2023-09-05Use serialization parameters for CAddress serializationMarcoFalke
This also cleans up the addrman (de)serialization code paths to only allow `Disk` serialization. Some unit tests previously forced a `Network` serialization, which does not make sense, because Bitcoin Core in production will always `Disk` serialize. This cleanup idea was suggested by Pieter Wuille and implemented by Anthony Towns. Co-authored-by: Pieter Wuille <pieter@wuille.net> Co-authored-by: Anthony Towns <aj@erisian.com.au>
2023-09-04Update secp256k1 subtree to upstream release 0.4.0Pieter Wuille
2023-09-04Squashed 'src/secp256k1/' changes from c545fdc374..199d27cea3Pieter Wuille
199d27cea3 Merge bitcoin-core/secp256k1#1415: release: Prepare for 0.4.0 16339804c9 release: Prepare for 0.4.0 d9a85065a9 changelog: Catch up in preparation of release 0b4640aedd Merge bitcoin-core/secp256k1#1413: ci: Add `release` job 8659a01714 ci: Add `release` job f9b38894ba ci: Update `actions/checkout` version 727bec5bc2 Merge bitcoin-core/secp256k1#1414: ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot 2635068abf ci/gha: Let MSan continue checking after errors in all jobs e78c7b68eb ci/Dockerfile: Reduce size of Docker image further 2f0d3bbffb ci/Dockerfile: Warn if `ulimit -n` is too high when running Docker 4b8a647ad3 ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot 6ebe7d2bb3 ci/Dockerfile: Always use versioned clang packages 65c79fe2d0 Merge bitcoin-core/secp256k1#1412: ci: Switch macOS from Ventura to Monterey and add Valgrind c223d7e33d ci: Switch macOS from Ventura to Monterey and add Valgrind ea26b71c3a Merge bitcoin-core/secp256k1#1411: ci: Make repetitive command the default one cce0456304 ci: Make repetitive command the default one 317a4c48f0 ci: Move `git config ...` to `run-in-docker-action` 4d7fe60905 Merge bitcoin-core/secp256k1#1409: ci: Move remained task from Cirrus to GitHub Actions 676ed8f9cf ci: Move "C++ (public headers)" from Cirrus to GitHub Actions 61fc3a2dc8 ci: Move "C++ -fpermissive..." from Cirrus to GitHub Actions d51fb0a533 ci: Move "MSan" from Cirrus to GitHub Actions c22ac27529 ci: Move sanitizers task from Cirrus to GitHub Actions 26a989924b Merge bitcoin-core/secp256k1#1410: ci: Use concurrency for pull requests only ee1be62d84 ci: Use concurrency for pull requests only 6ee14550c8 Merge bitcoin-core/secp256k1#1406: ci, gha: Move more non-x86_64 tasks from Cirrus CI to GitHub Actions fc3dea29ea ci: Move "ppc64le: Linux..." from Cirrus to GitHub Actions 7782dc8276 ci: Move "ARM64: Linux..." from Cirrus to GitHub Actions 0a16de671c ci: Move "ARM32: Linux..." from Cirrus to GitHub Actions ea33914e00 ci: Move "s390x (big-endian): Linux..." from Cirrus to GitHub Actions 880be8af99 ci: Move "i686: Linux (Debian stable)" from Cirrus to GiHub Actions 2e6cf9bae5 Merge bitcoin-core/secp256k1#1396: ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job 5373693e45 Merge bitcoin-core/secp256k1#1405: ci: Drop no longer needed workaround ef9fe959de ci: Drop no longer needed workaround e10878f58e ci, gha: Drop `driver-opts.network` input for `setup-buildx-action` 4ad4914bd1 ci, gha: Add `retry_builder` Docker image builder 6617a620d9 ci: Remove "x86_64: Linux (Debian stable)" task from Cirrus CI 03c9e6508c ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job ad3e65d9fe ci: Remove GCC build files and sage to reduce size of Docker image 6b9507adf6 Merge bitcoin-core/secp256k1#1398: ci, gha: Add Windows jobs based on Linux image 87d35f30c0 ci: Rename `cirrus.sh` to more general `ci.sh` d6281dd008 ci: Remove Windows tasks from Cirrus CI 2b6f9cd546 ci, gha: Add Windows jobs based on Linux image 48b1d939b5 Merge bitcoin-core/secp256k1#1403: ci, gha: Ensure only a single workflow processes `github.ref` at a time 0ba2b94551 Merge bitcoin-core/secp256k1#1373: Add invariant checking for scalars 060e32cb60 Merge bitcoin-core/secp256k1#1401: ci, gha: Run all MSVC tests on Windows natively de657c2044 Merge bitcoin-core/secp256k1#1062: Removes `_fe_equal_var`, and unwanted `_fe_normalize_weak` calls (in tests) bcffeb14bc Merge bitcoin-core/secp256k1#1404: ci: Remove "arm64: macOS Ventura" task from Cirrus CI c2f6435802 ci: Add comment about switching macOS to M1 on GHA later 4a24fae0bc ci: Remove "arm64: macOS Ventura" task from Cirrus CI b0886fd35c ci, gha: Ensure only a single workflow processes `github.ref` at a time 3d05c86d63 Merge bitcoin-core/secp256k1#1394: ci, gha: Run "x86_64: macOS Ventura" job on GitHub Actions d78bec7001 ci: Remove Windows MSVC tasks from Cirrus CI 3545dc2b9b ci, gha: Run all MSVC tests on Windows natively 5d8fa825e2 Merge bitcoin-core/secp256k1#1274: test: Silent noisy clang warnings about Valgrind code on macOS x86_64 8e54a346d2 ci, gha: Run "x86_64: macOS Ventura" job on GitHub Actions b327abfcea Merge bitcoin-core/secp256k1#1402: ci: Use Homebrew's gcc in native macOS task d62db57427 ci: Use Homebrew's gcc in native macOS task 54058d16fe field: remove `secp256k1_fe_equal_var` bb4efd6404 tests: remove unwanted `secp256k1_fe_normalize_weak` call eedd781085 Merge bitcoin-core/secp256k1#1348: tighten group magnitude limits, save normalize_weak calls in group add methods (revival of #1032) b2f6712dd3 Merge bitcoin-core/secp256k1#1400: ctimetests: Use new SECP256K1_CHECKMEM macros also for ellswift 9c91ea41b1 ci: Enable ellswift module where it's missing db32a24761 ctimetests: Use new SECP256K1_CHECKMEM macros also for ellswift ce765a5b8e Merge bitcoin-core/secp256k1#1399: ci, gha: Run "SageMath prover" job on GitHub Actions 8408dfdc4c Revert "ci: Run sage prover on CI" c8d9914fb1 ci, gha: Run "SageMath prover" job on GitHub Actions 8d2960c8e2 Merge bitcoin-core/secp256k1#1397: ci: Remove "Windows (VS 2022)" task from Cirrus CI f1774e5ec4 ci, gha: Make MSVC job presentation more explicit 5ee039bb58 ci: Remove "Windows (VS 2022)" task from Cirrus CI 96294c00fb Merge bitcoin-core/secp256k1#1389: ci: Run "Windows (VS 2022)" job on GitHub Actions a2f7ccdecc ci: Run "Windows (VS 2022)" job on GitHub Actions 374e2b54e2 Merge bitcoin-core/secp256k1#1290: cmake: Set `ENVIRONMENT` property for examples on Windows 1b13415df9 Merge bitcoin-core/secp256k1#1391: refactor: take use of `secp256k1_scalar_{zero,one}` constants (part 2) a1bd4971d6 refactor: take use of `secp256k1_scalar_{zero,one}` constants (part 2) b7c685e74a Save _normalize_weak calls in group add methods c83afa66e0 Tighten group magnitude limits 26392da2fb Merge bitcoin-core/secp256k1#1386: ci: print $ELLSWIFT in cirrus.sh d23da6d557 use secp256k1_scalar_verify checks 4692478853 ci: print $ELLSWIFT in cirrus.sh c7d0454932 add verification for scalars c734c64278 Merge bitcoin-core/secp256k1#1384: build: enable ellswift module via SECP_CONFIG_DEFINES ad152151b0 update max scalar in scalar_cmov_test and fix schnorrsig_verify exhaustive test 78ca880788 build: enable ellswift module via SECP_CONFIG_DEFINES 0e00fc7d10 Merge bitcoin-core/secp256k1#1383: util: remove unused checked_realloc b097a466c1 util: remove unused checked_realloc 2bd5f3e618 Merge bitcoin-core/secp256k1#1382: refactor: Drop unused cast 4f8c5bd761 refactor: Drop unused cast 173e8d061a Implement current magnitude assumptions 49afd2f5d8 Take use of _fe_verify_magnitude in field_impl.h 4e9661fc42 Add _fe_verify_magnitude (no-op unless VERIFY is enabled) 690b0fc05a add missing group element invariant checks 175db31149 ci: Drop no longer needed `PATH` variable update on Windows 116d2ab3df cmake: Set `ENVIRONMENT` property for examples on Windows cef373997c cmake, refactor: Use helper function instead of interface library 747ada3587 test: Silent noisy clang warnings about Valgrind code on macOS x86_64 git-subtree-dir: src/secp256k1 git-subtree-split: 199d27cea32203b224b208627533c2e813cd3b21
2023-09-04ci: Limit test-each-commit to --max-count=6MarcoFalke
2023-09-04ci: Add test-each-commit taskMarcoFalke
2023-09-04ci: Bump `actions/checkout` versionHennadii Stepanov
See: https://github.com/actions/checkout/releases/tag/v4.0.0
2023-09-03test: p2p: check that `getaddr` msgs are only responded once per connectionSebastian Falbesoner
2023-09-02Merge bitcoin/bitcoin#28383: Update translations for 26.0 soft translation ↵fanquake
string freeze 162ce4e5dd1899c2bd9418d8bf023bf344ffc2cc qt: Update translation source file (Hennadii Stepanov) 19520bff0975d456727575c5834b94f1525221b5 qt: Bump Transifex slug for 26.x (Hennadii Stepanov) 69821b27f59a4fe56a0284908b14ba15d314e6d0 qt: Translation updates from Transifex (Hennadii Stepanov) Pull request description: This PR follows our [Release Process](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md). Required to open Transifex translations for 26.0 on 2023-09-01 as it's [planned](https://github.com/bitcoin/bitcoin/issues/27758). The previous similar PR: https://github.com/bitcoin/bitcoin/pull/27169. ACKs for top commit: stickies-v: ACK 162ce4e5dd1899c2bd9418d8bf023bf344ffc2cc jarolrod: ACK 162ce4e5dd1899c2bd9418d8bf023bf344ffc2cc Tree-SHA512: a810c727e5c9fb3ffe4ff88ca7c5484178c483b38adb4b67758fb1f3e75b0d0ffb755fdc43de3fa59607f45833ec3594d87649fd6f0a40ed8a249ee5fa6979dd
2023-09-01test: remove fixed timeouts from feature_config_argsMartin Zumsande
They cannot be scaled by the timeout_factor option and can therefore cause timeouts in slow environments. They are also not necessary for the test, since they measure time frome startup until a debug message is encountered, which is not restricted to 1 minute by any internal logic within bitcoind.
2023-09-01Merge bitcoin/bitcoin#28350: Log explicit error message when coindb is found ↵Andrew Chow
in inconsistent state df60de770d8e27c00eced29d8a4a4bce7c6e4b30 log: Print error message when coindb is in inconsistent state (Fabian Jahr) Pull request description: While doing manual testing on assumeutxo this week I managed to put the coindb into an inconsistent state twice. For a normal user, this can also happen if their computer crashes during a flush or if they try to stop their node during a flush and then get tired of waiting and just shut their computer down or kill the process. It's an edge case but I wouldn't be surprised if this does happen more often when assumeutxo gets used more widely because there might be multiple flushes happening during loading of the UTXO set in the beginning and users may think something is going wrong because of the unexpected wait or they forgot some configs and want to start over quickly. The problem is, when this happens at first the node starts up normally until it's time to flush again and then it hits an assert that the user can not understand. ``` 2023-08-25T16:31:09Z [httpworker.0] [snapshot] 52000000 coins loaded (43.30%, 6768 MB) 2023-08-25T16:31:16Z [httpworker.0] Cache size (7272532192) exceeds total space (7256510300) 2023-08-25T16:31:16Z [httpworker.0] FlushSnapshotToDisk: flushing coins cache (7272 MB) started Assertion failed: (old_heads[0] == hashBlock), function BatchWrite, file txdb.cpp, line 126. Abort trap: 6 ``` We should at least log an error message that gives users a hint of what the problem is and what they can do to resolve it. I am keeping this separate from the assumeutxo project since this issue can also happen during any regular flush. ACKs for top commit: jonatack: ACK df60de770d8e27c00eced29d8a4a4bce7c6e4b30 achow101: ACK df60de770d8e27c00eced29d8a4a4bce7c6e4b30 ryanofsky: Code review ACK df60de770d8e27c00eced29d8a4a4bce7c6e4b30 jamesob: Code review ACK df60de770d8e27c00eced29d8a4a4bce7c6e4b30 Tree-SHA512: b546aa0b0323ece2962867a29c38e014ac83ae8f1ded090da2894b4ff2450c05229629c7e8892f7b550cf7def4038a0b4119812e548e11b00c60b1dc3d4276d2
2023-09-01Merge bitcoin/bitcoin#28384: ci: Avoid oversubscription in functional tests ↵glozow
on Windows f2d4e510b37c0b132732ede214d29a8bf1daea93 ci: Avoid saving the same Ccache cache (Hennadii Stepanov) 14e5de6d0253448f9b284f0705e4697b479a8677 ci: Avoid oversubscription in functional tests on Windows (Hennadii Stepanov) Pull request description: This PR aims to reduce the frequency of functional test failures on Windows like this [one](https://github.com/bitcoin/bitcoin/actions/runs/6040229997): ``` 2023-09-01T01:05:01.850000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_framework.py", line 552, in start_nodes node.wait_for_rpc_connection() File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_node.py", line 296, in wait_for_rpc_connection self._raise_assertion_error("Unable to connect to bitcoind after {}s".format(self.rpc_timeout)) File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_node.py", line 177, in _raise_assertion_error raise AssertionError(self._node_msg(msg)) AssertionError: [node 1] Unable to connect to bitcoind after 2400s ``` This code has had zero failures in my personal repository in more than 25 runs (and is still counting). --- The second commit is a minor improvement to avoid "Cache save failed." warnings during job re-runs. For [example](https://github.com/bitcoin/bitcoin/actions/runs/5998688759): ![image](https://github.com/bitcoin/bitcoin/assets/32963518/d8a049df-fccd-4395-99c9-4be01d0ea706) ACKs for top commit: MarcoFalke: lgtm ACK f2d4e510b37c0b132732ede214d29a8bf1daea93 🐾 Tree-SHA512: 0c92817d37325a114886900e49a4d644201397d98d6ac9f2dcd41170c7e7ea2cb1873f7e51b5cb3ad3cc2e59554ad1c8f87d439ea6c1c960bf5c339153be7040
2023-09-01ci: Avoid saving the same Ccache cacheHennadii Stepanov
This occurred when a job was being rerun.