Skip to content

How to deal with variable proofset length when verifying a merkle tree in a circuit #1069

Answered by ivokub
beegmon asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, unfortunately it is not possible to have a variable-length input to the circuit directly. The circuit definition is compiled into a set of polynomial identities and for that the compiler needs to know the length of the inputs at compile time.

However, one possible approach is to use recursion. Lets say you have a PLONK circuit verifying MT of size 2^8 (layer 0). Then you can construct a recursive which verifies another MT and the previous PLONK proofs.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@beegmon
Comment options

@hussein-aitlahcen
Comment options

Answer selected by beegmon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants