Module cuprate_consensus::context
source · Expand description
§Blockchain Context
This module 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
.
Structs§
- Blockchain context which keeps a token of validity so users will know when the data is no longer valid.
- The blockchain context service.
- Configuration for the block weight cache.
- Config for the context service.
- Configuration for the difficulty cache.
- Configuration for hard-forks.
- Data needed from a new block to add it to the context cache.
- Raw blockchain context, gotten from
BlockChainContext
. This data may turn invalid so is not ok to keep around. You should keep aroundBlockChainContext
instead. - A token representing if a piece of data is valid.
Enums§
- A request to the blockchain context cache.
Functions§
- Initialize the blockchain context service.