Crate cuprate_consensus
source ·Expand description
Cuprate Consensus
This crate contains 3 tower::Services that implement Monero’s consensus rules:
BlockChainContextServiceWhich handles keeping the current state of the blockchain.BlockVerifierServiceWhich handles block verification.TxVerifierServiceWhich handles transaction verification.
This crate is generic over the database which is implemented as a tower::Service. To
implement a database you need to have a service which accepts BCReadRequest and responds
with BCResponse.
Re-exports§
pub use block::BlockVerifierService;pub use block::VerifyBlockRequest;pub use block::VerifyBlockResponse;pub use context::initialize_blockchain_context;pub use context::BlockChainContext;pub use context::BlockChainContextRequest;pub use context::BlockChainContextResponse;pub use context::BlockChainContextService;pub use context::ContextConfig;pub use transactions::TxVerifierService;pub use transactions::VerifyTxRequest;pub use transactions::VerifyTxResponse;
Modules§
- Block Verifier Service.
- Blockchain Context
- Transaction Verifier Service.
Enums§
- A read request to the blockchain database.
- A response from the database.
- An Error returned from one of the consensus services.
Functions§
- Initialize the 2 verifier
tower::Services (block and transaction).