Validation debug (optional)¶
Default build variant discarding the optional validation debug records.
Non-normative
This page documents the model's host interface — internal contracts of the executable specification, not protocol rules.
function validation_debug_reset¶
Clears the recorded failure at the start of a validation attempt.
function validation_debug_reset() -> unit = ()function validation_debug_capture_block_gas¶
function validation_debug_capture_block_gas(_actual, _expected, _execution, _state) -> unit =
()function validation_debug_capture_block_gas(_actual, _expected, _execution, _state) -> unit =
()function validation_debug_record¶
Records the failing validation stage and reason for host inspection; a later record overwrites an earlier one.
function validation_debug_record(_stage : validation_stage, _reason : FatalError) -> unit = ()The reason a block fails validation; one variant per violated block-validity rule.
enum FatalError = {
/* chain config: wrong fork / inactive activation */
InvalidConfig,
/* witness ancestor headers not contiguous */
HeaderChainBroken,
/* a transaction failed to RLP-decode */
RlpDecode,
/* a tx signature did not authenticate its sender */
InvalidSignature,
/* header.gas_limit is outside the consensus domain */
InvalidGasLimit,
/* EIP-7778: a tx exceeds the block's remaining gas */
GasUsedExceedsLimit,
/* a tx exceeds the block's remaining blob gas */
BlobGasLimitExceeded,
/* an invalid tx or a failed block-end system call */
ExecutionInvalid,
/* recomputed cumulative gas != header.gas_used */
InvalidGasUsed,
/* recomputed blob gas != header.blob_gas_used */
InvalidBlobGasUsed,
/* header.excess_blob_gas != expected */
InvalidExcessBlobGas,
/* recomputed post-state root != header.state_root */
InvalidStateRoot,
/* recomputed receipts root != header.receipts_root */
InvalidReceiptsRoot,
/* recomputed logs bloom != header.logs_bloom */
InvalidLogsBloom,
/* recomputed block hash != payload expected hash */
InvalidBlockHash,
/* header.parent_hash != authenticated parent */
InvalidParentHash,
/* EIP-7928: BAL item count > gas_limit / 2000 */
BlockAccessListTooLarge,
/* reconstructed EIP-7928 BAL bytes mismatch */
InvalidBlockAccessList,
/* reconstructed EIP-7685 request bytes mismatch */
InvalidExecutionRequests,
/* a missing/inconsistent proof node (thrown at use) */
WitnessDeficient,
/* an exact protocol integer exceeds its bounded execution representation */
NumericOverflow,
}Stable identifier for the validation stage that raised a block error. This diagnostic metadata is a bounded integer, not a protocol bitvector.
type validation_stage = range(0, 255)function debug_account_storage_root¶
function debug_account_storage_root(_a : address) -> hash = EMPTY_TRIE_ROOTkeccak256(rlp("")) — the root of an empty Merkle-Patricia trie: the
storage root of every account with no storage (EMPTY_ACCOUNT, freshly
created).
let EMPTY_TRIE_ROOT : hash = hash_from_bits(0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421)A 20-byte account address (YP §4.1), in canonical protocol byte order.
type address = vector(20, inc, byte)The common digest type used by trie, code, and block hashes.
type hash = b256