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

pub enum ContractRuntimeRequest {
Show 14 variants ExecuteBlock(FinalizedBlock), GetProtocolData { protocol_version: ProtocolVersion, responder: Responder<Result<Option<Box<ProtocolData>>, Error>>, }, CommitGenesis { chainspec: Arc<Chainspec>, responder: Responder<Result<GenesisResult, 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>>, },
}
Expand description

A contract runtime request.

Variants

ExecuteBlock(FinalizedBlock)

A request to execute a block.

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.

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

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into a target type. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

Converts the given value to a String. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more