Closed ZenGround0 closed 1 month ago
This is both a Go library that we might expect SP software to integrate, and a binary wrapping it for use, especially in testing.
don't think existing Go merkle tree libraries are going to be any good for us here. They all require something analogous to [][]byte
as input for the leaves. We want to use a single []byte
(or really a random-access file) with the breaking into leaves being implicit. We don't want to instantiate slices.
For reference, some existing Go merkle tree libs:
I think this is now covered by 1) all @anorth's testing work i.e. here 2) curio soon beginning work on the actual node which will include proof generation.
We can reopen this if we decide we want to do something in addition to the curio pdp node.
Write a go program that given a file and an index into the file returns a valid merkle proof of that index to the root of the file. There's some ambiguity in the interface here. Maybe we take in challenge seed and a set of files corresponding to a proof set? Maybe that's somewhere else and we just take in the file. Maybe we also take in merkle root of file and check against it?
We'll want this for integration testing on devnets and potentially for generating proofs for use in solidity tests.