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

chore: PXE oracle refactor #12410

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

chore: PXE oracle refactor #12410

wants to merge 10 commits into from

Conversation

Thunkar
Copy link
Contributor

@Thunkar Thunkar commented Mar 3, 2025

Attempt to address PXE's structural problems, but mostly renaming:

  • Too many things were called oracles. In this PR, only the foreign call handlers passed to the simulator during private and unconstrained executions are called oracles. As such, we have PrivateExecutionOracle (formerly ClientExecutionContext) and UnconstrainedExecutionOracle (formerly ViewDataOracle). The private execution oracle inherits from the unconstrained one, since that's how our execution model works (private can do all the things unconstrained can plus more)
  • ContractDataOracle has been substituted by ContractDataProvider. In short, it's just a cache layer + merkle tree constructor that provides contract information to both the execution oracles and the kernel oracle, so I think it's a lot more accurate now.
  • DBOracle interface is dead. Like the others, it's called now ExecutionDataProvider since it's a layer that the actual Private and Unconstrained oracles require to answer oracle calls, retrieving and sending info through it as necessary.
  • As a consequence, the infamous SimulatorOracle is dead. It's replacement is called PXEDataProvider, implementing the ExecutionDataProvider interface the simulator oracles need to do their thing. This one just happens to be PXE's implementation, which receives PXE's db, the node and a bunch of other things in order to work.
  • Speaking of the AztecNode, it's NO LONGER PROVIDED to the simulator oracles. All the data oracles require must be provided via the ExecutionDataProvider, which forces this interface to implement part of the node (but I think it's cleaner like this)

@Thunkar Thunkar self-assigned this Mar 3, 2025
Copy link
Contributor

@benesjan benesjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely improvement. Feel free to merge once you address my comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants