[DASH] S8 pool-node leaf 3: share_messages.hpp (share-embedded message decrypt/validate)#583
Open
frstrtr wants to merge 1 commit into
Open
[DASH] S8 pool-node leaf 3: share_messages.hpp (share-embedded message decrypt/validate)#583frstrtr wants to merge 1 commit into
frstrtr wants to merge 1 commit into
Conversation
…e decrypt/validate) Port src/impl/btc/share_messages.hpp namespace-only to dash::, the V36 share-embedded messaging layer (decrypt + validate of messages carried in share message_data, included in the ref_hash PoW-protected path). The DONATION_AUTHORITY_PUBKEYS (forrestv + maintainer, the 2-key envelope authority) are byte-identical across btc/dgb/ltc/dash: this is a v36-NATIVE SHARED STRUCTURE (Bucket-2, FLAG6) — the cross-coin unified donation/protocol authority, NOT a DASH-bespoke constant. Kept identical so it standardizes cleanly toward the v37 unified datastructure; do not fork per-coin. The SHA256/HMAC-SHA256/ECDSA here is the PoW-algo-independent p2pool message-signing crypto, not the X11 block PoW. Adds test_dash_share_messages (9 KAT: decrypt with known authority key, maintainer/forrestv attribution, unknown-key reject, MAC-tamper reject, truncated/empty handling) + additive CMake/build.yml wiring. Fence: dash tree + additive test wiring only; zero bitcoin_family/core/other-coin edits.
d88c52e to
a0be52e
Compare
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.
S8 pool-node leaf 3 of 5 — share_messages.hpp
Leaf plan: peer (#580) -> messages (#582) -> share_messages (this) -> share_tracker -> node.hpp
What
Ports
src/impl/btc/share_messages.hppnamespace-only todash::— the V36 share-embedded messaging layer: decrypt + validate of messages carried in a share'smessage_datafield, which is included in the ref_hash (PoW-protected) path.Independent of leaf 1/2: share_messages.hpp includes only btclibs crypto + secp256k1, no peer.hpp/messages.hpp. Authored off clean master.
v36 standardization classification (per operator 3-bucket rule)
DONATION_AUTHORITY_PUBKEYS(forrestv + maintainer) are byte-identical across btc/dgb/ltc/dash = Bucket-2 v36-NATIVE SHARED STRUCTURE (FLAG6, the cross-coin unified donation/protocol authority). Kept identical so it standardizes cleanly toward the v37 unified datastructure — deliberately NOT DASH-bespoke. Diff vs btc is namespace + a PoW-independence note only.Consensus-bearing
Yes — share-embedded decrypt/validate sits in the ref_hash path; surfaces for operator tap regardless of fence.
Tests — test_dash_share_messages, 9/9 green (non-hollow)
decrypt-with-known-authority-key; maintainer/forrestv attribution + non-confusion; unknown-key cannot decrypt; tampered-ciphertext & tampered-MAC rejected by HMAC; truncated-blob rejected; empty-blob always valid. Built + ran locally on Linux x86_64.
Fence
dash tree + additive test wiring only. Files:
src/impl/dash/share_messages.hpp(new),test/test_dash_share_messages.cpp(new),test/CMakeLists.txt(+target),.github/workflows/build.yml(allowlist x2). Zero bitcoin_family/core/other-coin edits.HEAD @d88c52e7 (GPG-signed). Held for integrator verify + operator tap.