dusk_node::vm

Trait VMExecution

Source
pub trait VMExecution:
    Send
    + Sync
    + 'static {
Show 18 methods // Required methods fn execute_state_transition<I: Iterator<Item = Transaction>>( &self, params: &CallParams, txs: I, ) -> Result<(Vec<SpentTransaction>, Vec<Transaction>, VerificationOutput)>; fn verify_state_transition( &self, prev_root: [u8; 32], blk: &Block, voters: &[Voter], ) -> Result<VerificationOutput, VstError>; fn accept( &self, prev_root: [u8; 32], blk: &Block, voters: &[Voter], ) -> Result<(Vec<SpentTransaction>, VerificationOutput, Vec<ContractEvent>)>; fn finalize_state( &self, commit: [u8; 32], to_merge: Vec<[u8; 32]>, ) -> Result<()>; fn preverify(&self, tx: &Transaction) -> Result<PreverificationResult>; fn get_provisioners(&self, base_commit: [u8; 32]) -> Result<Provisioners>; fn get_changed_provisioners( &self, base_commit: [u8; 32], ) -> Result<Vec<(PublicKey, Option<Stake>)>>; fn get_provisioner(&self, pk: &BlsPublicKey) -> Result<Option<Stake>>; fn get_state_root(&self) -> Result<[u8; 32]>; fn move_to_commit(&self, commit: [u8; 32]) -> Result<()>; fn get_finalized_state_root(&self) -> Result<[u8; 32]>; fn get_block_gas_limit(&self) -> u64; fn revert(&self, state_hash: [u8; 32]) -> Result<[u8; 32]>; fn revert_to_finalized(&self) -> Result<[u8; 32]>; fn gas_per_deploy_byte(&self) -> u64; fn min_deployment_gas_price(&self) -> u64; fn min_gas_limit(&self) -> u64; fn min_deploy_points(&self) -> u64;
}

Required Methods§

Source

fn execute_state_transition<I: Iterator<Item = Transaction>>( &self, params: &CallParams, txs: I, ) -> Result<(Vec<SpentTransaction>, Vec<Transaction>, VerificationOutput)>

Source

fn verify_state_transition( &self, prev_root: [u8; 32], blk: &Block, voters: &[Voter], ) -> Result<VerificationOutput, VstError>

Source

fn accept( &self, prev_root: [u8; 32], blk: &Block, voters: &[Voter], ) -> Result<(Vec<SpentTransaction>, VerificationOutput, Vec<ContractEvent>)>

Source

fn finalize_state( &self, commit: [u8; 32], to_merge: Vec<[u8; 32]>, ) -> Result<()>

Source

fn preverify(&self, tx: &Transaction) -> Result<PreverificationResult>

Source

fn get_provisioners(&self, base_commit: [u8; 32]) -> Result<Provisioners>

Source

fn get_changed_provisioners( &self, base_commit: [u8; 32], ) -> Result<Vec<(PublicKey, Option<Stake>)>>

Source

fn get_provisioner(&self, pk: &BlsPublicKey) -> Result<Option<Stake>>

Source

fn get_state_root(&self) -> Result<[u8; 32]>

Source

fn move_to_commit(&self, commit: [u8; 32]) -> Result<()>

Source

fn get_finalized_state_root(&self) -> Result<[u8; 32]>

Returns last finalized state root

Source

fn get_block_gas_limit(&self) -> u64

Returns block gas limit

Source

fn revert(&self, state_hash: [u8; 32]) -> Result<[u8; 32]>

Source

fn revert_to_finalized(&self) -> Result<[u8; 32]>

Source

fn gas_per_deploy_byte(&self) -> u64

Source

fn min_deployment_gas_price(&self) -> u64

Source

fn min_gas_limit(&self) -> u64

Source

fn min_deploy_points(&self) -> u64

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§