fuel_core_producer::ports

Trait BlockProducerDatabase

source
pub trait BlockProducerDatabase: Send + Sync {
    // Required methods
    fn latest_height(&self) -> Option<BlockHeight>;
    fn get_block(
        &self,
        height: &BlockHeight,
    ) -> StorageResult<Cow<'_, CompressedBlock>>;
    fn block_header_merkle_root(
        &self,
        height: &BlockHeight,
    ) -> StorageResult<Bytes32>;
    fn latest_consensus_parameters_version(
        &self,
    ) -> StorageResult<ConsensusParametersVersion>;
    fn latest_state_transition_bytecode_version(
        &self,
    ) -> StorageResult<StateTransitionBytecodeVersion>;
}

Required Methods§

source

fn latest_height(&self) -> Option<BlockHeight>

Returns the latest block height.

source

fn get_block( &self, height: &BlockHeight, ) -> StorageResult<Cow<'_, CompressedBlock>>

Gets the committed block at the height.

source

fn block_header_merkle_root( &self, height: &BlockHeight, ) -> StorageResult<Bytes32>

Gets the block header BMT MMR root at height.

source

fn latest_consensus_parameters_version( &self, ) -> StorageResult<ConsensusParametersVersion>

Returns the latest consensus parameters version.

source

fn latest_state_transition_bytecode_version( &self, ) -> StorageResult<StateTransitionBytecodeVersion>

Returns the latest state transition bytecode version.

Implementors§