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

#[repr(u8)]
pub enum StorageRequest {
Show 22 variants PutBlock { block: Box<Block>, responder: Responder<bool>, }, GetBlock { block_hash: BlockHash, responder: Responder<Option<Block>>, }, GetBlockHeaderAtHeight { height: u64, responder: Responder<Option<BlockHeader>>, }, GetBlockAtHeight { height: u64, responder: Responder<Option<Block>>, }, GetHighestBlock { responder: Responder<Option<Block>>, }, GetSwitchBlockHeaderAtEraId { era_id: EraId, responder: Responder<Option<BlockHeader>>, }, GetSwitchBlockAtEraId { era_id: EraId, responder: Responder<Option<Block>>, }, GetBlockHeaderForDeploy { deploy_hash: DeployHash, responder: Responder<Option<BlockHeader>>, }, GetHighestSwitchBlock { responder: Responder<Option<Block>>, }, GetBlockHeader { block_hash: BlockHash, responder: Responder<Option<BlockHeader>>, }, GetBlockTransfers { block_hash: BlockHash, responder: Responder<Option<Vec<Transfer>>>, }, PutDeploy { deploy: Box<Deploy>, responder: Responder<bool>, }, GetDeploys { deploy_hashes: Vec<DeployHash>, responder: Responder<Vec<Option<Deploy>>>, }, GetDeployHeaders { deploy_hashes: Vec<DeployHash>, responder: Responder<Vec<Option<DeployHeader>>>, }, GetFinalizedDeploys { ttl: TimeDiff, responder: Responder<Vec<(DeployHash, DeployHeader)>>, }, PutExecutionResults { block_hash: Box<BlockHash>, execution_results: HashMap<DeployHash, ExecutionResult>, responder: Responder<()>, }, GetDeployAndMetadata { deploy_hash: DeployHash, responder: Responder<Option<(Deploy, DeployMetadata)>>, }, GetBlockAndMetadataByHash { block_hash: BlockHash, responder: Responder<Option<(Block, BlockSignatures)>>, }, GetBlockAndMetadataByHeight { block_height: u64, responder: Responder<Option<(Block, BlockSignatures)>>, }, GetHighestBlockWithMetadata { responder: Responder<Option<(Block, BlockSignatures)>>, }, GetBlockSignatures { block_hash: BlockHash, responder: Responder<Option<BlockSignatures>>, }, PutBlockSignatures { signatures: BlockSignatures, responder: Responder<bool>, },
}
Expand description

A storage request.

Variants

PutBlock

Store given block.

Fields of PutBlock

block: Box<Block>

Block to be stored.

responder: Responder<bool>

Responder to call with the result. Returns true if the block was stored on this attempt or false if it was previously stored.

GetBlock

Retrieve block with given hash.

Fields of GetBlock

block_hash: BlockHash

Hash of block to be retrieved.

responder: Responder<Option<Block>>

Responder to call with the result. Returns None is the block doesn’t exist in local storage.

GetBlockHeaderAtHeight

Retrieve block header with given height.

Fields of GetBlockHeaderAtHeight

height: u64

Height of the block.

responder: Responder<Option<BlockHeader>>

Responder.

GetBlockAtHeight

Retrieve block with given height.

Fields of GetBlockAtHeight

height: u64

Height of the block.

responder: Responder<Option<Block>>

Responder.

GetHighestBlock

Retrieve highest block.

Fields of GetHighestBlock

responder: Responder<Option<Block>>

Responder.

GetSwitchBlockHeaderAtEraId

Retrieve switch block header with given era ID.

Fields of GetSwitchBlockHeaderAtEraId

era_id: EraId

Era ID of the switch block.

responder: Responder<Option<BlockHeader>>

Responder.

GetSwitchBlockAtEraId

Retrieve switch block with given era ID.

Fields of GetSwitchBlockAtEraId

era_id: EraId

Era ID of the switch block.

responder: Responder<Option<Block>>

Responder.

GetBlockHeaderForDeploy

Retrieve the header of the block containing the deploy.

