Module verification

Source

Structs§

EpochReceiptProof
VerificationConfig

Enums§

PackingCheckResult
VerifyTxLocalMode
VerifyTxMode

Functions§

compute_block_receipt_proof
Compute a proof for the tx_index_in_block-th receipt in a block.
compute_epoch_receipt_proof
Compute a proof for the tx_index_in_block-th receipt in the block_index_in_epoch-th block in an epoch.
compute_receipts_root
Compute epoch receipts root. This value is stored in the deferred_receipts_root header field.
compute_transaction_proof
Compute a proof for the tx_index_in_block-th transaction in a block.
compute_transaction_root
Compute block transaction root. This value is stored in the transactions_root header field.
is_valid_receipt_inclusion_proof
Use block_index_proof to get the correct block receipts trie root for the block_index_in_epoch-th block in an epoch with num_blocks_in_epoch blocks and receipts root verified_epoch_receipts_root. Then, use block_receipt_proof to verify that receipt is indeed the tx_index_in_block-th receipt in a block with num_txs_in_block transactions and the transaction root from the previous step.
is_valid_tx_inclusion_proof
Use proof to verify that tx_hash is indeed the tx_index_in_block-th transaction in a block with num_txs_in_block transactions and transaction root block_tx_root.