Struct SeqTypes

Source
pub struct SeqTypes;

Trait Implementations§

Source§

impl BlockHeader<SeqTypes> for Header

Source§

fn get_auction_results(&self) -> Option<SolverAuctionResults>

Get the results of the auction for this Header. Only used in post-marketplace versions

Source§

async fn new_marketplace( parent_state: &<SeqTypes as NodeType>::ValidatedState, instance_state: &<<SeqTypes as NodeType>::ValidatedState as ValidatedState<SeqTypes>>::Instance, parent_leaf: &Leaf2<SeqTypes>, payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, metadata: <<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata, builder_fee: Vec<BuilderFee<SeqTypes>>, view_number: u64, auction_results: Option<SolverAuctionResults>, version: Version, ) -> Result<Self, Self::Error>

Build a header with the parent validate state, instance-level state, parent leaf, payload commitment, metadata, and auction results. This is only used in post-marketplace versions

Source§

fn builder_commitment(&self) -> BuilderCommitment

Commit over fee_amount, payload_commitment and metadata

Source§

type Error = InvalidBlockHeader

Error type for this type of block header
Source§

async fn new_legacy( parent_state: &ValidatedState, instance_state: &NodeState, parent_leaf: &Leaf2, payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, metadata: <<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata, builder_fee: BuilderFee<SeqTypes>, version: Version, view_number: u64, ) -> Result<Self, Self::Error>

Build a header with the parent validate state, instance-level state, parent leaf, payload and builder commitments, and metadata. This is only used in pre-marketplace versions
Source§

fn genesis( instance_state: &NodeState, payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, ns_table: <<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata, ) -> Self

Build the genesis header, payload, and metadata.
Source§

fn block_number(&self) -> u64

Get the block number.
Source§

fn payload_commitment(&self) -> VidCommitment

Get the payload commitment.
Source§

fn metadata( &self, ) -> &<<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata

Get the metadata.
Source§

fn get_light_client_state( &self, view: <SeqTypes as NodeType>::View, ) -> Result<LightClientState>

Get the light client state
Source§

impl BlockPayload<SeqTypes> for Payload

Source§

type Error = BlockBuildingError

The error type for this type of block
Source§

type Transaction = Transaction

The type of the transitions we are applying
Source§

type Instance = NodeState

The type of the instance-level state this state is associated with
Source§

type Metadata = NsTable

Data created during block building which feeds into the block header
Source§

type ValidatedState = ValidatedState

Validated State
Source§

fn from_transactions<'life0, 'life1, 'async_trait>( transactions: impl 'async_trait + IntoIterator<Item = Self::Transaction> + Send, validated_state: &'life0 Self::ValidatedState, instance_state: &'life1 Self::Instance, ) -> Pin<Box<dyn Future<Output = Result<(Self, Self::Metadata), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Build a payload and associated metadata with the transactions. This function is asynchronous because it may need to request updated state from the peers via GET requests. Read more
Source§

fn from_bytes(block_payload_bytes: &[u8], ns_table: &Self::Metadata) -> Self

Build a payload with the encoded transaction bytes, metadata, and the associated number of VID storage nodes
Source§

fn empty() -> (Self, Self::Metadata)

Build the payload and metadata for genesis/null block.
Source§

fn builder_commitment(&self, metadata: &Self::Metadata) -> BuilderCommitment

Generate commitment that builders use to sign block options.
Source§

fn transactions<'a>( &'a self, metadata: &'a Self::Metadata, ) -> impl 'a + Iterator<Item = Self::Transaction>

Get the transactions in the payload.
Source§

fn transaction_commitments( &self, metadata: &Self::Metadata, ) -> Vec<Commitment<Self::Transaction>>

List of transaction commitments.
Source§

fn num_transactions(&self, metadata: &Self::Metadata) -> usize

Number of transactions in the block.
Source§

impl Clone for SeqTypes

Source§

fn clone(&self) -> SeqTypes

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SeqTypes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SeqTypes

