Tying event tape commitment as part of vm proof #1392
Replies: 3 comments 2 replies
-
Steps to integrate
pub struct EventTapeCommitment{
pub addr: [F; 32]
pub values: [F: 32]
pub is_first: F
} Apart from its populated first row, all other rows would be padding rows. We can set number of rows to any minimal table size that our proof system can support.
pub struct PublicInputs<F> {
pub entry_point: F,
pub event_comm: [F; 32],
}
|
Beta Was this translation helpful? Give feedback.
-
If I understand it correctly, you will use #1369 to connect the pre-initialized memory region 'event_tape_commitment' with the actual 'event_tape'? |
Beta Was this translation helpful? Give feedback.
-
An alternative method: |
Beta Was this translation helpful? Give feedback.
-
The Problem:
We assume honest provers using a provided SDK that generates correct proofs and event tapes.
We want to protect these provers from a malicious sequencer who might try to alter the event tape.
The sequencer needs to verify the proof, which ideally should include a canonical commitment to the event tape for verification.
Challenges of Existing Solutions:
Variable-Length Event Tape:
Ideally, the proof verification circuit (built with Plonky2) should take a commitment to the event tape as input.
However, the event tape can vary in length, making it difficult to have a fixed verification circuit in Plonky2.
Extracting Commitment from Starky Proofs:
An alternative is to have the prover's code (provided by the SDK) compute the canonical commitment before generating the proof.
To link this commitment to the final proof, it needs to be extracted from the Starky proof and integrated into the Plonky2 proof.
This involves making 32 entries referring to the commitment in
MemoryInit
table public, potentially requiring a significant increase in number of selector columns.Proposed Solution: Dedicated Event Tape Hash Table:
Introduce a pre-initialized memory region named
event_tape_commitment.
Populate the commitment values in the
MemoryInit
table as usual.Create a dedicated Stark table named
EventTapeHashTable.
This table will only have one populated row with entries for address (
addr
) andvalue
, both marked public.A filter (
is_first
) differentiates this single row from padded entries, as well asallowes us to do cross table lookup against the
MemoryInit
table with the public entries in theEventTapeHashTable
.The only difference between this and the former approach is that we have to constrain only single row, as opposed to 32 rows. This greatly simplifies public input constraints, and number of extra selector columns required
Beta Was this translation helpful? Give feedback.
All reactions