Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split public and private/unconstrained storage read oracles #7230

Closed
nventuro opened this issue Jun 27, 2024 · 0 comments · Fixed by #7243
Closed

Split public and private/unconstrained storage read oracles #7230

nventuro opened this issue Jun 27, 2024 · 0 comments · Fixed by #7243
Assignees

Comments

@nventuro
Copy link
Contributor

We currently have a single storage_read(storage_slot) oracle, called in all three environments. In public however the oracle is not actually called, and is instead transpiled into multiple sload opcodes. This is quite confusing.

On top of that, #7169 requires for the private/unconstrained storage_read oracle to also receive an address instead of using the one of the contract being executed, so this is a good opportunity to add this feature.

@github-project-automation github-project-automation bot moved this to Todo in A3 Jun 27, 2024
@nventuro nventuro self-assigned this Jun 27, 2024
nventuro added a commit that referenced this issue Jun 28, 2024
Part of #7230.
This splits the storage access oracles that transpile into opcodes, and
the ones that are resolved as actual oracle calls by PXE. I took the
liberty to introduce some slight improvements, such as removing unused
`length` params, write return values, and making the default fns call
serialize and deserialize, mirroring the actual usage they had
throughout our codebase and cleaning up the callsites.

The oracle improvements proposed in #7230 (taking arbitrary addresses
and block number) will come in a separate PR, as those require further
changes to PXE etc.
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Jun 29, 2024
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue Jun 29, 2024
Part of AztecProtocol/aztec-packages#7230.
This splits the storage access oracles that transpile into opcodes, and
the ones that are resolved as actual oracle calls by PXE. I took the
liberty to introduce some slight improvements, such as removing unused
`length` params, write return values, and making the default fns call
serialize and deserialize, mirroring the actual usage they had
throughout our codebase and cleaning up the callsites.

The oracle improvements proposed in #7230 (taking arbitrary addresses
and block number) will come in a separate PR, as those require further
changes to PXE etc.
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue Jun 29, 2024
… (#7243)

Follow up to #7237, closes
AztecProtocol/aztec-packages#7230. I only
changed the oracles and not the PXE interface to keep this change as
small as possible.

I did change the node interface, but made it so you can still do it the
old way by passing `'latest'`, which I had to do in a couple places.

Finally, I added getters for `UnconstrainedContext`, mirroring the work
in #7320, which I imagine are the ones we'll use in the vast majority of
cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant