Skip to content

feat: merge-train/barretenberg#16928

Merged
ludamad merged 21 commits intonextfrom
merge-train/barretenberg
Sep 11, 2025
Merged

feat: merge-train/barretenberg#16928
ludamad merged 21 commits intonextfrom
merge-train/barretenberg

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Sep 10, 2025

BEGIN_COMMIT_OVERRIDE
fix: Origin Tags edgecase (#16921)
chore: cycle group cleanup #2 (#16876)
chore: civc tidy 3 (#16671)
refactor(bb): optimize batch_mul_with_endomorphism (#16905)
feat: check op queue wires are zero past minicircuit in Translator (#16858)
feat: Add CPU scaling benchmark script for remote execution (#16918)
fix: Add free witness tag to field constructor (#16827)
fix(bb): darwin build (#16957)
END_COMMIT_OVERRIDE

AVM team encountered a problem where some Origin Tags go into the
poseidon hashing with free witness tags. Change logic to ensure that new
tags according to the transcript get assigned before sending the
elements to the hasher.
AztecBot and others added 3 commits September 10, 2025 16:26
Cleanup and minor performance related bugfixes for
`cycle_group::_variable_base_batch_mul_internal()`
- Utilize native hints in stdlib straus lookup table construction where
they were erroneously not being used before
- remove duplicate construction of native straus lookup tables (see PR
comments for more details)
- virtually every instance of `emplace_back` was being used incorrectly
- remove `std::optional` logic associated with broken support for
scalars of different sizes (now protected with an assert)
More ClientIvc cleanup:
- use precomputed VK for hiding kernel rather than recomputing it at
runtime
- don't use structured trace for hiding kernel VK construction in mock
circuit producer
- remove use of non-static `verify()` and `prove_and_verify()` in favor
of static `ClientIvc::verify()`
- remove no longer needed propagation of tail public inputs in hiding
kernel (it no longer has any!)
- simplify `ClientIvc` member variables: remove `honk_vk` and replace
`ProverFoldOutput` instance with a simple `prover_accumulator`
AztecBot and others added 9 commits September 10, 2025 17:11
…16858)

At each step of the merge protocol we chech that the `left_table` is of
appropriate degree to ensure merging the subtable doesn't cause an
overlap. However, as the last subtable is appended so it's the
`right_table`, we don't perform a degree check on it currently. We have
to ensure merging the last subtable doesn't cause the number of UltraOps
does not go over the fixed Translator `MINICIRCUIT_SIZE` and the
cheapest way to do this is by updating the
`TranslatorZeroConstraintRelation` to ensure the op queue wires are also
zero past the `MINICIRCUIT_SIZE`.

On top of that, this PR reviews and document the `skip` conditions for
the relations found in `translator_extra_relations.hpp`

Closes AztecProtocol/barretenberg#1399
Copy link
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 Sep 11, 2025
@AztecBot
Copy link
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 Sep 11, 2025
AztecBot and others added 6 commits September 11, 2025 08:36
## Summary

Adds a new benchmarking script `bench_cpu_scaling_remote.sh` that
measures CPU scaling performance of BB_BENCH entries on remote EC2
instances.

## Features

- **Remote execution**: Uses `benchmark_remote.sh` infrastructure with
proper locking mechanism
- **CPU scaling analysis**: Runs benchmarks with different
`HARDWARE_CONCURRENCY` values (1, 2, 4, 8, etc.)
- **JSON output**: Uses `--bench_out` flag to generate JSON output for
accurate timing extraction
- **Performance metrics**: Calculates speedup and parallel efficiency
for each CPU count
- **Real-time output**: Shows benchmark progress during execution with
`tee` for transparency

## Implementation Details

- Automatically appends `--bench_out` flag to commands to generate JSON
output
- Retrieves JSON files from remote machine after each benchmark run
- Extracts timing data from JSON format for more reliable parsing
- Shows JSON content for debugging when extraction encounters issues

## Usage

```bash
# Set required environment variables
export BB_SSH_KEY='-i /path/to/key.pem'
export BB_SSH_INSTANCE='user@ec2-instance.amazonaws.com'
export BB_SSH_CPP_PATH='/path/to/barretenberg/cpp'

# Run CPU scaling benchmark
./bench_cpu_scaling_remote.sh "ClientIvcProve" "./bb prove --scheme client_ivc --output_path /tmp --ivc_inputs_path ~/input.msgpack" "1,2,4,8"

# Note: --bench_out flag is automatically added to the command
```

## Example Output

```
ClientIVC::prove CPU Scaling Results:
- 1 CPU: 27.96s (baseline)
- 2 CPUs: 15.77s (1.77x speedup, 88.5% efficiency)
- 4 CPUs: 9.23s (3.03x speedup, 75.8% efficiency)
- 8 CPUs: 5.85s (4.78x speedup, 59.8% efficiency)
```
Missed setting free witness in one of constructors before
@ludamad ludamad force-pushed the merge-train/barretenberg branch from 2f937b3 to d38c9ea Compare September 11, 2025 12:43
@ludamad ludamad added this pull request to the merge queue Sep 11, 2025
Merged via the queue into next with commit 486c3c7 Sep 11, 2025
17 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