From 1bc05539c9d1fcfbd75434ea0a372b12aca2435a Mon Sep 17 00:00:00 2001 From: boleklebovski <160799963+boleklebovski@users.noreply.github.com> Date: Tue, 11 Aug 2026 21:48:34 +0200 Subject: [PATCH] test: pad the proof-length byte in PatriciaMerkleTrieVerifier spec `0x0${n.toString(16)}` only yields a byte for n < 16; ZkTrieVerifier.spec already uses padStart. Signed-off-by: boleklebovski <160799963+boleklebovski@users.noreply.github.com> --- hardhat-test/PatriciaMerkleTrieVerifier.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardhat-test/PatriciaMerkleTrieVerifier.spec.ts b/hardhat-test/PatriciaMerkleTrieVerifier.spec.ts index 10750cd1..b738fbb5 100644 --- a/hardhat-test/PatriciaMerkleTrieVerifier.spec.ts +++ b/hardhat-test/PatriciaMerkleTrieVerifier.spec.ts @@ -127,9 +127,9 @@ describe("PatriciaMerkleTrieVerifier", async () => { for (const test of testcases) { it(`should succeed for block[${test.block}] account[${test.account}] storage[${test.storage}]`, async () => { const proof = concat([ - `0x0${test.accountProof.length.toString(16)}`, + `0x${test.accountProof.length.toString(16).padStart(2, "0")}`, ...test.accountProof, - `0x0${test.storageProof.length.toString(16)}`, + `0x${test.storageProof.length.toString(16).padStart(2, "0")}`, ...test.storageProof, ]); const [root, value, gasUsed] = await verifier.verifyPatriciaProof(test.account, test.storage, proof);