Skip to content

feat: merge-train/barretenberg#22300

Merged
AztecBot merged 10 commits intonextfrom
merge-train/barretenberg
Apr 4, 2026
Merged

feat: merge-train/barretenberg#22300
AztecBot merged 10 commits intonextfrom
merge-train/barretenberg

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented Apr 3, 2026

BEGIN_COMMIT_OVERRIDE
chore: upgrade uintx assert to run in release (#22289)
chore: Fix log statement in ECDSA test (#22285)
fix: avoid oob access in RAM / ROM and enable soft-fail (#22301)
fix: restore test execution in ci-barretenberg CI modes (#22303)
fix: minor fixes pt. 5 (#22306)
chore: comment about standard behavior for de bruijn (#22310)
fix: null socket on bb process exit/error in native_socket.ts (#22309)
END_COMMIT_OVERRIDE

ledwards2225 and others added 2 commits April 3, 2026 10:47
Upgrade existing assert to run in release
When testing ECDSA signatures with a random private key, we were logging
the fixed private key. This PR fixes the logging so that we log the
randomly generated private key.
suyash67 and others added 6 commits April 3, 2026 12:38
Fixes minor OOB issue with RAM / ROM: circuit should not crash due to
OOB.
## Summary

PR #22061 switched `ci-barretenberg` and `ci-barretenberg-full` from
calling `bootstrap.sh ci` (which builds AND runs tests via
`parallelize`) to Make targets that only collect test commands into
`/tmp/test_cmds` without ever starting the test engine to execute them.
This meant BB tests silently stopped running on all
`merge-train/barretenberg` PRs.

**Fix**: Revert to calling `bootstrap.sh ci` directly.
- `ci-barretenberg`: Add explicit CRS download before
`barretenberg/cpp/bootstrap.sh ci` (preserving the CRS fix that #22061
was trying to solve)
- `ci-barretenberg-full`: Revert to `barretenberg/bootstrap.sh ci`
(which already downloads CRS via `bootstrap_all`)

## Test plan

- [ ] `ci-barretenberg` label triggers build + test execution (not just
build)
- [ ] `ci-barretenberg-full` label triggers full build + test execution
- [ ] CRS tests pass (the original motivation for #22061)

ClaudeBox log: https://claudebox.work/s/0b1cdb0a4d7a7f5a?run=2
- Reject trailing msgpack data in `PrivateExecutionStepRaw::load` and
`parse_uncompressed`, with red/green tests in `bbapi.test.cpp`
- Add `BB_ASSERT_GTE` guards in `Polynomial::shiftable()` to prevent
unsigned underflow when `size < NUM_ZERO_ROWS`
- Add `BB_ASSERT` in `scale_by_generator` that `generator_size %
num_threads == 0` to prevent silent element skip
- Fix `row_disabling_polynomial.hpp` `evaluate_at_challenge` to take
`std::span<const FF>` instead of by-value `std::vector<FF>` / non-const
`std::span<FF>`
- Pass `msg` to assertions in `evaluate_linear_identity` and
`evaluate_polynomial_identity` constant paths
- Early return in `field_t::invert()` for constant inputs to avoid
fragile null context dereference
When the bb helper process crashes, the socket was destroyed but not
nulled. This meant subsequent calls to call() would pass the null
check and attempt to write to a destroyed socket. While existing
error handlers would eventually reject the callbacks, nulling the
socket reference makes the guard clause catch dead sockets immediately.
@ludamad ludamad requested a review from charlielye as a code owner April 3, 2026 21:08
ludamad and others added 2 commits April 3, 2026 17:09
## Summary
Defensive hardening of the native socket backend used by
`ChonkBatchVerifier`.

When the bb helper process crashes (e.g. SIGABRT), the socket was
destroyed but the reference was not nulled. This meant subsequent calls
to `call()` would pass the `if (!this.socket)` guard and attempt to
write to a destroyed socket. While the existing socket error/end
handlers would eventually reject callbacks via async error events,
nulling the socket makes the guard clause reject immediately — fail-fast
rather than relying on async error propagation.

Changes:
- Null `this.socket` after `destroy()` in process `error` handler
- Null `this.socket` after `destroy()` in process `exit` handler
- Null `this.socket` after `destroy()` in `cleanup()` method

## Test plan
- Existing unit tests should pass — this is a defensive null assignment,
no behavior change for healthy paths
- On process crash, calls to `call()` now throw `Socket not connected`
immediately instead of writing to a destroyed socket and waiting for the
async error event

ClaudeBox log: https://claudebox.work/s/1164aa0ab601318b?run=5
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 Apr 4, 2026
Any commits made after this event will not be merged.
@AztecBot
Copy link
Copy Markdown
Collaborator Author

AztecBot commented Apr 4, 2026

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

Merged via the queue into next with commit 61b6bdf Apr 4, 2026
22 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.

6 participants