Repository navigation
backport: v0.26 bitcoin#25284 - #90
Open
DCG-Claude wants to merge 1 commit into
Open
DCG-Claude wants to merge 1 commit into
DCG-Claude wants to merge 1 commit into
Conversation
…erialization fa626af Remove unused legacy CHashVerifier (MarcoFalke) fafa3fc test: add tests that exercise WithParams() (MarcoFalke) fac81af Use serialization parameters for CAddress serialization (MarcoFalke) faec591 Support for serialization parameters (MarcoFalke) fac42e9 Rename CSerAction* to Action* (MarcoFalke) aaaa3fa 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 bitcoin#19477 (comment) . This may also help with libbitcoinkernel, see bitcoin#28327 ACKs for top commit: TheCharlatan: ACK fa626af ajtowns: ACK fa626af Tree-SHA512: 229d379da27308890de212b1fd2b85dac13f3f768413cb56a4b0c2da708f28344d04356ffd75bfcbaa4cabf0b6cc363c4f812a8f1648cff9e436811498278318 Dash adaptations: - src/addrdb.cpp: DumpPeerAddresses keeps Dash's gArgs.GetDataDirNet() (upstream has args.) and drops the CLIENT_VERSION argument as upstream does - src/net_processing.cpp: PushNodeVersion keeps Dash's nProtocolVersion, mnauthChallenge and m_masternode_connection fields; only addr_you and CService{} are wrapped in WithParams(CNetAddr::V1, ...) as upstream does - src/serialize.h: Dash's HAVE_CONFIG_H/config/bitcoin-config.h include block kept; upstream's new #include <attributes.h> added after it - src/version.h: Dash's own comment 'Make sure that none of the values above collide with `ADDRV2_FORMAT`' removed because ADDRV2_FORMAT no longer exists; all Dash protocol-version constants kept - src/test/netbase_tests.cpp: the caddress_(un)serialize_v1/v2 tests sit elsewhere in Dash's file, so upstream's edits (DataStream + WithParams(CAddress::V1_NETWORK/V2_NETWORK, ...)) were applied to Dash's existing copies; Dash's LookupSubNet(...).IsValid() checks and NODE_NETWORK_LIMITED fixtures kept - src/test/serialize_tests.cpp: upstream's new Base/Derived/WithParams tests appended after Dash's LIMITED_VECTOR tests; upstream's added #include <string> left out because Dash's include block already has it - src/test/fuzz/deserialize.cpp: Dash's '*/' that closes the commented-out block_filter_deserialize target kept before upstream's new addr_info_deserialize FUZZ_TARGET; Dash's script/sign.h and util/system.h includes kept - src/hash.h: upstream deletes CHashVerifier as unused, but Dash-only src/evo/snapshot.h (SnapshotBoundedInput::m_stream and the commitment bls_input) still uses it and reads GetType/GetVersion through it, so the class is kept unchanged; the HashedSourceWriter -> HashWriter change is applied as upstream - src/evo/netinfo.h (Dash-only): NetInfoEntry used OverrideStream with |ADDRV2_FORMAT, which no longer exists; it now uses WithParams(CNetAddr::V2, service) directly on the stream. MnNetInfo serialized CService on streams without ADDRV2_FORMAT and now uses WithParams(CNetAddr::V1, ...), including in the CSizeComputer size override. Wire and disk bytes are unchanged - src/evo/deterministicmns.h (Dash-only): GetUniquePropertyHash<CService> switched from ser_version |= ADDRV2_FORMAT to SerializeHash(WithParams(IsAddrV1Compatible() ? CNetAddr::V1 : CNetAddr::V2, v)), with non-CService types in the else branch of the if constexpr; the hash input bytes are identical, so the unique-property map stays compatible. CSerAction{Serialize,Unserialize} renamed to Action{Serialize,Unserialize} (upstream rename) in the immer-map SerReadWrite overloads and in CDeterministicMNList - src/llmq/snapshot.h (Dash-only): CSerAction{Serialize,Unserialize} -> Action{Serialize,Unserialize} (upstream rename) in CQuorumSnapshot and CQuorumRotationInfo - src/netfulfilledman.h (Dash-only): the netfulfilled.dat store serializes std::map<CService,...> keys on a stream without ADDRV2_FORMAT; it now uses READWRITE(WithParams(CNetAddr::V1, obj.mapFulfilledRequests)), so the on-disk format is unchanged Not applicable to Dash (intentionally omitted): - src/hash.h: Upstream's removal of the 'unused' CHashVerifier class does not apply: Dash-only src/evo/snapshot.h still uses it (SnapshotBoundedInput, commitment BLS input check), so the class is kept - src/version.h: Upstream rewrites a comment to say values must not collide with SERIALIZE_TRANSACTION_NO_WITNESS; Dash has no segwit and no such flag, so only the obsolete ADDRV2_FORMAT comment line was removed
Potential PR merge conflictsThis is advisory only. It does not block CI, but it marks PRs that will likely need a rebase depending on merge order. If this PR merges firstThese open PRs will likely need a rebase:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated Bitcoin Core v0.26 backports, batch
backport-0.26-b079-misc.5dbc35be59Skipped in this batch:
Provenance
Each commit passed: cherry-pick (adapted by an Opus lane only where conflicts existed), build, touched tests, a mechanical diff-of-diffs check (every upstream hunk landed; no added line without an upstream counterpart), and an independent Opus verification lane where anything was adapted. Gate rows and lane artifacts are in the backportsys DB.