Skip to content

chore: PXE oracle refactor#12410

Merged
Thunkar merged 12 commits intomasterfrom
gj/pxe_oracle_refactor
Mar 4, 2025
Merged

chore: PXE oracle refactor#12410
Thunkar merged 12 commits intomasterfrom
gj/pxe_oracle_refactor

Conversation

@Thunkar
Copy link
Copy Markdown
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
Copy Markdown
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

@Thunkar Thunkar merged commit 35f8183 into master Mar 4, 2025
6 checks passed
@Thunkar Thunkar deleted the gj/pxe_oracle_refactor branch March 4, 2025 08:23
TomAFrench added a commit that referenced this pull request Mar 4, 2025
* master: (229 commits)
  feat: Sync from noir (#12315)
  fix: Only use debug logging for ENR mismatch (#12439)
  yolo upadate test pattern owners for kind tests
  fix: Don't exit on error when querying secret (#12438)
  fix: consolidate sepoliaETH job condition (#12437)
  chore: add `yq` to `bootstrap.sh check` (#12436)
  fix: ignition-testnet values & bot count (#12433)
  chore(archiver): l2proven number not required (#12424)
  chore: PXE oracle refactor (#12410)
  fix: txes handle sigint and sigterm, use dump fail to see any txe errors (#12427)
  git subrepo push --branch=master noir-projects/aztec-nr
  git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]
  chore: replace relative paths to noir-protocol-circuits
  git subrepo push --branch=master barretenberg
  chore: set enrs and contract addresses in ignition-testnet (#12417)
  chore: reenable public teardown in orchestrator test (#12428)
  feat: add wasm mode for profiler (#12407)
  feat: contract instance/class cache for current tx - ensure that later txs in block cannot wipe out contracts created earlier (#12261)
  chore: pull out formatter changes from sync (#12426)
  chore: calculate available memory for noir-projects/bootstrap.sh memsuspend (#12419)
  ...
}

describe('Simulator oracle', () => {
describe('PXE data provider', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nature is healing

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.

3 participants