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>

Non standard methods for blob storage

source

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

source

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>

§

type Context = C

Context type
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>,

It takes two arguments. Read more
source§

impl<C: Clone + Context, Da: Clone + DaSpec> Clone for BlobStorage<C, Da>where C::Address: Clone,

source§

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)

Performs copy-assignment from source. Read more
source§

impl<C: Context, Da: DaSpec> Default for BlobStorage<C, Da>

source§

fn default() -> Self

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

impl<C: Context, Da: DaSpec> Module for BlobStorage<C, Da>

Empty module implementation

§

type Context = C

Execution context.
§

type Config = ()

Configuration for the genesis method.
§

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>

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>

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>

§

type Context = C

source§

fn prefix(&self) -> Prefix

Returns the prefix of the module.
source§

fn address(&self) -> &<Self::Context as Spec>::Address

Returns address of the module.
source§

fn dependencies(&self) -> Vec<&<Self::Context as Spec>::Address>

Returns addresses of all the other modules this module is dependent on

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Genesis for Twhere T: Module,

§

type Context = <T as Module>::Context

§

type Config = <T as Module>::Config

Initial configuration for the module.
source§

fn genesis( &self, config: &<T as Genesis>::Config, working_set: &mut WorkingSet<<<T as Genesis>::Context as Spec>::Storage> ) -> Result<(), Error>

Initializes the state of the rollup.
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 Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
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