These will be changes to AvmPersistableStateManager to perform siloing, hashing, & membership checks.
### \[SIMULATOR] Siloing & hashing
- [x] Silo storage slot to public data leaf index (`SLOAD` & `SSTORE`)
- [x] Silo nullifiers (`NULLIFIEREXISTS` & `EMITNULLIFIER`)
- [x] Hash nullifier leaf preimages to leaf (`NULLIFIEREXISTS` & `EMITNULLIFIER`)
- [x] Derive contract address nullifier from contract instance preimage (`GETCONTRACTINSTANCE`)
- [ ] Hash unencrypted log preimages (`EMITUNENCRYPTEDLOG`)
### \[SIMULATOR] General tree access
- [x] Support tree root updates, snapshots, rollbacks (based on current phase), & place final roots in public inputs
- [ ] Insert all _non-revertible_ side effects from *private* at public simulation startup (before setup phase)
- [ ] Insert all _revertible_ side effects from *private* after setup phase, before app-logic phase
### \[SIMULATOR] Read opcodes
- [x] Membership check for `SLOAD`
- [x] Membership check for `NOTEHASHEXISTS`
- [x] Low-leaf membership check for `NULLIFIEREXISTS`
- [x] Membership check for `L1TOL2MESSAGEEXISTS`
- [ ] Low-leaf nullifier membership check for `GETCONTRACTINSTANCE`
These will be changes to AvmPersistableStateManager & the SideEffectTrace. The state manager will pass preimages and membership witnesses to the trace which will then craft hints.
### Hinting tasks
- [x] Simulator sends public data tree read membership check hints to witgen
- [x] Simulator sends note hash read membership check hints to witgen
- [x] Simulator sends nullifier read membership check hints to witgen
- [x] Simulator sends l1 to l2 message read membership check hints to witgen
- [x] Simulator sends public data tree update membership check hints to witgen
- [x] Simulator sends note hash insertion membership check hints to witgen
- [x] Simulator sends nullifier insertion membership check hints to witgen
Witgen tasks
Witgen will accept hints from TS, perform siloing, hashing, membership checks.
### [WITGEN] Siloing & hashing
- [ ] Silo storage slot to public data leaf index (`SLOAD` & `SSTORE`)
- [ ] Silo nullifiers (`NULLIFIEREXISTS` & `EMITNULLIFIER`)
- [ ] Hash nullifier leaf preimages to leaf (`NULLIFIEREXISTS` & `EMITNULLIFIER`)
- [ ] Derive contract address nullifier from contract instance preimage (`GETCONTRACTINSTANCE`)
- [ ] Hash unencrypted log preimages (`EMITUNENCRYPTEDLOG`)
### \[WITGEN] General tree access
- [ ] Support tree root updates, snapshots, rollbacks (based on current phase), & place final roots in public inputs
- [ ] Insert all _non-revertible_ side effects from *private* at public simulation startup (before setup phase)
- [ ] Insert all _revertible_ side effects from *private* after setup phase, before app-logic phase
### [WITGEN] Read opcodes
- [ ] Membership check for `SLOAD`
- [ ] Membership check for `NOTEHASHEXISTS`
- [ ] Low-leaf membership check for `NULLIFIEREXISTS`
- [ ] Membership check for `L1TOL2MESSAGEEXISTS`
- [ ] Low-leaf nullifier membership check for `GETCONTRACTINSTANCE`
This ticket is only for simulator & witgen tasks. There is a follow-up task for circuit/constraining: https://github.com/AztecProtocol/aztec-packages/issues/9457
Simulator tasks
These will be changes to
AvmPersistableStateManager
to perform siloing, hashing, & membership checks.Hinting tasks
These will be changes to
AvmPersistableStateManager
& theSideEffectTrace
. The state manager will pass preimages and membership witnesses to the trace which will then craft hints.Witgen tasks
Witgen will accept hints from TS, perform siloing, hashing, membership checks.