Source§

fn default() -> SeqTypes

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SeqTypes

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ExplorerHeader<SeqTypes> for Header

Source§

fn reward_balance(&self) -> Self::BalanceAmount

reward_balance at the moment is only implemented as a stub, as block rewards have not yet been implemented.

TODO: update implementation when rewards have been created / supported. Issue: https://github.com/EspressoSystems/espresso-sequencer/issues/1453

Source§

type BalanceAmount = FeeAmount

BalanceAmount is a type that represents a general balance amount. It does not indicate how this balance is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type WalletAddress = Vec<FeeAccount>

WalletAddress is a type that represents the address of a Wallet. It does not indicate how this address is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type ProposerId = Vec<FeeAccount>

ProposerId is a type that represents the proposer id of the block. It does not indicate how this proposer id is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type NamespaceId = NamespaceId

NamespaceId is a type that represents the id of a namespace. It does not indicate how this namespace id is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

fn proposer_id(&self) -> Self::ProposerId

The proposer id of the block as stored within the block header.
Source§

fn fee_info_account(&self) -> Self::WalletAddress

The wallet address of the fee info account contained within the block header.
Source§

fn fee_info_balance(&self) -> Self::BalanceAmount

The balance amount of the fee info contained within the block header.
Source§

fn namespace_ids(&self) -> Vec<Self::NamespaceId>

A collection of namespace ids that are contained within the block header.
Source§

impl Hash for SeqTypes

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Membership<SeqTypes> for EpochCommittees

Source§

