pub trait RelayerDb:
StorageMutate<Messages, Error = KvStoreError>
+ Send
+ Sync {
// Required methods
fn get_chain_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = BlockHeight> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_sealed_block<'life0, 'async_trait>(
&'life0 self,
height: BlockHeight,
) -> Pin<Box<dyn Future<Output = Option<Arc<SealedFuelBlock>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
block: DaBlockHeight,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<DaBlockHeight>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BlockHeight>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
block_height: BlockHeight,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn insert_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: &'life1 CheckedMessage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Required Methods§
Sourcefn get_chain_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = BlockHeight> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_chain_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = BlockHeight> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
current best block number
fn get_sealed_block<'life0, 'async_trait>(
&'life0 self,
height: BlockHeight,
) -> Pin<Box<dyn Future<Output = Option<Arc<SealedFuelBlock>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn set_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
block: DaBlockHeight,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
block: DaBlockHeight,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
set finalized da height that represent last block from da layer that got finalized.
Sourcefn get_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<DaBlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<DaBlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Assume it is always set as initialization of database.
Sourcefn get_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the last fuel block height that was published to the da layer.
Sourcefn set_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
block_height: BlockHeight,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
block_height: BlockHeight,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set the last fuel block height that was published to the da layer.
Provided Methods§
Sourcefn insert_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: &'life1 CheckedMessage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: &'life1 CheckedMessage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add bridge message to database. Messages are not revertible.