-
Notifications
You must be signed in to change notification settings - Fork 854
Conversation
@@ -359,6 +359,8 @@ impl<F: Field> Circuit<F> for InitialStateCircuit<F> { | |||
vec![q_enable * xnif(is_last_or_padding.expr(), new_root_propagation.expr())] | |||
}); | |||
|
|||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miha-stopar can you elaborate more why are you disabling this check?
The idea is that we have a consecutive set of non-changing transformations (the initial values) and a consecutive set of changing transformations (the changes in the block). Here I see that you remove the check of this transition, but I cannot see how this links with the non-existing-proofs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly the constraint ensures that if the root changed in the previous row, it needs to change in the current row as well. However, in the non-existing-proofs the root doesn't change from S
to C
(old_root
to new_root
) proofs - both proofs are the same and have the same root (only one would suffice, it's just because of the circuit layout).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adria0 There were four subtle things that were causing this constraint failure:
- implicitly created accounts
- the read proofs has been mixed within the write proofs (now they are at the beginning)
- the read proof was tried to be generated also for the accounts that didn't exist in the old block
- double entries that you fixed in a0b86fb
Seems like now works ok :)
ee5f8ac
to
835d71b
Compare
Closing this because the light client is deprecated. I wrote down the observations and fixes from this PR in the MPT specs: privacy-scaling-explorations/zkevm-specs@8fd8bc8 |
Description
This PR introduces non-existing proofs for the initial state circuit for the leaves that don't exist yet in the trie. The required changes in the MPT circuit are implemented here.
Issue Link
The related issue is here, but this PR only partially resolves it.
Type of change