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

fix: non state update from pub processor #9634

Merged
merged 6 commits into from
Nov 5, 2024
Merged

Conversation

MirandaWood
Copy link
Contributor

@MirandaWood MirandaWood commented Oct 31, 2024

Minimal repro of issue in public processor, in which state is not updated during simulation, so each tx comes out with the same .startState. This hasn't been caught because all of our testing either does:

  • One tx per block with public calls, so the initial db state is correct
  • Passes the same db to the public processor and the txHandler (see TestContext), so when the handler runs processedTxHandler.addNewTx(processedTx) it actually updates the db of both itself and the public processor

EDIT: Note that failure is visible in prover-client CI tests here


Fix now included in this PR:

  • Update this.db for each processed tx in public_processor (this is eventually queried in public_kernel_tail_simulator.ts to get the state reference to use for the kernel tail)
  • Ensure that if a txHandler is supplied, its db is independent of the public processor's

This comment was marked as outdated.

This comment was marked as outdated.

1 similar comment

This comment was marked as outdated.

This comment was marked as outdated.

@MirandaWood MirandaWood changed the title feat: minimal repro of non state update from pub processor fix: non state update from pub processor Nov 1, 2024

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@MirandaWood MirandaWood merged commit 0d1e238 into master Nov 5, 2024
66 checks passed
@MirandaWood MirandaWood deleted the mw/pub-processor-err branch November 5, 2024 14:55
Maddiaa0 pushed a commit that referenced this pull request Nov 6, 2024
Minimal repro of issue in public processor, in which state is not
updated during simulation, so each tx comes out with the same
`.startState`. This hasn't been caught because all of our testing either
does:

- One tx per block with public calls, so the initial db state is correct
- Passes the *same db* to the public processor and the txHandler (see
`TestContext`), so when the handler runs
processedTxHandler.addNewTx(processedTx) it actually updates the db of
both itself and the public processor

EDIT: Note that failure is visible in `prover-client` CI tests
[here](https://github.com/AztecProtocol/aztec-packages/actions/runs/11618042996/job/32356873092#step:5:788)

---

Fix now included in this PR:

- Update `this.db` for each processed tx in `public_processor` (this is
eventually queried in `public_kernel_tail_simulator.ts` to get the state
reference to use for the kernel tail)
- Ensure that if a `txHandler` is supplied, its db is independent of the
public processor's
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