consensus: Add a mempool stub
This commit is contained in:
parent
8f2ddef0a4
commit
997201c9c7
|
|
@ -3,7 +3,8 @@
|
||||||
//! `verify::BlockVerifier` verifies blocks and their transactions, then adds them to
|
//! `verify::BlockVerifier` verifies blocks and their transactions, then adds them to
|
||||||
//! `zebra_state::ZebraState`.
|
//! `zebra_state::ZebraState`.
|
||||||
//!
|
//!
|
||||||
//! `mempool::ZebraMempool` verifies transactions, and adds them to the mempool state.
|
//! `mempool::MempoolTransactionVerifier` verifies transactions, and adds them to
|
||||||
|
//! `mempool::ZebraMempoolState`.
|
||||||
//!
|
//!
|
||||||
//! Consensus handling is provided using `tower::Service`s, to support backpressure
|
//! Consensus handling is provided using `tower::Service`s, to support backpressure
|
||||||
//! and batch verification.
|
//! and batch verification.
|
||||||
|
|
@ -12,4 +13,5 @@
|
||||||
#![doc(html_root_url = "https://doc.zebra.zfnd.org/zebra_consensus")]
|
#![doc(html_root_url = "https://doc.zebra.zfnd.org/zebra_consensus")]
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
|
pub mod mempool;
|
||||||
pub mod verify;
|
pub mod verify;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
//! Mempool transaction verification and state for Zebra.
|
||||||
|
//!
|
||||||
|
//! Mempool updates occur in multiple stages:
|
||||||
|
//! - getting transactions (disk- or network-bound)
|
||||||
|
//! - context-free verification of signatures, proofs, and scripts (CPU-bound)
|
||||||
|
//! - context-dependent verification of mempool transactions against the chain state
|
||||||
|
//! (awaits an up-to-date chain)
|
||||||
|
//! - adding transactions to the mempool
|
||||||
|
//!
|
||||||
|
//! The mempool is provided via a `tower::Service`, to support backpressure and batch
|
||||||
|
//! verification.
|
||||||
|
|
||||||
|
/// Mempool state.
|
||||||
|
///
|
||||||
|
/// New transactions are verified, checked against the chain state, then added to the
|
||||||
|
/// mempool.
|
||||||
|
///
|
||||||
|
/// `ZebraMempoolState` is not yet implemented.
|
||||||
|
#[derive(Default)]
|
||||||
|
struct ZebraMempoolState {}
|
||||||
|
|
||||||
|
/// Mempool transaction verification.
|
||||||
|
///
|
||||||
|
/// New transactions are verified, checked against the chain state, then added to the
|
||||||
|
/// mempool.
|
||||||
|
///
|
||||||
|
/// `MempoolTransactionVerifier` is not yet implemented.
|
||||||
|
#[derive(Default)]
|
||||||
|
struct MempoolTransactionVerifier {}
|
||||||
Loading…
Reference in New Issue