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 transactions::TxVerifierService;
pub use transactions::VerifyTxRequest;
pub use transactions::VerifyTxResponse;
Modules§
- Block Verifier Service.
- Transaction Verifier Service.
Structs§
- Blockchain context which keeps a token of validity so users will know when the data is no longer valid.
- The blockchain context service.
- Config for the context service.
Enums§
- A request to the blockchain context cache.
- 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 blockchain context service.
- Initialize the 2 verifier
tower::Service
s (block and transaction).