Struct sov_blob_storage::BlobStorage
source · pub struct BlobStorage<C: Context, Da: DaSpec> { /* private fields */ }
Expand description
Blob storage contains only address and vector of blobs
Implementations§
source§impl<C: Context, Da: DaSpec> BlobStorage<C, Da>
impl<C: Context, Da: DaSpec> BlobStorage<C, Da>
Non standard methods for blob storage
sourcepub fn store_blobs(
&self,
slot_height: TransitionHeight,
blobs: &[&Da::BlobTransaction],
working_set: &mut WorkingSet<C::Storage>
) -> Result<()>
pub fn store_blobs( &self, slot_height: TransitionHeight, blobs: &[&Da::BlobTransaction], working_set: &mut WorkingSet<C::Storage> ) -> Result<()>
Store blobs for given block number, overwrite if already exists
sourcepub fn take_blobs_for_slot_height(
&self,
slot_height: TransitionHeight,
working_set: &mut WorkingSet<C::Storage>
) -> Vec<Da::BlobTransaction>
pub fn take_blobs_for_slot_height( &self, slot_height: TransitionHeight, working_set: &mut WorkingSet<C::Storage> ) -> Vec<Da::BlobTransaction>
Take all blobs for given block number, return empty vector if not exists Returned blobs are removed from the storage
Trait Implementations§
source§impl<C: Context, Da: DaSpec> BlobSelector<Da> for BlobStorage<C, Da>
impl<C: Context, Da: DaSpec> BlobSelector<Da> for BlobStorage<C, Da>
source§fn get_blobs_for_this_slot<'a, I>(
&self,
current_blobs: I,
working_set: &mut WorkingSet<<Self::Context as Spec>::Storage>
) -> Result<Vec<BlobRefOrOwned<'a, Da::BlobTransaction>>>where
I: IntoIterator<Item = &'a mut Da::BlobTransaction>,
fn get_blobs_for_this_slot<'a, I>( &self, current_blobs: I, working_set: &mut WorkingSet<<Self::Context as Spec>::Storage> ) -> Result<Vec<BlobRefOrOwned<'a, Da::BlobTransaction>>>where I: IntoIterator<Item = &'a mut Da::BlobTransaction>,
It takes two arguments. Read more
source§impl<C: Clone + Context, Da: Clone + DaSpec> Clone for BlobStorage<C, Da>where
C::Address: Clone,
impl<C: Clone + Context, Da: Clone + DaSpec> Clone for BlobStorage<C, Da>where C::Address: Clone,
source§fn clone(&self) -> BlobStorage<C, Da>
fn clone(&self) -> BlobStorage<C, Da>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C: Context, Da: DaSpec> Default for BlobStorage<C, Da>
impl<C: Context, Da: DaSpec> Default for BlobStorage<C, Da>
source§impl<C: Context, Da: DaSpec> Module for BlobStorage<C, Da>
impl<C: Context, Da: DaSpec> Module for BlobStorage<C, Da>
Empty module implementation
§type CallMessage = NonInstantiable
type CallMessage = NonInstantiable
Module defined argument to the call method.
source§fn genesis(
&self,
_config: &Self::Config,
_working_set: &mut WorkingSet<<Self::Context as Spec>::Storage>
) -> Result<(), Error>
fn genesis( &self, _config: &Self::Config, _working_set: &mut WorkingSet<<Self::Context as Spec>::Storage> ) -> Result<(), Error>
Genesis is called when a rollup is deployed and can be used to set initial state values in the module.
source§fn call(
&self,
_message: Self::CallMessage,
_context: &Self::Context,
_working_set: &mut WorkingSet<<Self::Context as Spec>::Storage>
) -> Result<CallResponse, Error>
fn call( &self, _message: Self::CallMessage, _context: &Self::Context, _working_set: &mut WorkingSet<<Self::Context as Spec>::Storage> ) -> Result<CallResponse, Error>
Call allows interaction with the module and invokes state changes.
It takes a module defined type and a context as parameters.
source§impl<C: Context, Da: DaSpec> ModuleInfo for BlobStorage<C, Da>
impl<C: Context, Da: DaSpec> ModuleInfo for BlobStorage<C, Da>
Auto Trait Implementations§
impl<C, Da> RefUnwindSafe for BlobStorage<C, Da>where <C as Spec>::Address: RefUnwindSafe, <Da as DaSpec>::SlotHash: RefUnwindSafe, <Da as DaSpec>::ValidityCondition: RefUnwindSafe,
impl<C, Da> Send for BlobStorage<C, Da>
impl<C, Da> Sync for BlobStorage<C, Da>
impl<C, Da> Unpin for BlobStorage<C, Da>where <C as Spec>::Address: Unpin, <Da as DaSpec>::SlotHash: Unpin, <Da as DaSpec>::ValidityCondition: Unpin,
impl<C, Da> UnwindSafe for BlobStorage<C, Da>where <C as Spec>::Address: UnwindSafe, <Da as DaSpec>::SlotHash: UnwindSafe, <Da as DaSpec>::ValidityCondition: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more