Module cfxcore::verification

source ·

Structs§

Enums§

Functions§

  • Compute a proof for the tx_index_in_block-th receipt in a block.
  • Compute a proof for the tx_index_in_block-th receipt in the block_index_in_epoch-th block in an epoch.
  • Compute epoch receipts root. This value is stored in the deferred_receipts_root header field.
  • Compute a proof for the tx_index_in_block-th transaction in a block.
  • Compute block transaction root. This value is stored in the transactions_root header field.
  • 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.
  • 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.