Skip to content

[DASH] S8 pool-node leaf 3: share_messages.hpp (share-embedded message decrypt/validate)#583

Open
frstrtr wants to merge 1 commit into
masterfrom
dash/s8-poolnode-share-messages-leaf3
Open

[DASH] S8 pool-node leaf 3: share_messages.hpp (share-embedded message decrypt/validate)#583
frstrtr wants to merge 1 commit into
masterfrom
dash/s8-poolnode-share-messages-leaf3

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 27, 2026

Copy link
Copy Markdown
Owner

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.hpp namespace-only to dash:: — the V36 share-embedded messaging layer: decrypt + validate of messages carried in a share's message_data field, 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.
  • The SHA256/HMAC-SHA256/ECDSA here is the PoW-algo-independent p2pool message-signing crypto, not X11 block PoW.

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.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant