SubmitToConsensus

Trait SubmitToConsensus 

Source
pub trait SubmitToConsensus:
    Sync
    + Send
    + 'static {
    // Required methods
    fn submit_to_consensus(
        &self,
        transactions: &[ConsensusTransaction],
        epoch_store: &Arc<AuthorityPerEpochStore>,
    ) -> SuiResult;
    fn submit_best_effort(
        &self,
        transaction: &ConsensusTransaction,
        epoch_store: &Arc<AuthorityPerEpochStore>,
        timeout: Duration,
    ) -> SuiResult;
}

Required Methods§

Source

fn submit_to_consensus( &self, transactions: &[ConsensusTransaction], epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult

Source

fn submit_best_effort( &self, transaction: &ConsensusTransaction, epoch_store: &Arc<AuthorityPerEpochStore>, timeout: Duration, ) -> SuiResult

Submits a system transaction to consensus once, without waiting for it to be sequenced and without retrying if it is garbage collected, bounded by timeout. Suits periodic, self-superseding messages (e.g. execution time observations) where a missed submission is replaced by the next one.

For system transactions only. User transactions are rejected: this fire-and-forget, no-retry, backpressure-free path would silently mishandle them.

Implementations on Foreign Types§

Source§

impl SubmitToConsensus for Arc<ConsensusAdapter>

Source§

fn submit_to_consensus( &self, transactions: &[ConsensusTransaction], epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult

Source§

fn submit_best_effort( &self, transaction: &ConsensusTransaction, epoch_store: &Arc<AuthorityPerEpochStore>, timeout: Duration, ) -> SuiResult

Implementors§