fn stake_table( &self, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> HSStakeTable<SeqTypes>

Get the stake table for the current view

Source§

fn da_stake_table( &self, _epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> HSStakeTable<SeqTypes>

Get the stake table for the current view

Source§

fn committee_members( &self, _view_number: <SeqTypes as NodeType>::View, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> BTreeSet<PubKey>

Get all members of the committee for the current view

Source§

fn da_committee_members( &self, _view_number: <SeqTypes as NodeType>::View, _epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> BTreeSet<PubKey>

Get all members of the committee for the current view

Source§

fn stake( &self, pub_key: &PubKey, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> Option<PeerConfig<SeqTypes>>

Get the stake table entry for a public key

Source§

fn da_stake( &self, pub_key: &PubKey, _epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> Option<PeerConfig<SeqTypes>>

Get the DA stake table entry for a public key

Source§

fn has_stake( &self, pub_key: &PubKey, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> bool

Check if a node has stake in the committee

Source§

fn has_da_stake( &self, pub_key: &PubKey, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> bool

Check if a node has stake in the committee

Source§

fn lookup_leader( &self, view_number: <SeqTypes as NodeType>::View, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> Result<PubKey, Self::Error>

Index the vector of public keys with the current view number

Source§

fn total_nodes(&self, epoch: Option<<SeqTypes as NodeType>::Epoch>) -> usize

Get the total number of nodes in the committee

Source§

fn da_total_nodes(&self, epoch: Option<<SeqTypes as NodeType>::Epoch>) -> usize

Get the total number of DA nodes in the committee

Source§

fn success_threshold( &self, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> U256

Get the voting success threshold for the committee

Source§

fn da_success_threshold( &self, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> U256

Get the voting success threshold for the committee

Source§

fn failure_threshold( &self, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> U256

Get the voting failure threshold for the committee

Source§

fn upgrade_threshold( &self, epoch: Option<<SeqTypes as NodeType>::Epoch>, ) -> U256

Get the voting upgrade threshold for the committee

Source§

type Error = LeaderLookupError

The error type returned by methods like lookup_leader.
Source§

fn new( _committee_members: Vec<PeerConfig<SeqTypes>>, _da_members: Vec<PeerConfig<SeqTypes>>, ) -> Self

Create a committee
Source§

async fn add_epoch_root( &self, epoch: <SeqTypes as NodeType>::Epoch, block_header: Header, ) -> Option<Box<dyn FnOnce(&mut Self) + Send>>

Handles notifications that a new epoch root has been created Is called under a read lock to the Membership. Return a callback with Some to have that callback invoked under a write lock. Read more
Source§

fn has_stake_table(&self, epoch: <SeqTypes as NodeType>::Epoch) -> bool

Returns if the stake table is available for the given epoch
Source§

fn has_randomized_stake_table( &self, epoch: <SeqTypes as NodeType>::Epoch, ) -> bool

Returns if the randomized stake table is available for the given epoch
Source§

async fn get_epoch_root( membership: Arc<RwLock<Self>>, block_height: u64, epoch: <SeqTypes as NodeType>::Epoch, ) -> Result<Leaf2>

Gets the validated block header and epoch number of the epoch root at the given block height
Source§

async fn get_epoch_drb( membership: Arc<RwLock<Self>>, block_height: u64, epoch: <SeqTypes as NodeType>::Epoch, ) -> Result<DrbResult>

Gets the DRB result for the given epoch
Source§

fn add_drb_result( &mut self, epoch: <SeqTypes as NodeType>::Epoch, drb: DrbResult, )

Called to notify the Membership when a new DRB result has been calculated. Observes the same semantics as add_epoch_root
Source§

fn set_first_epoch( &mut self, epoch: <SeqTypes as NodeType>::Epoch, initial_drb_result: DrbResult, )

Called to notify the Membership that Epochs are enabled. Implementations should copy the pre-epoch stake table into epoch and epoch+1 when this is called. The value of initial_drb_result should be used for DRB calculations for epochs (epoch+1) and earlier.
Source§

fn total_stake(&self, epoch: Option<<TYPES as NodeType>::Epoch>) -> Uint<256, 4>

Source§

fn total_da_stake( &self, epoch: Option<<TYPES as NodeType>::Epoch>, ) -> Uint<256, 4>

Source§

fn leader( &self, view: <TYPES as NodeType>::View, epoch: Option<<TYPES as NodeType>::Epoch>, ) -> Result<<TYPES as NodeType>::SignatureKey, Error>

The leader of the committee for view view_number in epoch. Read more
Source§

impl MerklizedState<SeqTypes, { Self::ARITY }> for BlockMerkleTree

Source§

type Key = <LightWeightMerkleTree<Commitment<Header>, Sha3Digest, u64, 3, Sha3Node> as MerkleTreeScheme>::Index

Source§

type Entry = Commitment<Header>

Source§

type T = Sha3Node

Source§

type Commit = <LightWeightMerkleTree<Commitment<Header>, Sha3Digest, u64, 3, Sha3Node> as MerkleTreeScheme>::Commitment

Source§

type Digest = Sha3Digest

Source§

fn state_type() -> &'static str

Retrieves the name of the state being queried.
Source§

fn header_state_commitment_field() -> &'static str

Retrieves the field in the header containing the Merkle tree commitment for the state implementing this trait.
Source§

fn tree_height() -> usize

Get the height of the tree
Source§

fn insert_path( &mut self, key: Self::Key, proof: &MerkleProof<Self::Entry, Self::Key, Self::T, { Self::ARITY }>, ) -> Result<()>

Insert a forgotten path into the tree.
Source§

impl MerklizedState<SeqTypes, { Self::ARITY }> for FeeMerkleTree

Source§

type Key = <UniversalMerkleTree<FeeAmount, Sha3Digest, FeeAccount, FEE_MERKLE_TREE_ARITY, Sha3Node> as MerkleTreeScheme>::Index

Source§

type Entry = <UniversalMerkleTree<FeeAmount, Sha3Digest, FeeAccount, FEE_MERKLE_TREE_ARITY, Sha3Node> as MerkleTreeScheme>::Element

Source§

type T = Sha3Node

Source§

type Commit = <UniversalMerkleTree<FeeAmount, Sha3Digest, FeeAccount, FEE_MERKLE_TREE_ARITY, Sha3Node> as MerkleTreeScheme>::Commitment

Source§

type Digest = Sha3Digest

Source§

fn state_type() -> &'static str

Retrieves the name of the state being queried.
Source§

fn header_state_commitment_field() -> &'static str

Retrieves the field in the header containing the Merkle tree commitment for the state implementing this trait.
Source§

fn tree_height() -> usize

Get the height of the tree
Source§

fn insert_path( &mut self, key: Self::Key, proof: &MerkleProof<Self::Entry, Self::Key, Self::T, { Self::ARITY }>, ) -> Result<()>

Insert a forgotten path into the tree.
Source§

impl MerklizedState<SeqTypes, { Self::ARITY }> for RewardMerkleTree

Source§

type Key = <UniversalMerkleTree<RewardAmount, Sha3Digest, RewardAccount, REWARD_MERKLE_TREE_ARITY, Sha3Node> as MerkleTreeScheme>::Index

Source§

type Entry = <UniversalMerkleTree<RewardAmount, Sha3Digest, RewardAccount, REWARD_MERKLE_TREE_ARITY, Sha3Node> as MerkleTreeScheme>::Element

Source§

type T = Sha3Node

Source§

type Commit = <UniversalMerkleTree<RewardAmount, Sha3Digest, RewardAccount, REWARD_MERKLE_TREE_ARITY, Sha3Node> as MerkleTreeScheme>::Commitment

Source§

type Digest = Sha3Digest

Source§

fn state_type() -> &'static str

Retrieves the name of the state being queried.
Source§

fn header_state_commitment_field() -> &'static str

Retrieves the field in the header containing the Merkle tree commitment for the state implementing this trait.
Source§

fn tree_height() -> usize

Get the height of the tree
Source§

fn insert_path( &mut self, key: Self::Key, proof: &MerkleProof<Self::Entry, Self::Key, Self::T, { Self::ARITY }>, ) -> Result<()>

Insert a forgotten path into the tree.
Source§

impl NodeType for SeqTypes

Source§

type View = ViewNumber

The time type that this hotshot setup is using. Read more
Source§

type Epoch = EpochNumber

Same as above but for epoch.
Source§

type BlockHeader = Header

The block header type that this hotshot setup is using.
Source§

type BlockPayload = Payload

The block type that this hotshot setup is using. Read more
Source§

type SignatureKey = VerKey

The signature key that this hotshot setup is using.
Source§

type Transaction = Transaction

The transaction type that this hotshot setup is using. Read more
Source§

type InstanceState = NodeState

The instance-level state type that this hotshot setup is using.
Source§

type ValidatedState = ValidatedState

The validated state type that this hotshot setup is using.
Source§

type Membership = EpochCommittees

Membership used for this implementation
Source§

type BuilderSignatureKey = FeeAccount

The type builder uses to sign its messages
Source§

type AuctionResult = SolverAuctionResults

The AuctionSolverResult is a type that holds the data associated with a particular solver run, for a particular view.
Source§

type StateSignatureKey = VerKey<EdwardsConfig>

The type replica uses to sign the light client state
Source§

const UPGRADE_CONSTANTS: UpgradeConstants = DEFAULT_UPGRADE_CONSTANTS

Constants used to construct upgrade proposals
Source§

impl Ord for SeqTypes

Source§

fn cmp(&self, other: &SeqTypes) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for SeqTypes

Source§

fn eq(&self, other: &SeqTypes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for SeqTypes

Source§

fn partial_cmp(&self, other: &SeqTypes) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl QueryableHeader<SeqTypes> for Header

Source§

fn timestamp(&self) -> u64

Source§

impl QueryablePayload<SeqTypes> for Payload

Source§

type TransactionIndex = Index

An index which can be used to efficiently retrieve a transaction for the block. Read more
Source§

type Iter<'a> = Iter<'a>

Enumerate the transactions in this block.
Source§

type InclusionProof = TxProof

A proof that a certain transaction exists in the block. Read more
Source§

fn len(&self, _meta: &Self::Metadata) -> usize

The number of transactions in the block.
Source§

fn iter<'a>(&'a self, _meta: &'a Self::Metadata) -> Self::Iter<'a>

List the transaction indices in the block.
Source§

fn transaction_with_proof( &self, _meta: &Self::Metadata, index: &Self::TransactionIndex, ) -> Option<(Self::Transaction, Self::InclusionProof)>

Get a transaction by its block-specific index, along with an inclusion proof.
Source§

fn transaction( &self, _meta: &Self::Metadata, index: &Self::TransactionIndex, ) -> Option<Self::Transaction>

Get a transaction by its block-specific index.
§

fn is_empty(&self, meta: &Self::Metadata) -> bool

Whether this block is empty of transactions.
§

fn enumerate<'a>( &'a self, meta: &'a Self::Metadata, ) -> Box<dyn Iterator<Item = (Self::TransactionIndex, Self::Transaction)> + 'a>

Enumerate the transactions in the block with their indices.
§

fn proof( &self, meta: &Self::Metadata, index: &Self::TransactionIndex, ) -> Option<Self::InclusionProof>

Get an inclusion proof for a transaction with a given index.
§

fn nth(&self, meta: &Self::Metadata, n: usize) -> Option<Self::TransactionIndex>

Get the index of the nth transaction.
§

fn nth_transaction( &self, meta: &Self::Metadata, n: usize, ) -> Option<Self::Transaction>

Get the nth transaction.
§

fn nth_transaction_with_proof( &self, meta: &Self::Metadata, n: usize, ) -> Option<(Self::Transaction, Self::InclusionProof)>

Get the nth transaction, along with an inclusion proof.
§

fn by_hash( &self, meta: &Self::Metadata, hash: Commitment<Self::Transaction>, ) -> Option<Self::TransactionIndex>

Get the index of the transaction with a given hash, if it is in the block.
§

fn transaction_by_hash( &self, meta: &Self::Metadata, hash: Commitment<Self::Transaction>, ) -> Option<Self::Transaction>

Get the transaction with a given hash, if it is in the block.
§

fn transaction_by_hash_with_proof( &self, meta: &Self::Metadata, hash: Commitment<Self::Transaction>, ) -> Option<(Self::Transaction, Self::InclusionProof)>

Get the transaction with a given hash, if it is in the block, along with an inclusion proof.
Source§

impl Serialize for SeqTypes

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<P: SequencerPersistence> Storage<SeqTypes> for Arc<P>

Source§

fn append_vid<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<SeqTypes, ADVZDisperseShare<SeqTypes>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal to the stored VID proposals.
Source§

fn append_vid2<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<SeqTypes, VidDisperseShare2<SeqTypes>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal to the stored VID proposals. TODO(Chengyu): fix this
Source§

fn append_da<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<SeqTypes, DaProposal<SeqTypes>>, vid_commit: VidCommitment, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal to the stored DA proposals.
Source§

fn append_da2<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<SeqTypes, DaProposal2<SeqTypes>>, vid_commit: VidCommitment, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal to the stored DA proposals.
Source§

fn record_action<'life0, 'async_trait>( &'life0 self, view: ViewNumber, epoch: Option<EpochNumber>, action: HotShotAction, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record a HotShotAction taken.
Source§

fn update_high_qc<'life0, 'async_trait>( &'life0 self, _high_qc: QuorumCertificate<SeqTypes>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the current high QC in storage.
Source§

fn append_proposal<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<SeqTypes, QuorumProposal<SeqTypes>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal we sent to the store
Source§

fn append_proposal2<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<SeqTypes, QuorumProposal2<SeqTypes>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal we sent to the store
Source§

fn update_high_qc2<'life0, 'async_trait>( &'life0 self, _high_qc: QuorumCertificate2<SeqTypes>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the current high QC in storage.
Source§

fn update_decided_upgrade_certificate<'life0, 'async_trait>( &'life0 self, decided_upgrade_certificate: Option<UpgradeCertificate<SeqTypes>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Upgrade the current decided upgrade certificate in storage.
Source§

fn add_drb_result<'life0, 'async_trait>( &'life0 self, epoch: <SeqTypes as NodeType>::Epoch, drb_result: DrbResult, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add a drb result
Source§

fn add_epoch_root<'life0, 'async_trait>( &'life0 self, epoch: <SeqTypes as NodeType>::Epoch, block_header: <SeqTypes as NodeType>::BlockHeader, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add an epoch block header
Source§

fn update_state_cert<'life0, 'async_trait>( &'life0 self, state_cert: LightClientStateUpdateCertificate<SeqTypes>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the light client state update certificate in storage.
Source§

fn append_vid_general<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<TYPES, VidDisperseShare<TYPES>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source§

fn append_proposal_wrapper<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<TYPES, QuorumProposalWrapper<TYPES>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Add a proposal we sent to the store
Source§

fn update_high_qc2_and_state_cert<'life0, 'async_trait>( &'life0 self, high_qc: SimpleCertificate<TYPES, QuorumData2<TYPES>, SuccessThreshold>, state_cert: LightClientStateUpdateCertificate<TYPES>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source§

fn update_next_epoch_high_qc2<'life0, 'async_trait>( &'life0 self, _next_epoch_high_qc: SimpleCertificate<TYPES, NextEpochQuorumData2<TYPES>, SuccessThreshold>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Update the current high QC in storage.
Source§

fn migrate_consensus<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Migrate leaves from Leaf to Leaf2, and proposals from QuorumProposal to QuorumProposal2
Source§

fn add_drb_input<'life0, 'async_trait>( &'life0 self, _epoch: u64, _iteration: u64, _drb_input: [u8; 32], ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source§

fn load_drb_input<'life0, 'async_trait>( &'life0 self, _epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<DrbInput, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source§

impl ValidatedState<SeqTypes> for ValidatedState

Source§

async fn validate_and_apply_header( &self, instance: &Self::Instance, parent_leaf: &Leaf2, proposed_header: &Header, payload_byte_len: u32, version: Version, view_number: u64, ) -> Result<(Self, Self::Delta), Self::Error>

Validate parent against known values (from state) and validate proposal descends from parent. Returns updated ValidatedState.

Source§

fn from_header(block_header: &Header) -> Self

Construct the state with the given block header.

This can also be used to rebuild the state for catchup.

Source§

fn genesis(instance: &Self::Instance) -> (Self, Self::Delta)

Construct a genesis validated state.

Source§

type Error = BlockError

The error type for this particular type of ledger state
Source§

type Instance = NodeState

The type of the instance-level state this state is associated with
Source§

type Time = ViewNumber

Time compatibility needed for reward collection
Source§

type Delta = Delta

The type of the state delta this state is associated with.
Source§

fn on_commit(&self)

Gets called to notify the persistence backend that this state has been committed
Source§

impl Copy for SeqTypes

Source§

impl Eq for SeqTypes

Source§

impl StructuralPartialEq for SeqTypes

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for T
where T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<'de, T> BorrowedRpcObject<'de> for T
where T: RpcBorrow<'de> + RpcSend,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Element for T
where T: Clone + Eq + PartialEq + Hash,

§

impl<T> Element for T
where T: Clone + Eq + PartialEq + Hash,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Index for T
where T: Debug + Eq + PartialEq + Hash + Ord + PartialOrd + Clone,

§

impl<T> Index for T
where T: Debug + Eq + PartialEq + Hash + Ord + PartialOrd + Clone,

§

impl<T> JsonSchemaMaybe for T

§

impl<'de, T> RpcBorrow<'de> for T
where T: Deserialize<'de> + Debug + Send + Sync + Unpin,

§

impl<T> RpcObject for T
where T: RpcSend + RpcRecv,

§

impl<T> RpcRecv for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

§

impl<T> RpcSend for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

Source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,