Crate ckb_verification

Source
Expand description

CKB verification

This crate implements CKB non-contextual verification by newtypes abstraction struct

Modules§

cache
TX verification cache

Structs§

BlockError
Errors due the fact that the block rule is not respected.
BlockTransactionsError
Errors occur during block transactions verification.
BlockVerifier
Block verifier that are independent of context.
BlockVersionError
The block version is unexpected.
CapacityVerifier
Perform inputs and outputs capacity field related verification
ContextualTransactionVerifier
Context-dependent verification checks for transaction
DaoScriptSizeVerifier
Verifies that deposit cell and withdrawing cell in Nervos DAO use same sized lock scripts. It provides a temporary solution till Nervos DAO script can be properly upgraded.
GenesisVerifier
The genesis verification
HeaderError
Errors due the fact that the header rule is not respected.
HeaderVerifier
Context-dependent verification checks for block header
InvalidParentError
The block’s parent is marked as invalid.
NonContextualBlockTxsVerifier
Context-independent verification checks for block transactions
NonContextualTransactionVerifier
Context-independent verification checks for transaction
NumberError
The block number is not equal to parent number + 1. Specially genesis block number is 0.
ScriptVerifyState
Struct specifies which script has verified so far. State is lifetime free, but capture snapshot need heavy memory copy
Since
The struct define wrapper for (unsigned 64-bit integer) tx field since
TimeRelativeTransactionVerifier
The time-related TX verification
TxVerifyEnv
The environment that transactions are in.
UnknownParentError
Cannot access the parent block to the canonical chain.

Enums§

BlockErrorKind
A list specifying categories of ckb block error.
CellbaseError
Errors due to the fact that the cellbase rule is not respected.
CommitError
Errors due to the fact that the 2pc rule is not respected.
EpochError
Errors due to the fact that the block epoch is not expected.
HeaderErrorKind
A list specifying categories of ckb header error.
PowError
Errors due to the fact that the pow rule is not respected.
ScriptError
Script execution error.
ScriptGroupType
The script group type.
ScriptVerifyResult
Enum represent resumable verify result
SinceMetric
Metric represent value
TimestampError
Errors due to the fact that the block timestamp rule is not respected.
TransactionError
The error types to transactions.
UnclesError
Errors due to the fact that the uncle rule is not respected.

Constants§

ALLOWED_FUTURE_BLOCKTIME
Maximum amount of time that a block timestamp is allowed to exceed the current time before the block will be accepted.

Type Aliases§

ScriptVerifier
Perform rules verification describe in CKB script, also check cycles limit