Skip to content

fix: non state update from pub processor#9634

Merged
MirandaWood merged 6 commits intomasterfrom
mw/pub-processor-err
Nov 5, 2024
Merged

fix: non state update from pub processor#9634
MirandaWood merged 6 commits intomasterfrom
mw/pub-processor-err

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

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

1 similar comment
@github-actions

This comment was marked as outdated.

@github-actions

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
@MirandaWood MirandaWood requested a review from dbanks12 November 4, 2024 10:47
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@MirandaWood MirandaWood merged commit 0d1e238 into master Nov 5, 2024
@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