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
Currently notes created in the setup or teardown phases are tracked as "non revertible" by the public kernel and when the two accumulator get recombined for the base rollup note hashes get mixed up (i.e. a note created in teardown will become the first note hash in the recombined array). This breaks note hashing because in private notes are hashed with a nonce derived from their location in the notes hash array.
The text was updated successfully, but these errors were encountered:
This PR adds start/end side effect counters to private & public context
inputs.
This solves #4958 by assigning the correct side effect counters to notes
created in setup/teardown so that when they're recombined into a single
array they can be sorted in order of creation. A few e2e tests were also
added to validate the change.
Next steps:
- track public storage reads and writes as side effects in Noir
(currently done in parallel, in TS)
- validate a call's side effects are in between its start and end
counters in the private and kernels
- when calling a public function, the public context should update its
`context.side_effect_counter` to the called function's
`end_side_effect_counter + 1` (just like the private context)
- rename `call_context.side_effect_counter` to just
`call_context.counter`
Fix#4958Fix#5185
Currently notes created in the setup or teardown phases are tracked as "non revertible" by the public kernel and when the two accumulator get recombined for the base rollup note hashes get mixed up (i.e. a note created in teardown will become the first note hash in the recombined array). This breaks note hashing because in private notes are hashed with a nonce derived from their location in the notes hash array.
The text was updated successfully, but these errors were encountered: