Repository navigation
Conversation
|
🕓 Review not started yet because this PR is a draft.
Commit bb12578. Normal review starts when eligible; priority review starts as soon as a slot is available. |
|
This pull request has conflicts, please rebase. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
This head is not buildable. CI reports the stale CRecipient member access, unresolved address-symbol references from the kernel library, and a GCC -Werror maybe-uninitialized failure caused by the new CNoDestination representation. The destination refactor also contains a Dash-specific recipient construction issue, an incorrect numeric sort format, and an omitted upstream fuzz-test transformation.
🔴 3 blocking | 🟡 2 suggestion(s) | 💬 1 nitpick(s)
4 finding(s) not shown inline (the lines are not part of this PR's diff)
🔴 Blocking: Update the BIP69 comparator for the renamed recipient field
src/wallet/spend.cpp:1111
CRecipient now stores its destination in dest, but this comparator still accesses the removed scriptPubKey member. The source-build CI logs show compilation failures at this exact line on the aarch64, Windows, and Linux builds. Compare the reconstructed scripts from the destinations instead.
return a.nAmount < b.nAmount || (a.nAmount == b.nAmount && GetScriptForDestination(a.dest) < GetScriptForDestination(b.dest));
source: gpt-6.1-sol (phase2-reviewer: general)
🔴 Blocking: Link addresstype.cpp into libdashkernel
src/Makefile.am:1281-1288
addresstype.cpp is included in libbitcoin_common_a_SOURCES but is absent from libdashkernel_la_SOURCES. The kernel library directly contains callers in Evolution, validation, key I/O, and txmempool that now reference the moved address symbols, while libdashkernel does not link libbitcoin_common. The linux64_nowallet CI link step consequently reports unresolved references to PKHash constructors, ExtractDestination, IsValidDestination, GetScriptForDestination, and related functions. Add addresstype.cpp to the kernel source list.
libdashkernel_la_SOURCES = \
addresstype.cpp \
kernel/bitcoinkernel.cpp \
source: gpt-6.1-sol (phase2-reviewer: general)
🟡 Suggestion: Pass the Platform funding destination directly to CRecipient
src/wallet/interfaces.cpp:496-497
CRecipient now represents a CTxDestination, but this call first converts the PKHash into a script and then implicitly wraps that script as CNoDestination. GetScriptForDestination still reconstructs the same output script, so transaction serialization is preserved, but the recipient loses its PKHash type and any recipient-level destination or validity handling will see it as a raw script. Pass the PKHash directly.
CRecipient{PKHash{funding_pubkey.value}, credit_amount,
/*fSubtractFeeFromAmount=*/false, /*fPlatformTransfer=*/true}
source: muse-spark-1.3-contributor (phase1-reviewer: general)
🟡 Suggestion: Restore the omitted bitcoin#28246 fuzz-test transformation
src/test/fuzz/key.cpp:203-212
The current fuzz test still constructs PKHash(pubkey) directly and only checks script and address round-tripping. The upstream bitcoin#28246 merge transformation uses GetDestinationForKey(pubkey, output_type), checks the selected output type and destination validity, and verifies the destination through GetKeyForDestination. The corresponding helper and lookup APIs are present in this tree, so this upstream test hunk can be adapted rather than omitted.
source: gpt-6.1-sol (phase2-reviewer: general, backport-reviewer, dash-core-commit-history)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — This is a large, intricate backport that changes critical consensus and storage surfaces, including block storage and chainstate handling in src/node/blockstorage.cpp and related deserialization and validation code. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— backport-reviewer (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `src/wallet/spend.cpp`:
- [BLOCKING] src/wallet/spend.cpp:1111: Update the BIP69 comparator for the renamed recipient field
CRecipient now stores its destination in dest, but this comparator still accesses the removed scriptPubKey member. The source-build CI logs show compilation failures at this exact line on the aarch64, Windows, and Linux builds. Compare the reconstructed scripts from the destinations instead.
In `src/Makefile.am`:
- [BLOCKING] src/Makefile.am:1281-1288: Link addresstype.cpp into libdashkernel
addresstype.cpp is included in libbitcoin_common_a_SOURCES but is absent from libdashkernel_la_SOURCES. The kernel library directly contains callers in Evolution, validation, key I/O, and txmempool that now reference the moved address symbols, while libdashkernel does not link libbitcoin_common. The linux64_nowallet CI link step consequently reports unresolved references to PKHash constructors, ExtractDestination, IsValidDestination, GetScriptForDestination, and related functions. Add addresstype.cpp to the kernel source list.
In `src/addresstype.h`:
- [BLOCKING] src/addresstype.h:20: Initialize the script held by the default CNoDestination
CNoDestination now contains a CScript, but its default constructor remains defaulted. GCC 14 reports that the prevector size inside that script may be uninitialized while destroying the default CTxDestination created in CWallet::IsSpentKey; the Linux source build promotes this diagnostic to an error. Explicitly value-initialize m_script so the compiler can establish that the contained prevector is initialized.
In `src/wallet/interfaces.cpp`:
- [SUGGESTION] src/wallet/interfaces.cpp:496-497: Pass the Platform funding destination directly to CRecipient
CRecipient now represents a CTxDestination, but this call first converts the PKHash into a script and then implicitly wraps that script as CNoDestination. GetScriptForDestination still reconstructs the same output script, so transaction serialization is preserved, but the recipient loses its PKHash type and any recipient-level destination or validity handling will see it as a raw script. Pass the PKHash directly.
In `src/qt/transactiontablemodel.cpp`:
- [NITPICK] src/qt/transactiontablemodel.cpp:703: Use numeric zero-padding for the transaction date sort key
The format uses %020s for the qint64 timestamp. tinyformat treats %s as stream string formatting, so the width is space-padding rather than zero-padding. Current timestamps happen to have the same digit count, but the sort key is not robust for timestamps with different widths. Use an integer conversion.
In `src/test/fuzz/key.cpp`:
- [SUGGESTION] src/test/fuzz/key.cpp:203-212: Restore the omitted bitcoin#28246 fuzz-test transformation
The current fuzz test still constructs PKHash(pubkey) directly and only checks script and address round-tripping. The upstream bitcoin#28246 merge transformation uses GetDestinationForKey(pubkey, output_type), checks the selected output type and destination validity, and verifies the destination through GetKeyForDestination. The corresponding helper and lookup APIs are present in this tree, so this upstream test hunk can be adapted rather than omitted.
| CScript m_script; | ||
|
|
||
| public: | ||
| CNoDestination() = default; |
There was a problem hiding this comment.
🔴 Blocking: Initialize the script held by the default CNoDestination
CNoDestination now contains a CScript, but its default constructor remains defaulted. GCC 14 reports that the prevector size inside that script may be uninitialized while destroying the default CTxDestination created in CWallet::IsSpentKey; the Linux source build promotes this diagnostic to an error. Explicitly value-initialize m_script so the compiler can establish that the contained prevector is initialized.
| CNoDestination() = default; | |
| CNoDestination() : m_script{} {} |
source: gpt-6.1-sol (phase2-reviewer: general, backport-reviewer, dash-core-commit-history)
| return QString::fromStdString(rec->status.sortKey); | ||
| case Date: | ||
| return rec->time; | ||
| return QString::fromStdString(strprintf("%020s-%s", rec->time, rec->status.sortKey)); |
There was a problem hiding this comment.
💬 Nitpick: Use numeric zero-padding for the transaction date sort key
The format uses %020s for the qint64 timestamp. tinyformat treats %s as stream string formatting, so the width is space-padding rather than zero-padding. Current timestamps happen to have the same digit count, but the sort key is not robust for timestamps with different widths. Use an integer conversion.
| return QString::fromStdString(strprintf("%020s-%s", rec->time, rec->status.sortKey)); | |
| return QString::fromStdString(strprintf("%020d-%s", rec->time, rec->status.sortKey)); |
source: muse-spark-1.3-contributor (phase1-reviewer: general)
5a0688a test: enable reindex readonly test on *BSD and macOS as root (Matthew Zipkin) Pull request description: see bitcoin#27850 (comment) OpenBSD and FreeBSD don't have `chattr` but they do have `chflags`, use that method to make the block file immutable for the reindex_readonly test. Written and tested on a VPS running FreeBSD: ``` FreeBSD freebsd-13-1 13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64 ``` ACKs for top commit: maflcko: re-cr-lgtm-ACK 5a0688a jonatack: ACK 5a0688a tested on macOS only theStack: ACK 5a0688a Tree-SHA512: 8c88d282d09c00355d22c4c504b779f60e420327a5e07bcf80fa77b97fefcb04952af9ceaf439d9033a0a2448cb26a02663fe6bddcd4a74792857cfbaf1c5162 Co-authored-by: fanquake <fanquake@gmail.com>
…from kernel headers d506765 [refactor] Remove compat.h from kernel headers (TheCharlatan) 36193af [refactor] Remove netaddress.h from kernel headers (TheCharlatan) 2b08c55 [refactor] Add CChainParams member to CConnman (TheCharlatan) f0d1d8b [refactor] Add missing includes for next commit (TheCharlatan) 534b314 kernel: Move MessageStartChars to its own file (TheCharlatan) 9be330b [refactor] Define MessageStartChars as std::array (TheCharlatan) 37e2b01 [refactor] Allow std::array<std::byte, N> in serialize.h (MarcoFalke) Pull request description: This removes the non-consensus critical `protocol.h` and `netaddress.h` headers from the kernel headers. With this patch, they are no longer required to include in order to use the libbitcoinkernel library. This also allows for the removal of the `compat.h` header from the kernel headers. As an added future benefit it also reduces the number of of kernel headers that include the platform specific `bitcoin-config.h`. For those interested, the currently required kernel headers can be inspected visually with the [sourcetrail](https://github.com/CoatiSoftware/Sourcetrail) tool by looking at the required includes of `bitcoin-chainstate.cpp`. --- This is part of the [libbitcoinkernel project](bitcoin#27587), namely its stage 1 step 3: Decouple most non-consensus headers from libbitcoinkernel. ACKs for top commit: stickies-v: re-ACK d506765 hebasto: ACK d506765. ajtowns: utACK d506765 MarcoFalke: lgtm ACK d506765 🍛 Tree-SHA512: 6f90ea510a302c2927e84d16900e89997c39b8ff3ce9d4effeb8a134bd29cc52bd9e81e51aaa11f7496bad00025b78a58b88c5a9e0bb3f4ebbe9a76309215fb7 Co-authored-by: fanquake <fanquake@gmail.com>
…validation code. 6eb33bd kernel: Add fatalError method to notifications (TheCharlatan) 7320db9 kernel: Add flushError method to notifications (TheCharlatan) 3fa9094 scripted-diff: Rename FatalError to FatalErrorf (TheCharlatan) edb55e2 kernel: Pass interrupt reference to chainman (TheCharlatan) e2d680a util: Add SignalInterrupt class and use in shutdown.cpp (TheCharlatan) Pull request description: Get rid of all `ShutdownRequested` calls in validation code by introducing an interrupt object that applications can use to cancel long-running kernel operations. Replace all `AbortNode` calls in validation code with new fatal error and flush error notifications so kernel applications can be notified about failures and choose how to handle them. --- This pull request is part of the `libbitcoinkernel` project bitcoin#27587 https://github.com/orgs/bitcoin/projects/3 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". The pull request mostly allows dropping the kernel dependency on shutdown.cpp. The only dependency left after this is a `StartShutdown` call which will be removed in followup PR bitcoin#27711. This PR also drops the last reference to the `uiInterface` global in kernel code. The process of moving the `uiInterface` out of the kernel was started in bitcoin#27636. This pull request contains a subset of patches originally proposed in bitcoin#27711. It will be part of a series of changes required to make handling of interrupts (or in other words the current shutdown procedure) in the kernel library more transparent and less reliable on global mutable state. The set of patches contained here was originally proposed by @ryanofsky [here](bitcoin#27711 (comment)). ACKs for top commit: achow101: light ACK 6eb33bd hebasto: ACK 6eb33bd, I have reviewed the code and it looks OK. ryanofsky: Code review ACK 6eb33bd. No changes since last review other than rebase. Tree-SHA512: 7d2d05fa4805428a09466d43c11ae32946cbb25aa5e741b1eec9cd142e4de4bb311e13ebf1bb125ae490c9d08274f2d56c93314e10f3d69e7fec7445e504987c Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
004903e test: Add Wallet Unlock Context Manager (Brandon Odiwuor) Pull request description: Fixes bitcoin#28601, see bitcoin#28403 (comment) Add Context Manager to manage the locking and unlocking of locked wallets with a passphrase during testing. ACKs for top commit: kevkevinpal: lgtm ACK [004903e](bitcoin@004903e) maflcko: lgtm ACK 004903e Tree-SHA512: ab234c167e71531df0d974ff9a31d444f7ce2a1d05aba5ea868cc9452f139845eeb24ca058d88f058bc02482b762adf2d99e63a6640b872cc71a57a0068abfe8 Co-authored-by: fanquake <fanquake@gmail.com>
fa6b11a test: Throw error when -signetchallenge is non-hex (MarcoFalke) Pull request description: Instead of silently parsing non-hex to an empty challenge, throw an error. Also, add missing includes while touching the file. ACKs for top commit: kevkevinpal: ACK [fa6b11a](bitcoin@fa6b11a) kallewoof: ACK fa6b11a TheCharlatan: Nice, ACK fa6b11a Tree-SHA512: 018ebbbf819ba7cdf0c6dd294fdfaa5ddb81b87058a8b9c57b96066d5b07e1656fd78f18e3cef375aebefa191fa515c2c70bc764880fa05f98f526334431a616 Co-authored-by: fanquake <fanquake@gmail.com>
ca91c24 index: verify blocks data existence only once (furszy) fcbdaee init: don't start indexes sync thread prematurely (furszy) 2ec89f1 refactor: simplify pruning violation check (furszy) c82ef91 make GetFirstStoredBlock assert that 'start_block' always has data (furszy) 430e702 refactor: index, decouple 'Init' from 'Start' (furszy) 225e213 refactor: init indexes, decouple 'Start()' from the creation step (furszy) 2ebc7e6 doc: describe 'init load' thread actions (Martin Zumsande) 0457510 scripted-diff: rename 'loadblk' thread name to 'initload' (furszy) ed4462c init: start indexes sync earlier (furszy) Pull request description: Simplifies index startup code, eliminating the `g_indexes_ready_to_sync` variable, deduplicating code and moving the prune violation check out of the `BaseIndex` class. Also makes startup more efficient by running the prune violation check once for all indexes instead of once for each index, and by delaying the prune violation check and moving it off of the main thread so the node can start up faster and perform the block data availability verification even when the '-reindex" or the "-reindex-chainstate" flags are enabled (which hasn't being possible so far). ACKs for top commit: ryanofsky: Code review ACK ca91c24. Just rebase and suggested changes since last review (Start return check, and code simplification) TheCharlatan: re-ACK ca91c24 Tree-SHA512: e9c98ce89aeb29e8d0f505f17b34aa54fe44efefbf017f4746e3b446ab4de25ade4f707254a0bbe4b99b69731b04a4067ce529eb7aa834ced196784b694cf7ce Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
…f blockstorage 462390c refactor: Move stopafterblockimport handling out of blockstorage (TheCharlatan) Pull request description: This has the benefit of moving this StartShutdown call out of the blockstorage file and thus out of the kernel's responsibility. The user can now decide if he wants to start shutdown / interrupt after a block import or not. This also simplifies bitcoin#28048, making it one fewer shutdown call to handle. ACKs for top commit: MarcoFalke: lgtm ACK 462390c 🗝 ryanofsky: Code review ACK 462390c. Just has been rebased and is a simpler change after bitcoin#27607 Tree-SHA512: 84e58256b1c61f10e7ec5ecf32916f40a2ab1ea7cce703de0fa1c61ee2be94bd45ed32718bc99903b6eff3e6d3d5b506470bf567ddbb444a58232913918e8ab8 Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
…on code 31eca93 kernel: Remove StartShutdown calls from validation code (Ryan Ofsky) Pull request description: This change drops the last kernel dependency on shutdown.cpp. It also adds new hooks for libbitcoinkernel applications to be able to interrupt kernel operations when the chain tip changes. This change is mostly a refactoring, but does slightly change `-stopatheight` behavior (see release note and commit message) ACKs for top commit: TheCharlatan: ACK 31eca93 furszy: Concept and light review ACK 31eca93 hebasto: ACK 31eca93, I have reviewed the code and it looks OK. MarcoFalke: lgtm ACK 31eca93 🕷 Tree-SHA512: e26928436bcde658e842b1f92e9c24b1ce91031fb63b41aafccf3130bfff532b75338a269a2bb7558bff2973913f17b97a00fec3e7e0588e2ce44de097142047 Co-authored-by: Andrew Chow <github@achow101.com>
fae1d9c refactor: Remove unused GetTimeMillis (MarcoFalke) Pull request description: The function is unused, not type-safe, and does not denote the underlying clock type. So remove it. ACKs for top commit: willcl-ark: tACK fae1d9c Tree-SHA512: 41ea7125d1964192b85a94265be974d02bf1e79b1feb61bff11486dc0ac811745156940ec5cad2ad1f94b653936f8ae563c959c1c4142203a55645fcb83203e8 Co-authored-by: fanquake <fanquake@gmail.com>
75a3291 doc: mention BIP324 support in bips.md (Pieter Wuille) 64ca721 test: enable v2 transport between nodes in some functional tests (Pieter Wuille) 05d19fb test: Functional test for opportunistic encryption (dhruv) b815cce net: expose transport types/session IDs of connections in RPC and logs (Pieter Wuille) 432a62c net: reconnect with V1Transport under certain conditions (Pieter Wuille) 4d265d0 sync: modernize CSemaphore / CSemaphoreGrant (Pieter Wuille) c73cd42 rpc: addnode arg to use BIP324 v2 p2p (dhruv) 62d21ee net: use V2Transport when NODE_P2P_V2 service flag is present (Pieter Wuille) a4706bc rpc: don't report v2 handshake bytes in the per-type sent byte statistics (Sebastian Falbesoner) abf343b net: advertise NODE_P2P_V2 if CLI arg -v2transport is on (Pieter Wuille) Pull request description: Part of bitcoin#27634. This makes BIP324 support feature complete, through a (default off) `-v2transport` option for enabling V2 connections. If it is enabled: * The `NODE_P2P_V2` service flag (*1 << 11*) is advertized. * Inbound connections can use V1 or V2 (automatically detected based on the protocol used by the peer) * V2 connections are used on outbound when the `NODE_P2P_V2` service is available (or the new `use_v2` parameter is set on the `addnode` RPC). * V2 outbound connections that instantly fail get retried as V1. There are two new RPC fields, `"transport_protocol_type"` and `"session_id"`, in `getpeerinfo`. ACKs for top commit: mzumsande: re-ACK 75a3291 theStack: re-ACK 75a3291 Tree-SHA512: 90ea1cd37f3dce410a59ff5de1c2405891e8aa62318d0e06dcb68b21603fb0c061631526633f3d4fb630e63d2b8db407eed48e246befcbef3503bea893a4ff15 Co-authored-by: fanquake <fanquake@gmail.com>
…ters from BlockManager methods fa69e3a Remove unused MessageStartChars parameters from BlockManager methods (MarcoFalke) Pull request description: Seems odd to expose these for mocking, when it is not needed. Fix this by removing the the unused parameters and use the already existing member field instead. ACKs for top commit: Empact: utACK fa69e3a dergoegge: utACK fa69e3a Tree-SHA512: 7814e9560abba8d9c0926bcffc70f92e502d22f543af43671248f6fcd1433f35238553c0f05123fde6d8e0f80261af0ab0500927548115153bd68d57fe2da746 Co-authored-by: fanquake <fanquake@gmail.com>
fad0b67 ci: Use qemu-user through container engine (MarcoFalke) Pull request description: Currently the CI containers always run on the host architecture, and only wrap `bitcoind` into `qemu-user` when needed. This has many issues: * The `i386` tasks can not be run on non-x86 hosts. * `config.guess` isn't present when building the CI image, which is fine. But it prints a warning, see bitcoin#27739 (review) * The python tests are run on the host architecture, making it harder to find architecture specific bugs. See for example bitcoin#27529 (comment) * All modern container engines support automatic dispatch to qemu-user, so it seems redundant to re-invent the wheel. Fix all issues by: * removing `HOST` from `ci/test/00_setup_env.sh`. * removing `QEMU_USER_CMD` and `ci/test/wrap-qemu.sh`. * removing `DPKG_ADD_ARCH` where possible, and pruning `PACKAGES` where possible. * specifying the architecture in `CI_IMAGE_NAME_TAG` to be used by the container engine. ACKs for top commit: fanquake: ACK fad0b67 - this seems ok to me, and removes complexity from our CI system. Tree-SHA512: 85e79f9f570e292d70a629d112fd4a6e6217d96226a1b665ed13485f616d84720ad2126b7d4b22fc603049f72fa7f2163b56a6bc276319fcd8b0496304ea4157 Co-authored-by: fanquake <fanquake@gmail.com>
91d924e Rename script/standard.{cpp/h} to script/solver.{cpp/h} (Andrew Chow) bacdb2e Clean up script/standard.{h/cpp} includes (Andrew Chow) f3c9078 Clean up things that include script/standard.h (Andrew Chow) 8bbe257 MOVEONLY: Move datacarrier defaults to policy.h (Andrew Chow) 7a172c7 Move CTxDestination to its own file (Andrew Chow) 145f36e Move Taproot{SpendData/Builder} to signingprovider.{h/cpp} (Andrew Chow) 86ea8be Move CScriptID to script.{h/cpp} (Andrew Chow) b81ebff Remove ScriptHash from CScriptID constructor (Andrew Chow) cba69dd Move MANDATORY_SCRIPT_VERIFY_FLAGS from script/standard.h to policy/policy.h (Anthony Towns) Pull request description: Some future work needs to touch things in script/standard.{h/cpp}, however it is unclear if it is safe to do so as they are included in several different places that could effect standardness and consensus. It contains a mix of policy parameters, consensus parameters, and utilities only used by the wallet. This PR breaks up the various components and renames the files to clearly separate everything. * `CTxDestination` is moved to a new file `src/addresstype.{cpp/h}` * `TaprootSpendData` and `TaprootBuilder` (and their utility functions and structs) are moved to `SigningProvider` as these are used only during signing. * `CScriptID` is moved to `script/script.h` to be next to `CScript`. * `MANDATORY_SCRIPT_VERIFY_FLAGS` is moved to `interpreter.h` * The parameters `DEFAULT_ACCEPT_DATACARRIER` and `MAX_OP_RETURN_RELAY` are moved to `policy.h` * `standard.{cpp/h}` is renamed to `solver.{cpp/h}` since that's all that's left in the file after the above moves ACKs for top commit: Sjors: ACK 91d924e ajtowns: ACK 91d924e MarcoFalke: ACK 91d924e 😇 murchandamus: ACK 91d924e darosior: Code review ACK 91d924e. theStack: Code-review ACK 91d924e Tree-SHA512: d347439890c652081f6a303d99b2bde6c371c96e7f4127c5db469764a17d39981f19884679ba883e28b733fde6142351dd8288c7bc61c379b7eefe7fa7acca1a Co-authored-by: fanquake <fanquake@gmail.com>
…s types fadf671 Refactor: Remove confusing static_cast (MarcoFalke) faeea1a refactor: Add missing includes (MarcoFalke) Pull request description: It seems confusing to use `static_cast<uint160>(bla)` to call the constructor of `uint160`. The normal and common way to call a constructor is by simply calling it. (`uint160{bla}`). Do this, and also drop the constructor completely where the existing `const&` reference is enough. Also, add missing includes while touching the file. ACKs for top commit: vincenzopalazzo: ACK bitcoin@fadf671 TheCharlatan: ACK fadf671 Tree-SHA512: 8fb9a72203a6461b1f4b38bb90943ca25a92b218fc87da2022b90802e7747350e3668a13db3189201ad30e2e39a51d6658fed4aad176fd52cecc1c7f972c3134 Co-authored-by: fanquake <fanquake@gmail.com>
fae4055 scripted-diff: Rename CBlockTreeDB -> BlockTreeDB (MarcoFalke) faf6303 Fixup style of moved code (MarcoFalke) fa65111 move-only: Move CBlockTreeDB to node/blockstorage (MarcoFalke) fa86855 index: Drop legacy -txindex check (MarcoFalke) fa69148 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 bitcoin#22242) ACKs for top commit: TheCharlatan: ACK fae4055, though I lack historical context to really judge the second commit fa86855. stickies-v: ACK fae4055 Tree-SHA512: 9da8f48767ae52d8e8e21c09a40c949cc0838794f1856cc5f58a91acd3f00a3bca818c8082242b3fdc9ca5badb09059570bb3870850d3807b75a8e23b5222da1 Co-authored-by: fanquake <fanquake@gmail.com>
… of just scriptPubKey ad0c469 wallet: Use CTxDestination in CRecipient rather than scriptPubKey (Andrew Chow) 07d3bdf Add PubKeyDestination for P2PK scripts (Andrew Chow) 1a98a51 Allow CNoDestination to represent a raw script (Andrew Chow) 8dd0670 Make WitnessUnknown members private (Andrew Chow) Pull request description: For silent payments, we want to provide a `SilentPaymentsDestination` to be used as the recipient, which requires `CRecipient` to use something other than just the `scriptPubKey` as we cannot know the output script for a silent payment prior to transaction creation. `CTxDestination` seems like the obvious place to add a `SilentPaymentsDestination` as it is our internal representation of an address. In order to still allow paying to arbitrary scriptPubKeys (e.g. for data carrier outputs, or the user hand crafted a raw transaction that they have given to `fundrawtransaction`), `CNoDestination` is changed to contain raw scripts. Additionally, P2PK scripts are now interpreted as a new `PubKeyDestination` rather than `PKHash`. This results in some things that would have given an address for P2PK scripts to no longer do so. This is arguably more correct. `ExtractDestination`'s behavior is slightly changed for the above. It now returns `true` for those destinations that have addresses, so P2PK scripts now result in `false`. Even though it returns false for `CNoDestination`, the script will now be included in that `CNoDestination`. Builds on bitcoin#28244 ACKs for top commit: josibake: ACK bitcoin@ad0c469 Tree-SHA512: ef3f8f3c7284779d9806c77c85b21caf910a79a1f7e7f1b51abcc0d7e074f14e00abf30f625a13075e41d94dad6202c10ddff462c0ee74c2ca4aab585b145a52 Co-authored-by: fanquake <fanquake@gmail.com>
Every Guix CI run fetches the macOS SDK through setup-sdk, so a single transient network error fails the whole build. Retry the download up to three times. This is the Dash-specific follow-up of bitcoin#28296, which adds ${CI_RETRY_EXE} before the same SDK curl in ci/test/01_base_install.sh. Dash has no such file: its SDK download lives in setup-sdk, inside the Guix container, which does not ship the retry helper, so curl's own --retry is used instead.
The bitcoin#28287 backport (ac94de2) diverged from upstream for no remaining reason: - peer_id was read as int, while NodeId is int64_t, so valid peer ids above INT_MAX were rejected; - msg was validated with IsHex() plus an empty-string special case and then parsed again with ParseHex(), although TryParseHex() (bitcoin#25227) was already available; - the result was null instead of upstream's empty object. Use upstream's body unchanged. sendmsgtopeer is a hidden test-only RPC and no test checks its return value.
…nd+receive entries BACKPORT NOTE: the dual send+receive records, the "any from me" criterion (b9765ba), ignoring the change flag when we are not the sender (2d182f7) and the send-before-receive sort (099dbe4) are taken. The removal of the SendToSelf type (71fbdb7) is not, and Dash's own record types are carried into upstream's per-output loop: - SendToSelf stays as an aggregated record for a transaction whose inputs and outputs are all ours, because that is where CoinJoin is classified: CoinJoinSend, CoinJoinCollateralPayment, CoinJoinMakeCollaterals and CoinJoinCreateDenominations, plain SendToSelf otherwise. The enum value and the "To yourself" filter stay too: the type filter is saved as an enum bitmask in the "transactionTypeFilter" setting, so removing a value would shift every later type and reopen a saved filter as a different one. - CoinJoinMixing (is_denominate) stays a single record and is checked first. - Platform transfers, like coinbase, count as not from us, so they only get credit records (an asset unlock has no inputs). - The 1-in-1-out collateral payment to OP_RETURN, DataTransaction outputs, the DS=1 CoinJoinSend marking and dust-receive detection keep their existing rules inside the new loop. - CoinJoinSend sorts with the sends, since it can now be paired with a receive at the same output index. 099dbe4 GUI: TransactionRecord: When time/index/etc match, sort send before receive (Luke Dashjr) 2d182f7 Bugfix: Ignore ischange flag when we're not the sender (Luke Dashjr) 71fbdb7 GUI: Remove SendToSelf TransactionRecord type (Luke Dashjr) f3fbe99 GUI: TransactionRecord: Refactor to turn send-to-self into send+receive pairs (Luke Dashjr) b9765ba GUI: TransactionRecord: Use "any from me" as the criteria for deciding whether a transaction is a send or receive (Luke Dashjr) Pull request description: Makes the GUI transaction list more like the RPC, and IMO clearer in general. As a side effect, this also fixes the GUI entries when a transaction is a net profit to us, but some inputs were also from us. Originally bitcoin#15115 Has Concept ACKs from @*Empact @*jonasschnelli ACKs for top commit: hebasto: ACK 099dbe4. Tree-SHA512: 7d581add2f59431aa019126d54232a1f15723def5147d7a1b672e9b6d525b6e5a944cc437701aa1bd5bd0fbe557a3d1f4b239337f42bdba4fe1d3960442d0e3b Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
BACKPORT NOTE: ci/test/06_script_b.sh does not exist in Dash, and Dash's CI prints no system-info block. The kernel line goes into the two scripts that run the tests inside the builder container, ci/dash/test_unittests.sh and ci/dash/test_integrationtests.sh, after their skip checks: the failures it helps to debug (e.g. TSan's "unexpected memory mapping" on newer kernels) show up when tests run, not at build time. Both scripts only run in Linux containers, so upstream's macOS branch has no counterpart. fac054d ci: Print Linux kernel info (MarcoFalke) Pull request description: Required to debug issues like bitcoin#28487 (comment). For example: ``` FATAL: ThreadSanitizer: unexpected memory mapping 0x57cf8f031000-0x57cf8f173000 ACKs for top commit: hebasto: ACK fac054d Tree-SHA512: 7eb158e52daffe5cbcdfa3ed1efb45e1930b80a2672558fe400c8d72ce59a8cbeb02296dfc2032721d511410885a1f057672fe8086ba1c72a494aef541bf7eb4 Co-authored-by: fanquake <fanquake@gmail.com>
…ub Actions BACKPORT NOTE: upstream's .github/workflows/ci.yml does not exist in Dash. Dash's ccache, ctcache and cppcheck caches already save only on pushes to the default branch, and the depends caches are keyed by content. The one cache still saved from pull request runs is the Guix job's /gnu/store plus depends cache, keyed by github.sha, so every labelled PR run stored a new copy for each target. It is split the same way: restore always (except tags), save after a successful build only when the run is not pull_request_target, the event Dash uses for pull requests instead of upstream's pull_request. This also keeps PR head code from writing into a cache that develop pushes restore. 241d6ca ci: Disable cache save for pull requests in GitHub Actions (Hennadii Stepanov) Pull request description: This PR disable cache save for pull requests in GitHub Actions. Otherwise, multiple pull requests fill GitHub Actions cache quota shortly. See a discussion [here](bitcoin#28187 (comment)). --- **NOTE** for the maintainers with "owner" permissions. This PR needs the `actions/cache/restore@*` and `actions/cache/save@*` acrions to be explicitly allowed in the repository's Actions permissions. ACKs for top commit: MarcoFalke: lgtm ACK 241d6ca Tree-SHA512: a7786c7ec99bfa6991bf6ae08fd7ed3546e8c5d083a1b2bae7638f6f31e77fdf2cf4fc69d85834faf87f98db1f4a82026ce1dc5fc1bc6650e8bf1c09bf7e90f5 Co-authored-by: fanquake <fanquake@gmail.com>
BACKPORT NOTE: upstream's docker volume mounts in ci/test/04_install.sh have no Dash counterpart. Dash's depends caches already keep only depends/built and depends/sources, and the macOS SDK lives in the CI image. The Guix job was the exception: it also cached dash/depends/work, whose work/build stamp files and intermediate trees are what upstream stops carrying between runs. Drop that path from the Guix cache. Finished packages still come from depends/built, so only packages that are rebuilt anyway start clean. fac88a8 ci: Avoid cache depends/build (MarcoFalke) Pull request description: Fixes bitcoin#28365 (maybe?) ACKs for top commit: hebasto: ACK fac88a8 Tree-SHA512: c121f335f4b7d1f5f8f0508a17cee4d33dcf43c3928f9003a01dcc9ed0c45d1d912f7ff976e605b06c2f293ed21371d2dcace5562fe466bc444144790353bdd3 Co-authored-by: fanquake <fanquake@gmail.com>
|
This pull request has conflicts, please rebase. |
STACKED ON #8158
Dear reviewers, review commits only from CHECKPOINT: bp-v26-p11, other commits should be reeviewed in its own PRs
What was done?
Regular backports from Bitcoin Core v26.
Extra adaptation to retry the macOS SDK download in Guix setup-sdk, same to bitcoin#28296
Extra fixes for bitcoin#28287 to unify with upsteram bitcoin Core
How Has This Been Tested?
N/A
Breaking Changes
N/A
Checklist: