docs.rs failed to build keetanetwork-vote-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Keeta Network Vote and VoteStaple
This crate models a representative's signed commitment that a set of
Blocks should be inserted into the ledger
and the canonical bundle (VoteStaple) by which those commitments
propagate between operators.
Concepts
- Vote: a DER-encoded certificate-shaped commitment from an issuing representative covering one or more block hashes. Carries an optional fee schedule and a validity window.
- Vote quote: a non-binding vote whose fees field has
quote = true. Used during fee negotiation; cannot be stapled or used to confirm blocks. - Possibly expired vote: a vote that has been parsed and signature- verified but whose validity window may have ended. Surfaced for inspection paths that should not commit to inclusion.
- Vote staple: a zlib-compressed DER bundle of one or more votes together with the blocks they cover. The wire artifact transmitted between operators.
Construction
Use [VoteBuilder] or [VoteQuoteBuilder] to assemble and sign a vote
and [VoteStapleBuilder] to bundle votes and blocks into a staple. The
builders validate eagerly and surface configuration errors as
[VoteError] variants.
Example
use Arc;
use GenericAccount;
use create_ed25519_test_keys;
use ;
use ;
#
Verification
[Vote::verify] decodes wire bytes, rejects any non-canonical DER, and
checks the issuer's signature. [VoteStaple::verify] additionally
enforces the staple invariants (canonical ordering, agreed block set,
single-issuer constraint, uniform permanence) at a caller-supplied
moment.