pub struct NoopApplication;Expand description
No-op application stub for testing and fullnode-without-ABCI mode.
Trait Implementations§
Source§impl Application for NoopApplication
impl Application for NoopApplication
Source§fn tracks_app_hash(&self) -> bool
fn tracks_app_hash(&self) -> bool
NoopApplication does not maintain state, so app_hash tracking is skipped.
Source§fn create_payload(&self, _ctx: &BlockContext<'_>) -> Vec<u8> ⓘ
fn create_payload(&self, _ctx: &BlockContext<'_>) -> Vec<u8> ⓘ
Create a payload for a new block proposal.
Typically pulls transactions from the mempool. Read more
Source§fn validate_block(&self, _block: &Block, _ctx: &BlockContext<'_>) -> bool
fn validate_block(&self, _block: &Block, _ctx: &BlockContext<'_>) -> bool
Validate a proposed block before voting.
Source§fn validate_tx(
&self,
_tx: &[u8],
_ctx: Option<&TxContext>,
) -> TxValidationResult
fn validate_tx( &self, _tx: &[u8], _ctx: Option<&TxContext>, ) -> TxValidationResult
Validate a single transaction for mempool admission. Read more
Source§fn execute_block(
&self,
_txs: &[&[u8]],
_ctx: &BlockContext<'_>,
) -> Result<EndBlockResponse>
fn execute_block( &self, _txs: &[&[u8]], _ctx: &BlockContext<'_>, ) -> Result<EndBlockResponse>
Execute an entire block in one call. Read more
Source§fn on_commit(&self, _block: &Block, _ctx: &BlockContext<'_>) -> Result<()>
fn on_commit(&self, _block: &Block, _ctx: &BlockContext<'_>) -> Result<()>
Called when a block is committed to the chain (notification).
Source§fn on_evidence(&self, _proof: &EquivocationProof) -> Result<()>
fn on_evidence(&self, _proof: &EquivocationProof) -> Result<()>
Called when equivocation (double-voting) is detected.
The application can use this to implement slashing.
Source§fn extend_vote(
&self,
_block: &Block,
_ctx: &BlockContext<'_>,
) -> Option<Vec<u8>>
fn extend_vote( &self, _block: &Block, _ctx: &BlockContext<'_>, ) -> Option<Vec<u8>>
Generate a vote extension for the given block (ABCI++ Vote Extensions).
Called before casting a Vote2 (second-phase vote).
Returns None to skip extension (default behavior).
Source§fn verify_vote_extension(
&self,
_extension: &[u8],
_block_hash: &BlockHash,
_validator: ValidatorId,
) -> bool
fn verify_vote_extension( &self, _extension: &[u8], _block_hash: &BlockHash, _validator: ValidatorId, ) -> bool
Verify a vote extension received from another validator.
Called when processing Vote2 messages that carry extensions.
Returns true if the extension is valid (default: accept all).
Source§fn query(&self, _path: &str, _data: &[u8]) -> Result<Vec<u8>>
fn query(&self, _path: &str, _data: &[u8]) -> Result<Vec<u8>>
Query application state (returns opaque bytes).
Source§fn list_snapshots(&self) -> Vec<SnapshotInfo>
fn list_snapshots(&self) -> Vec<SnapshotInfo>
List available state snapshots for state sync.
Source§fn load_snapshot_chunk(&self, _height: Height, _chunk_index: u32) -> Vec<u8> ⓘ
fn load_snapshot_chunk(&self, _height: Height, _chunk_index: u32) -> Vec<u8> ⓘ
Load a chunk of a snapshot at the given height.
Source§fn offer_snapshot(&self, _snapshot: &SnapshotInfo) -> SnapshotOfferResult
fn offer_snapshot(&self, _snapshot: &SnapshotInfo) -> SnapshotOfferResult
Offer a snapshot to the application for state sync.
Source§fn apply_snapshot_chunk(
&self,
_chunk: Vec<u8>,
_chunk_index: u32,
) -> ChunkApplyResult
fn apply_snapshot_chunk( &self, _chunk: Vec<u8>, _chunk_index: u32, ) -> ChunkApplyResult
Apply a snapshot chunk received during state sync.
Auto Trait Implementations§
impl Freeze for NoopApplication
impl RefUnwindSafe for NoopApplication
impl Send for NoopApplication
impl Sync for NoopApplication
impl Unpin for NoopApplication
impl UnsafeUnpin for NoopApplication
impl UnwindSafe for NoopApplication
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more