Expand description
The Stellar Consensus Protocol (SCP) kernel: federated voting, nomination
and the ballot protocol, following stellar-core’s implementation, over
Thruput’s protocol types from thruput_scp.
The application supplies two things. A Consensus validates and
combines its values and receives progress notifications through
ConsensusNotify. A Driver supplies quorum sets by hash, hashes and
signs for the node, emits envelopes to peers and runs the timers.
StellarKernel::new takes both, with the node ID, the validator flag
and the local quorum set. StellarKernel::proto returns the
StellarProto through which envelopes from peers arrive
(DriverCb::received_envelope), values are nominated
(StellarProto::nominate) and expired timers are delivered
(DriverCb::driver_calling_back).
The kernel does not verify envelope signatures. Envelopes must be
authenticated before they reach it; see DriverCb.
verifier checks, outside a running kernel, that a set of
EXTERNALIZE envelopes proves a slot externalized under a quorum set.
Everything in scp_util is re-exported.
Re-exports§
pub use stellar::*;pub use kernel::*;pub use info::*;pub use local::*;pub use federated::*;pub use verifier::*;pub use slot::*;pub use qset::*;pub use ballotutil::*;pub use phase::*;pub use envelope::*;pub use nomination::*;pub use ballot::*;pub use heuristic::*;pub use util::*;
Modules§
- ballot
- ballotutil
- envelope
- federated
- hash
- heuristic
- info
- kernel
- keygen
- local
- nomination
- phase
- qset
- sign
- slot
- stellar
- util
- verifier
- xdr
Enums§
Constants§
Traits§
- Consensus
- Consensus
Notify - Driver
- Driver
Cb - The entry points through which the application drives the protocol.
Functions§
- derive_
node_ id - derive_
public_ key - generate_
secret_ key - Derives an Ed25519 secret key deterministically from
seed: the key’s 32-byte seed isSHA-256(seed). - hash_
bytes - hash_
xdr - hash_
xdr_ scp - marshal_
xdr - parse_
secret_ key_ from_ base64 - Parse a SecretKey from a Base64 standard encoded string of the 64-byte secret key
- public_
key_ bytes - The raw bytes of a public key, whatever its scheme.
- sign_
bytes - Signs
msgwithsecret_key: plain Ed25519 (RFC 8032), no pre-hash. - sign_
xdr - unmarshal_
xdr - verify_
bytes - Verifies
signatureovermsgwithpublic_key: plain Ed25519 (RFC 8032) under the ZIP-215 validation rules. - verify_
envelope - Verifies that
envelope.signatureis a valid signature over the XDR encoding ofenvelope.statementproduced by the secret key matchingenvelope.statement.node_id. - verify_
xdr