pub fn is_valid_receipt_inclusion_proof(
    verified_epoch_receipts_root: MerkleHash,
    block_index_in_epoch: usize,
    num_blocks_in_epoch: usize,
    block_index_proof: &TrieProof,
    tx_index_in_block: usize,
    num_txs_in_block: usize,
    receipt: &Receipt,
    block_receipt_proof: &TrieProof
) -> bool
Expand description

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.