sigil-consensus · signing
Source declarations, signatures and documentation for signing.
Source: sigil/node/sigil-consensus/src/signing.rs. SHA-256: 542eebed93668c09a2127566f9b65e0e375574b546ac087e0cf53eee0d111b02.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
signing::prevote_signing_payload
Build canonical payload for prevote signing: prefix || H || height || epoch || round.
pub fn prevote_signing_payload(block_hash: &[u8], height: u64, epoch: u64, round: u64) -> Vec<u8>;Source line: 12.
signing::precommit_signing_payload
Build canonical payload for precommit signing: prefix || H || height || epoch || round.
pub fn precommit_signing_payload(
block_hash: &[u8],
height: u64,
epoch: u64,
round: u64,
) -> Vec<u8>;Source line: 23.
signing::proposal_signing_payload
Build canonical payload for proposal signing: prefix || H || height || epoch || view.
pub fn proposal_signing_payload(block_hash: &[u8], height: u64, epoch: u64, view: u64) -> Vec<u8>;Source line: 39.
signing::view_change_signing_payload
Build canonical payload for view-change signing: prefix || height || epoch || from_view || new_view || reason.
pub fn view_change_signing_payload(
height: u64,
epoch: u64,
from_view: u64,
new_view: u64,
reason: &[u8],
) -> Vec<u8>;Source line: 51.
signing::new_view_signing_payload
Build canonical payload for new-view signing: prefix || height || epoch || new_view || view_change_certificate_hash.
pub fn new_view_signing_payload(
height: u64,
epoch: u64,
new_view: u64,
certificate_hash: &[u8],
) -> Vec<u8>;Source line: 70.
signing::verify_signature
Verify an Ed25519 signature against a public key and payload.
Errors
Returns ConsensusError::InvalidSignature if:
- The public key is not exactly 32 bytes or is an invalid Ed25519 point
- The signature is not exactly 64 bytes
- The signature does not verify against the payload and public key
pub fn verify_signature(
pubkey_bytes: &[u8],
payload: &[u8],
signature_bytes: &[u8],
) -> Result<(), ConsensusError>;Source line: 93.