Struct snarkvm_ledger_store::helpers::memory::DeploymentMemory
source · pub struct DeploymentMemory<N: Network> { /* private fields */ }
Expand description
An in-memory deployment storage.
Trait Implementations§
source§impl<N: Clone + Network> Clone for DeploymentMemory<N>where
N::TransactionID: Clone,
impl<N: Clone + Network> Clone for DeploymentMemory<N>where N::TransactionID: Clone,
source§fn clone(&self) -> DeploymentMemory<N>
fn clone(&self) -> DeploymentMemory<N>
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<N: Network> DeploymentStorage<N> for DeploymentMemory<N>
impl<N: Network> DeploymentStorage<N> for DeploymentMemory<N>
source§fn open(fee_store: FeeStore<N, Self::FeeStorage>) -> Result<Self>
fn open(fee_store: FeeStore<N, Self::FeeStorage>) -> Result<Self>
Initializes the deployment storage.
source§fn edition_map(&self) -> &Self::EditionMap
fn edition_map(&self) -> &Self::EditionMap
Returns the edition map.
source§fn reverse_id_map(&self) -> &Self::ReverseIDMap
fn reverse_id_map(&self) -> &Self::ReverseIDMap
Returns the reverse ID map.
source§fn program_map(&self) -> &Self::ProgramMap
fn program_map(&self) -> &Self::ProgramMap
Returns the program map.
source§fn verifying_key_map(&self) -> &Self::VerifyingKeyMap
fn verifying_key_map(&self) -> &Self::VerifyingKeyMap
Returns the verifying key map.
source§fn certificate_map(&self) -> &Self::CertificateMap
fn certificate_map(&self) -> &Self::CertificateMap
Returns the certificate map.
source§fn fee_store(&self) -> &FeeStore<N, Self::FeeStorage>
fn fee_store(&self) -> &FeeStore<N, Self::FeeStorage>
Returns the fee store.
§type IDMap = MemoryMap<<N as Network>::TransactionID, ProgramID<N>>
type IDMap = MemoryMap<<N as Network>::TransactionID, ProgramID<N>>
The mapping of
transaction ID
to program ID
.§type EditionMap = MemoryMap<ProgramID<N>, u16>
type EditionMap = MemoryMap<ProgramID<N>, u16>
The mapping of
program ID
to edition
.§type ReverseIDMap = MemoryMap<(ProgramID<N>, u16), <N as Network>::TransactionID>
type ReverseIDMap = MemoryMap<(ProgramID<N>, u16), <N as Network>::TransactionID>
The mapping of
(program ID, edition)
to transaction ID
.§type OwnerMap = MemoryMap<(ProgramID<N>, u16), ProgramOwner<N>>
type OwnerMap = MemoryMap<(ProgramID<N>, u16), ProgramOwner<N>>
The mapping of
(program ID, edition)
to ProgramOwner
.§type ProgramMap = MemoryMap<(ProgramID<N>, u16), ProgramCore<N, Instruction<N>, Command<N>>>
type ProgramMap = MemoryMap<(ProgramID<N>, u16), ProgramCore<N, Instruction<N>, Command<N>>>
The mapping of
(program ID, edition)
to program
.§type VerifyingKeyMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), VerifyingKey<N>>
type VerifyingKeyMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), VerifyingKey<N>>
The mapping of
(program ID, function name, edition)
to verifying key
.§type CertificateMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), Certificate<N>>
type CertificateMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), Certificate<N>>
The mapping of
(program ID, function name, edition)
to certificate
.§type FeeStorage = FeeMemory<N>
type FeeStorage = FeeMemory<N>
The fee storage.
source§fn start_atomic(&self)
fn start_atomic(&self)
Starts an atomic batch write operation.
source§fn is_atomic_in_progress(&self) -> bool
fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
source§fn atomic_checkpoint(&self)
fn atomic_checkpoint(&self)
Checkpoints the atomic batch.
source§fn clear_latest_checkpoint(&self)
fn clear_latest_checkpoint(&self)
Clears the latest atomic batch checkpoint.
source§fn atomic_rewind(&self)
fn atomic_rewind(&self)
Rewinds the atomic batch to the previous checkpoint.
source§fn abort_atomic(&self)
fn abort_atomic(&self)
Aborts an atomic batch write operation.
source§fn finish_atomic(&self) -> Result<()>
fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
source§fn insert(&self, transaction: &Transaction<N>) -> Result<()>
fn insert(&self, transaction: &Transaction<N>) -> Result<()>
Stores the given
deployment transaction
pair into storage.source§fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the deployment transaction for the given
transaction ID
.source§fn find_transaction_id_from_program_id(
&self,
program_id: &ProgramID<N>
) -> Result<Option<N::TransactionID>>
fn find_transaction_id_from_program_id( &self, program_id: &ProgramID<N> ) -> Result<Option<N::TransactionID>>
Returns the transaction ID that contains the given
program ID
.source§fn find_transaction_id_from_transition_id(
&self,
transition_id: &N::TransitionID
) -> Result<Option<N::TransactionID>>
fn find_transaction_id_from_transition_id( &self, transition_id: &N::TransitionID ) -> Result<Option<N::TransactionID>>
Returns the transaction ID that contains the given
transition ID
.source§fn get_program_id(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<ProgramID<N>>>
fn get_program_id( &self, transaction_id: &N::TransactionID ) -> Result<Option<ProgramID<N>>>
Returns the program ID for the given
transaction ID
.source§fn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>>
fn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>>
Returns the edition for the given
program ID
.source§fn get_program(&self, program_id: &ProgramID<N>) -> Result<Option<Program<N>>>
fn get_program(&self, program_id: &ProgramID<N>) -> Result<Option<Program<N>>>
Returns the program for the given
program ID
.source§fn get_verifying_key(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<VerifyingKey<N>>>
fn get_verifying_key( &self, program_id: &ProgramID<N>, function_name: &Identifier<N> ) -> Result<Option<VerifyingKey<N>>>
Returns the verifying key for the given
program ID
and function name
.source§fn get_certificate(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<Certificate<N>>>
fn get_certificate( &self, program_id: &ProgramID<N>, function_name: &Identifier<N> ) -> Result<Option<Certificate<N>>>
Returns the certificate for the given
program ID
and function name
.source§fn get_deployment(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Deployment<N>>>
fn get_deployment( &self, transaction_id: &N::TransactionID ) -> Result<Option<Deployment<N>>>
Returns the deployment for the given
transaction ID
.source§fn get_fee(&self, transaction_id: &N::TransactionID) -> Result<Option<Fee<N>>>
fn get_fee(&self, transaction_id: &N::TransactionID) -> Result<Option<Fee<N>>>
Returns the fee for the given
transaction ID
.source§fn get_owner(
&self,
program_id: &ProgramID<N>
) -> Result<Option<ProgramOwner<N>>>
fn get_owner( &self, program_id: &ProgramID<N> ) -> Result<Option<ProgramOwner<N>>>
Returns the owner for the given
program ID
.source§fn get_transaction(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Transaction<N>>>
fn get_transaction( &self, transaction_id: &N::TransactionID ) -> Result<Option<Transaction<N>>>
Returns the transaction for the given
transaction ID
.Auto Trait Implementations§
impl<N> !RefUnwindSafe for DeploymentMemory<N>
impl<N> Send for DeploymentMemory<N>
impl<N> Sync for DeploymentMemory<N>
impl<N> Unpin for DeploymentMemory<N>where N: Unpin,
impl<N> !UnwindSafe for DeploymentMemory<N>
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