Expand description
Cuprate Consensus
This crate contains 3 tower::Service
s that implement Monero’s consensus rules:
BlockChainContextService
Which handles keeping the current state of the blockchain.BlockVerifierService
Which handles block verification.TxVerifierService
Which 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 BlockchainReadRequest
and responds
with BlockchainResponse
.
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.
- An identifier for every hard-fork Monero has had.
Functions§
- Generates the Monero genesis block.
- Initialize the 2 verifier
tower::Service
s (block and transaction).