Verifier: Block Headers
Validates the block header component of a transaction proof is properly formatted.
- The hash of the block header must be the block hash at
proof.blockHeader.blockHeight
. - If checking for finalizable block, then:
- The current block number must be at least the block number
proof.blockHeader.blockNumber
.
- The current block number must be at least the block number
- If checking for not-finalizable block, then:
- The current block number must be less than the block number
proof.blockHeader.blockNumber
.
- The current block number must be less than the block number
Additional checks must pass if the root header component of a transaction proof is also being validated at the same time.
- The root index
proof.rootIndex
must be less than the number of rootsproof.blockHeader.roots.length
. - The hash of the root header
proof.rootHeader
must match the root header at indexproof.rootIndex
.