Enum casper_node::effect::requests::ContractRuntimeRequest[][src]

#[must_use]pub enum ContractRuntimeRequest {
    GetProtocolData {
        protocol_version: ProtocolVersion,
        responder: Responder<Result<Option<Box<ProtocolData>>, Error>>,
    },
    CommitGenesis {
        chainspec: Arc<Chainspec>,
        responder: Responder<Result<GenesisResult, Error>>,
    },
    Execute {
        execute_request: Box<ExecuteRequest>,
        responder: Responder<Result<ExecutionResults, RootNotFound>>,
    },
    Commit {
        state_root_hash: Digest,
        effects: AdditiveMap<Key, Transform>,
        responder: Responder<Result<CommitResult, Error>>,
    },
    Upgrade {
        upgrade_config: Box<UpgradeConfig>,
        responder: Responder<Result<UpgradeResult, Error>>,
    },
    Query {
        query_request: QueryRequest,
        responder: Responder<Result<QueryResult, Error>>,
    },
    GetBalance {
        balance_request: BalanceRequest,
        responder: Responder<Result<BalanceResult, Error>>,
    },
    GetEraValidators {
        request: EraValidatorsRequest,
        responder: Responder<Result<EraValidators, GetEraValidatorsError>>,
    },
    GetValidatorWeightsByEraId {
        request: ValidatorWeightsByEraIdRequest,
        responder: Responder<Result<Option<ValidatorWeights>, GetEraValidatorsError>>,
    },
    GetBids {
        get_bids_request: GetBidsRequest,
        responder: Responder<Result<GetBidsResult, Error>>,
    },
    Step {
        step_request: StepRequest,
        responder: Responder<Result<StepResult, Error>>,
    },
    IsBonded {
        state_root_hash: Digest,
        public_key: PublicKey,
        era_id: EraId,
        protocol_version: ProtocolVersion,
        responder: Responder<Result<bool, GetEraValidatorsError>>,
    },
    ReadTrie {
        trie_key: Blake2bHash,
        responder: Responder<Option<Trie<Key, StoredValue>>>,
    },
    PutTrie {
        trie: Box<Trie<Key, StoredValue>>,
        responder: Responder<Result<Vec<Blake2bHash>, Error>>,
    },
    MissingTrieKeys {
        trie_key: Blake2bHash,
        responder: Responder<Result<Vec<Blake2bHash>, Error>>,
    },
}

A contract runtime request.

Variants

GetProtocolData

Get ProtocolData by ProtocolVersion.

Fields of GetProtocolData

protocol_version: ProtocolVersion

The protocol version.

responder: Responder<Result<Option<Box<ProtocolData>>, Error>>

Responder to call with the result.

CommitGenesis

Commit genesis chainspec.

Fields of CommitGenesis

chainspec: Arc<Chainspec>

The chainspec.

responder: Responder<Result<GenesisResult, Error>>

Responder to call with the result.

Execute

An ExecuteRequest that contains multiple deploys that will be executed.

Fields of Execute

execute_request: Box<ExecuteRequest>

Execution request containing deploys.

responder: Responder<Result<ExecutionResults, RootNotFound>>

Responder to call with the execution result.

Commit

A request to commit existing execution transforms.

Fields of Commit

state_root_hash: Digest

A valid state root hash.

effects: AdditiveMap<Key, Transform>

Effects obtained through ExecutionResult

responder: Responder<Result<CommitResult, Error>>

Responder to call with the commit result.

Upgrade

A request to run upgrade.

Fields of Upgrade

upgrade_config: Box<UpgradeConfig>

Upgrade config.

responder: Responder<Result<UpgradeResult, Error>>

Responder to call with the upgrade result.

Query

A query request.

Fields of Query

query_request: QueryRequest

Query request.

responder: Responder<Result<QueryResult, Error>>

Responder to call with the query result.

GetBalance

A balance request.

Fields of GetBalance

balance_request: BalanceRequest

Balance request.

responder: Responder<Result<BalanceResult, Error>>

Responder to call with the balance result.

GetEraValidators

Returns validator weights.

Fields of GetEraValidators

request: EraValidatorsRequest

Get validators weights request.

responder: Responder<Result<EraValidators, GetEraValidatorsError>>

Responder to call with the result.

GetValidatorWeightsByEraId

Returns validator weights for given era.

Fields of GetValidatorWeightsByEraId

request: ValidatorWeightsByEraIdRequest

Get validators weights request.

responder: Responder<Result<Option<ValidatorWeights>, GetEraValidatorsError>>

Responder to call with the result.

GetBids

Return bids at a given state root hash

Fields of GetBids

get_bids_request: GetBidsRequest

Get bids request.

responder: Responder<Result<GetBidsResult, Error>>

Responder to call with the result.

Step

Performs a step consisting of calculating rewards, slashing and running the auction at the end of an era.

Fields of Step

step_request: StepRequest

The step request.

responder: Responder<Result<StepResult, Error>>

Responder to call with the result.

IsBonded

Check if validator is bonded in the future era (identified by era_id).

Fields of IsBonded

state_root_hash: Digest

State root hash of the LFB.

public_key: PublicKey

Validator public key.

era_id: EraId

Era ID in which validator should be bonded in.

protocol_version: ProtocolVersion

Protocol version at the state_root_hash.

responder: Responder<Result<bool, GetEraValidatorsError>>

Responder,

ReadTrie

Read a trie by its hash key

Fields of ReadTrie

trie_key: Blake2bHash

The hash of the value to get from the TrieStore

responder: Responder<Option<Trie<Key, StoredValue>>>

Responder to call with the result.

PutTrie

Insert a trie into global storage

Fields of PutTrie

trie: Box<Trie<Key, StoredValue>>

The hash of the value to get from the TrieStore

responder: Responder<Result<Vec<Blake2bHash>, Error>>

Responder to call with the result.

MissingTrieKeys

Get the missing keys under a given trie key in global storage

Fields of MissingTrieKeys

trie_key: Blake2bHash

The ancestral hash to use when finding hashes that are missing from the TrieStore

responder: Responder<Result<Vec<Blake2bHash>, Error>>

Responder to call with the result.

Trait Implementations

impl Debug for ContractRuntimeRequest[src]

impl Display for ContractRuntimeRequest[src]

impl From<ContractRuntimeRequest> for Event[src]

impl From<ContractRuntimeRequest> for Event[src]

impl From<ContractRuntimeRequest> for InitializerEvent[src]

impl From<ContractRuntimeRequest> for Event[src]

impl From<ContractRuntimeRequest> for Event[src]

impl Serialize for ContractRuntimeRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]