Fields of GetBlockHeaderForDeploy

deploy_hash: DeployHash

Hash of the deploy.

responder: Responder<Option<BlockHeader>>

Responder.

GetHighestSwitchBlock

Retrieve highest switch block.

Fields of GetHighestSwitchBlock

responder: Responder<Option<Block>>

Responder.

GetBlockHeader

Retrieve block header with given hash.

Fields of GetBlockHeader

block_hash: BlockHash

Hash of block to get header of.

responder: Responder<Option<BlockHeader>>

Responder to call with the result. Returns None is the block header doesn’t exist in local storage.

GetBlockTransfers

Retrieve all transfers in a block with given hash.

Fields of GetBlockTransfers

block_hash: BlockHash

Hash of block to get transfers of.

responder: Responder<Option<Vec<Transfer>>>

Responder to call with the result. Returns None is the transfers do not exist in local storage under the block_hash provided.

PutDeploy

Store given deploy.

Fields of PutDeploy

deploy: Box<Deploy>

Deploy to store.

responder: Responder<bool>

Responder to call with the result. Returns true if the deploy was stored on this attempt or false if it was previously stored.

GetDeploys

Retrieve deploys with given hashes.

Fields of GetDeploys

deploy_hashes: Vec<DeployHash>

Hashes of deploys to be retrieved.

responder: Responder<Vec<Option<Deploy>>>

Responder to call with the results.

GetDeployHeaders

Retrieve deploy headers with given hashes.

Fields of GetDeployHeaders

deploy_hashes: Vec<DeployHash>

Hashes of deploy headers to be retrieved.

responder: Responder<Vec<Option<DeployHeader>>>

Responder to call with the results.

GetFinalizedDeploys

Retrieve deploys that are finalized and whose TTL hasn’t expired yet.

Fields of GetFinalizedDeploys

ttl: TimeDiff

Maximum TTL of block we’re interested in. I.e. we don’t want deploys from blocks that are older than this.

responder: Responder<Vec<(DeployHash, DeployHeader)>>

Responder to call with the results.

PutExecutionResults

Store execution results for a set of deploys of a single block.

Will return a fatal error if there are already execution results known for a specific deploy/block combination and a different result is inserted.

Inserting the same block/deploy combination multiple times with the same execution results is not an error and will silently be ignored.

Fields of PutExecutionResults

block_hash: Box<BlockHash>

Hash of block.

execution_results: HashMap<DeployHash, ExecutionResult>

Mapping of deploys to execution results of the block.

responder: Responder<()>

Responder to call when done storing.

GetDeployAndMetadata

Retrieve deploy and its metadata.

Fields of GetDeployAndMetadata

deploy_hash: DeployHash

Hash of deploy to be retrieved.

responder: Responder<Option<(Deploy, DeployMetadata)>>

Responder to call with the results.

GetBlockAndMetadataByHash

Retrieve block and its metadata by its hash.

Fields of GetBlockAndMetadataByHash

block_hash: BlockHash

The hash of the block.

responder: Responder<Option<(Block, BlockSignatures)>>

The responder to call with the results.

GetBlockAndMetadataByHeight

Retrieve block and its metadata at a given height.

Fields of GetBlockAndMetadataByHeight

block_height: u64

The height of the block.

responder: Responder<Option<(Block, BlockSignatures)>>

The responder to call with the results.

GetHighestBlockWithMetadata

Get the highest block and its metadata.

Fields of GetHighestBlockWithMetadata

responder: Responder<Option<(Block, BlockSignatures)>>

The responder to call the results with.

GetBlockSignatures

Get finality signatures for a Block hash.

Fields of GetBlockSignatures

block_hash: BlockHash

The hash for the request

responder: Responder<Option<BlockSignatures>>

Responder to call with the result.

PutBlockSignatures

Store finality signatures.

Fields of PutBlockSignatures

signatures: BlockSignatures

Signatures that are to be stored.

responder: Responder<bool>

Responder to call with the result, if true then the signatures were successfully stored.

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