Open ZenGround0 opened 4 weeks 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:
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.