Crate cuprate_consensus_context

Source
Expand description

§Blockchain Context

This crate contains a service to get cached context from the blockchain: BlockChainContext. This is used during contextual validation, this does not have all the data for contextual validation (outputs) for that you will need a Database.

Re-exports§

pub use difficulty::DifficultyCacheConfig;
pub use hardforks::HardForkConfig;
pub use weight::BlockWeightsCacheConfig;

Modules§

__private
difficulty
Difficulty Module
hardforks
rx_vms
RandomX VM Cache
weight
Block Weights

Structs§

AltChainContextCache
The context cache of an alternative chain.
AltChainRequestToken
A token that should be hard to create from outside this crate.
BlockChainContext
Blockchain context which keeps a token of validity so users will know when the data is no longer valid.
BlockChainContextService
The blockchain context service.
ContextConfig
Config for the context service.
DataNoLongerValid
NewBlockData
Data needed from a new block to add it to the context cache.
RawBlockChainContext
Raw blockchain context, gotten from BlockChainContext. This data may turn invalid so is not ok to keep around. You should keep around BlockChainContext instead.
ValidityToken
A token representing if a piece of data is valid.

Enums§

BlockChainContextRequest
A request to the blockchain context cache.
BlockChainContextResponse
ContextCacheError

Constants§

BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW

Functions§

initialize_blockchain_context
Initialize the blockchain context service.