1

I'm trying to reverse the input of a Merkle tree by comparing a proof from the original tree and the proof I am generating myself.

Original proof:

[
    "0x738cf34d25d0f7f2b3267982fae5217128178fa8c9ef62278ac458e28c5821b7",
    "0xf4474db66b110943989428179bb76a99758fe18c7484c7ba6bb171853fb2f672",
    "0xf03a304123fb20a25b72bc4a8adffd60095c3621cd4ab010479f2df5da56c744",
    "0x4cbc2a3af5334ad82c30ef0a2cc4839f7b6fe6488c26dca467cf4ec171b6b7a0",
    "0x796b541b652d1d2a65ce9aa28bbb5aaef62177451ea4bbc15ae7bfa5168d468b",
    "0x1a94cf9edd955fb8df6b5e84a8ba94dc3192e98453dc808c135bdc52b4bf18f6",
    "0xa76175d0ef45defc5b12e498dc8d9ffe1c657d73ad550768c5e840cf0d336980",
    "0x498c55290416d75dd9716902b2654166d6f5e8be09104edfd56bd95dbe2adc90",
    "0x6867a748e728fe4673484ac76c6a7fda1794a23950b4c2587c24a00671c084fe",
    "0x74b6b61b99e32e54244fd1339f9b8fe2368cc0989677f5cf69816d03a47480f7",
    "0x011e5b59c850bf6ce3211d78c370568048e93d92487c83e637c0abdd018bf33e",
    "0x1fefa79cdb65d1e4a91c784fca4db88382ffc10406ee96189a1b3c2102a359c1",
    "0x53a5654d0e5f424fcf1095b357d5d62917ef9030cfbd54bdbe5cb078b3f0508d",
    "0xd70c9fcdaaa18649df0c2ae2e29498a3bdc0269448e948228d02addaf22dc530",
]

My proof:

[
  '0x738cf34d25d0f7f2b3267982fae5217128178fa8c9ef62278ac458e28c5821b7',
  '0xf4474db66b110943989428179bb76a99758fe18c7484c7ba6bb171853fb2f672',
  '0xf03a304123fb20a25b72bc4a8adffd60095c3621cd4ab010479f2df5da56c744',
  '0x4cbc2a3af5334ad82c30ef0a2cc4839f7b6fe6488c26dca467cf4ec171b6b7a0',
  '0x796b541b652d1d2a65ce9aa28bbb5aaef62177451ea4bbc15ae7bfa5168d468b',
  '0x1a94cf9edd955fb8df6b5e84a8ba94dc3192e98453dc808c135bdc52b4bf18f6',
  '0xa76175d0ef45defc5b12e498dc8d9ffe1c657d73ad550768c5e840cf0d336980',
  '0x498c55290416d75dd9716902b2654166d6f5e8be09104edfd56bd95dbe2adc90',
  '0x6867a748e728fe4673484ac76c6a7fda1794a23950b4c2587c24a00671c084fe',
  '0x74b6b61b99e32e54244fd1339f9b8fe2368cc0989677f5cf69816d03a47480f7',
  '0x011e5b59c850bf6ce3211d78c370568048e93d92487c83e637c0abdd018bf33e',
  '0x1fefa79cdb65d1e4a91c784fca4db88382ffc10406ee96189a1b3c2102a359c1',
  '0x53a5654d0e5f424fcf1095b357d5d62917ef9030cfbd54bdbe5cb078b3f0508d',
  '0x8d41dc10f4b775fb64acbb16141b980b1530e99fc45150a2b7856c1c7ac1816f'
]

As you can see I have successfully matched it expect the very last element. Is this just coincidence or is there a common explanation as to why they would be almost identical? It seems like I'm close to solving it but maybe there's a simple change I could make?

Thanks for any help

2
  • So you are staring from all the original proofs, getting all the inputs, and use the inputs to generate the proofs, then compare with the original ones. Am I getting it right?
    – 0xSanson
    Commented Sep 8, 2022 at 22:44
  • @0xSanson yes that's correct
    – 0xBielsa
    Commented Sep 9, 2022 at 10:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.