You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The block execution proof proves that a block B was produced, which transforms an initial state S into a final state S', so it proves the statement: S' = f(S, B), where f is the block execution algorithm of ethrex. All of the data (S, B, S') are private inputs of the execution program, but the program exposes the digest of S (initial state root) and of S` (final state root) as public inputs.
Currently the verify() function does not check anything about these public inputs, so it verifies any block no matter if it's the one expected or not. It takes a blockNumber parameter but also doesn't checks it. Also it doesn't keep into account the latest validated state of the L2.
We need to:
Store the current state root in the contract's storage
In the verify() function:
Replace the blockNumber parameter with new_state_root
Check that current_state_root and new_state_root are the public inputs of the proof (initial and final)
Update current_state_root = new_state_root if the verification succeeds.
The text was updated successfully, but these errors were encountered:
The block execution proof proves that a block B was produced, which transforms an initial state S into a final state S', so it proves the statement: S' = f(S, B), where f is the block execution algorithm of ethrex. All of the data (S, B, S') are private inputs of the execution program, but the program exposes the digest of S (initial state root) and of S` (final state root) as public inputs.
Currently the
verify()
function does not check anything about these public inputs, so it verifies any block no matter if it's the one expected or not. It takes ablockNumber
parameter but also doesn't checks it. Also it doesn't keep into account the latest validated state of the L2.We need to:
verify()
function:blockNumber
parameter withnew_state_root
current_state_root
andnew_state_root
are the public inputs of the proof (initial and final)current_state_root = new_state_root
if the verification succeeds.The text was updated successfully, but these errors were encountered: