Skip to content

feat: merge-train/fairies#23166

Merged
nchamo merged 13 commits into
nextfrom
merge-train/fairies
May 12, 2026
Merged

feat: merge-train/fairies#23166
nchamo merged 13 commits into
nextfrom
merge-train/fairies

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented May 12, 2026

BEGIN_COMMIT_OVERRIDE
fix: dropped tagging indices no longer cause a pxe crash on sync (#23044)
feat: forward-port upstream oxide aztec-nr changes (#23183)
test: add noir tests for get_note_hash_membership_witness (#23190)
fix(aztec-up): explicit exit in CLI acceptance test harness (#23200)
refactor(pxe): batch nullifier sync across scopes (#23129)
ci: revert ci-compat-e2e to AWS access keys (#23212)
END_COMMIT_OVERRIDE

)

Fixes #22949.

We keep track of the range of tagging indices used by a tx as
`(lowestIdx, highestIdx)` - we need this so that future transactions
start from `highest + 1` even if a previous tx has not yet been mined,
avoiding tag duplication. The lowest index is required in case of
transaction reverts: we walk all indices from low to high and test which
ones survived onchain, and that way determine the actual highest index
for a tx.

On sync, we validate that our records for a tx match the indices used in
said tx - this helps detect bugs (like the bug being fixed here). This
check started failing because our `(low, high)` record did not consider
the possibility of logs being squashed - if either `low` or `high` got
squashed then the range would change. Note that we don't care about
indices between low and high being squashed , gaps are ok - we only
really care about the edges.

This PR fixes this by inspecting tx effects to adjust the range prior to
storing the indices in the database. It hints at the need for a tagging
service layer, but that was a bigger change that I didn't want to
introduce here. I added tests for both new functions created, plus an
e2e regression test that checks we've fixed the original issue. I
validated that the test fails without this fix.

---------

Co-authored-by: Nicolas Chamo <nicolas@chamo.com.ar>
Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Copy link
Copy Markdown
Collaborator

@ludamad ludamad left a comment

Choose a reason for hiding this comment

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

🤖 Auto-approved

@AztecBot AztecBot added this pull request to the merge queue May 12, 2026
@AztecBot
Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2026
AztecBot and others added 5 commits May 12, 2026 09:15
Forward port of #22979 (merged into `backport-to-v4-next-staging`) onto
`merge-train/fairies`.

---------

Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AztecBot and others added 3 commits May 12, 2026 14:39
## Summary

- Adds the two missing in-tree Noir tests for
`get_note_hash_membership_witness` in
[noir-projects/aztec-nr/aztec/src/oracle/get_membership_witness.nr](noir-projects/aztec-nr/aztec/src/oracle/get_membership_witness.nr),
matching the existing block-hash witness tests and clearing the
`TODO(F-652)` placeholder.
- The happy-path test reuses the existing
`crate::history::test::create_note()` fixture, recomputes the unique
note hash (siloed + nonce'd, same transformation as
`assert_note_existed_by`), and verifies the witness by reconstructing
the root via `root_from_sibling_path` and comparing it against
`anchor.state.partial.note_hash_tree.root`.
- The error-path test queries a bogus hash and expects the TXE handler's
`not found in the note hash tree at block` error.
- Bumps `history::test` from private to `pub(crate)` so the
`create_note` fixture is reachable from
`oracle::get_membership_witness::test` without exposing it outside the
crate.

Resolves [F-652](https://linear.app/aztec-labs/issue/F-652).

## Test plan

- [x] `nargo test --package noir_aztec
oracle::get_membership_witness::test::` — all 6 tests pass (4 existing +
2 new) against a local TXE on port 14730.
- [x] `nargo check --deny-warnings --package noir_aztec` clean.
## Summary

The Aztec CLI Acceptance Test workflow was timing out at 30 minutes
despite the harness reporting `TEST_RESULT=pass` after ~2.5 min.
Example: [run
25735107748](https://github.com/AztecProtocol/aztec-packages/actions/runs/25735107748/job/75569917180).

## Root cause

`aztec-cli-acceptance-test.ts` spawns `aztec start --local-network` and
registers `process.on('exit', () => proc.kill('SIGTERM'))` to clean it
up. The script then falls off the end of top-level await without calling
`process.exit`. Node therefore waits for the event loop to drain — but
the long-running child keeps it alive, the `'exit'` handler never fires,
and the process hangs until GitHub's 30-minute job timeout cancels it.
The CI cleanup line `Terminate orphan process: pid (4538) (node)`
confirmed the unkilled child.

## Fix

Explicit `process.exit(0)` / `process.exit(1)` after the success and
failure branches. Calling `process.exit` synchronously fires the
`'exit'` handler, which SIGTERMs the child and lets Node terminate.
@vezenovm vezenovm requested a review from charlielye as a code owner May 12, 2026 15:36
@nchamo nchamo enabled auto-merge May 12, 2026 17:54
@nchamo nchamo added this pull request to the merge queue May 12, 2026
Merged via the queue into next with commit 19d29ac May 12, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants