From b648a6b417774560be3b211521c427c50d5ddaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Tue, 3 Mar 2026 02:02:15 +0000 Subject: [PATCH] fix: update MAX_EVENT_SERIALIZATION_LENGTH and re-enable TXE tests in CI (#21020) ## Summary Two fixes: ### 1. Fix `MAX_EVENT_SERIALIZATION_LENGTH` mismatch (fixes backport CI failure) https://github.com/AztecProtocol/aztec-packages/pull/20840 changed `MAX_EVENT_LEN` from 12 to 10 in `yarn-project/txe/src/rpc_translator.ts` but forgot to update the corresponding Noir constant `MAX_EVENT_SERIALIZATION_LENGTH` in `txe_oracles.nr`. This caused the TXE oracle to return `10 * 5 = 50` fields while the Noir oracle declaration expected `12 * 5 = 60` fields, crashing the `emit_and_discover_event` test. ### 2. Re-enable TXE-dependent noir tests in CI Since Feb 24, all TXE-dependent noir tests (`noir-projects-txe-tests`) have been silently disabled in CI. The `build_and_test` function in `bootstrap.sh` has a guard `if [ -z "${1:-}" ]` that only runs TXE tests when no argument is passed, but CI always calls `build_and_test fast` or `build_and_test full`. This means the TXE tests only ran in local dev (no args) but never in CI. This fix removes the conditional so TXE tests run in all CI modes (ci-fast, ci-full, ci-full-no-test-cache). [ClaudeBox log](http://ci.aztec-labs.com/7a1d8c5993720a62-5) --- bootstrap.sh | 8 +++----- .../aztec-nr/aztec/src/test/helpers/txe_oracles.nr | 2 +- .../contracts/invalid_note/expected_error | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 86c64db5f0ac..db6d2383f7a8 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -307,11 +307,9 @@ function build_and_test { if [ "$finished" == "$make_pid" ]; then make_pid= - if [ -z "${1:-}" ]; then - # TODO: Handle this better to they can be run as part of the Makefile dependency tree. - start_txes - make noir-projects-txe-tests - fi + # TODO: Handle this better so they can be run as part of the Makefile dependency tree. + start_txes + make noir-projects-txe-tests # Signal tests complete, handled by parallel -E STOP. echo STOP >> $test_cmds_file diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr index f9fe915c9c46..f1d61d82e8cc 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr @@ -11,7 +11,7 @@ use crate::protocol::{ }; global MAX_PRIVATE_EVENTS_PER_TXE_QUERY: u32 = 5; -global MAX_EVENT_SERIALIZATION_LENGTH: u32 = 12; +global MAX_EVENT_SERIALIZATION_LENGTH: u32 = 10; pub unconstrained fn deploy( path: str, diff --git a/noir-projects/noir-contracts-comp-failures/contracts/invalid_note/expected_error b/noir-projects/noir-contracts-comp-failures/contracts/invalid_note/expected_error index 94e94af204cf..ee90fdf8adb9 100644 --- a/noir-projects/noir-contracts-comp-failures/contracts/invalid_note/expected_error +++ b/noir-projects/noir-contracts-comp-failures/contracts/invalid_note/expected_error @@ -1 +1 @@ -InvalidNote has a packed length of 10 fields, which exceeds the maximum allowed length of 9 fields +InvalidNote has a packed length of 9 fields, which exceeds the maximum allowed length of 8 fields