proto-kit / framework

Apache License 2.0
28 stars 10 forks source link

Fix bug in protocol and flow for merging blocks #229

Closed rpanic closed 1 day ago

rpanic commented 1 day ago

Previously, if there were more than 2 blocks in a batch, the block merging flow would halt because it couldn't find any more matches. This was because we only exposed the blockNumber as public output, therefore as soon as we merged blocks n+1 and n+2, the next merge (n and this block) couldn't find a match because n + 1 != n + 2.

The fix adds a "from" blockNumber to the publicInput and therefore allows corrected stitching.