Assessment reports>Polyhedra DVN>Threat Model>batchVerify

Function: batchVerify(byte[32][] _blockHashs, byte[][] _encodedPayloads, byte[][] _zkMptProof)

This function is the bulk version of verify(byte[32] _blockHash, byte[] _encodedPayload, byte[] _zkMptProof). This sign-off applies to both functions.

Performs batch verification of the zkMPT proofs for the given block hashes and encoded payloads.

Internally calls _verify, which ensures the blockHash exists, and submits the packet to the receiver library.

Inputs

  • _blockHashs

    • Control: Full.

    • Constraints: Must be the same length as _encodedPayloads and _zkMptProof. Must contain the block hash matching the receipt root for each.

    • Impact: The block hashes containing the receipt roots for the encoded payloads.

  • _encodedPayloads

    • Control: Full.

    • Constraints: Must be the same length as _blockHashs and _zkMptProof. Must contain the encoded payloads for each.

    • Impact: The EncodedPayload structs to verify.

  • _zkMptProof

    • Control: Full.

    • Constraints: Must be the same length as _blockHashs and _encodedPayloads. Must contain valid ZK proofs.

    • Impact: The ZK proofs to validate.

Branches and code coverage

Intended branches

  • Verifies a valid zkMPT proof.

Negative behavior

  • Invalid zkMPT proof provided.

  • zkMptValidator not configured.

  • blockUpdater not configured.

  • Nonexisting blockHash provided.

  • Lengths of the arrays are mismatched.

Zellic © 2025Back to top ↑