Skip to content

Conversation

@ledwards2225
Copy link
Contributor

@ledwards2225 ledwards2225 commented Jan 30, 2026

Makes OriginTag checking more stringent in the following sense:

  • Previous check: values from different rounds are combined using any challenge
  • Updated check: values from different rounds are combined using a challenge whose round provenance is at least the max of the submitted value round provenances

This has many false positives since we safely break this pattern when values are otherwise constrained by the protocol itself (the canonical example being evaluations of already committed polynomials). These cases are handled by explicitly updating the values in question with the tag of the challenge that binds them (e.g. the evaluation challenge in the aforementioned poly eval case).

Note: Also adds a standalone suite for basic OriginTag functionality and separates OriginTag testing for stdlib primitives into standalone tests in their respective suites.

@ledwards2225 ledwards2225 marked this pull request as ready for review January 30, 2026 18:33
@ledwards2225 ledwards2225 removed the request for review from nishatkoti February 9, 2026 20:16
Copy link
Contributor

@Rumata888 Rumata888 left a comment

Choose a reason for hiding this comment

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

Looks good

johnathan79717 and others added 9 commits February 11, 2026 14:05
## Summary

Replaces macOS runners with Linux-based iOS cross-compilation using Zig,
unifying the release flow.

### Approach

Zig can target iOS but doesn't bundle C stdlib headers for iOS. The fix:
- Use **Zig's own C++ headers** (bundled libc++) — they work fine
- Add **iOS SDK C headers** (`-isystem
.../iPhoneOS26.2.sdk/usr/include`) for missing C types (`ldiv_t`, etc.)
- Set `CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY` to skip CMake's
link test (we only build static libs, never link executables)
- Download iOS SDK via sparse git clone from
[iOS-SDKs](https://github.com/xybp888/iOS-SDKs)

No extra toolchains needed — just Zig + iOS SDK headers.

### Changes

- **CMakePresets.json**: New `zig-arm64-ios` and `zig-arm64-ios-sim`
presets
- **scripts/download-ios-sdk.sh**: Downloads iOS SDK headers via sparse
clone
- **bootstrap.sh**: `build_ios` integrated into release parallel builds
and CI_FULL validation (same infrastructure as macOS cross-compile)
- **.gitignore**: Exclude `ios-sdk/` directory
- **Removed**: `ios.toolchain.cmake` (1,135-line Xcode toolchain no
longer needed)
- **Removed**: Standalone `build-bb-ios` CI job from `ci3.yml` — iOS
builds now run through `bootstrap.sh` on custom EC2 runners that already
have Zig installed
- **Removed**: `publish-bb-mac.yml` workflow (no longer need macOS
runners)

### Tested locally

- `cmake --preset zig-arm64-ios` — configures successfully
- `cmake --build --target bb-external` — all 200 targets compile
- `cargo build --target aarch64-apple-ios --features ffi` —
barretenberg-rs builds against the static lib
…c libraries (#20167)

## Summary

Adds Android cross-compilation support for barretenberg, using the same
Zig-based approach as iOS.

### Changes

- **CMakePresets.json**: New `zig-arm64-android` and
`zig-x86_64-android` presets using Zig + lightweight Android sysroot
headers (22MB download vs 1.5GB full NDK)
- **download-android-sysroot.sh**: Downloads Android NDK sysroot headers
from
[spacedriveapp/ndk-sysroot](https://github.com/spacedriveapp/ndk-sysroot)
- **bootstrap.sh**: `build_android` integrated into release parallel
builds and CI_FULL validation
- **Source fixes**: `aligned_alloc` (Bionic requires API 28+, we target
24), `getrandom` (use `/dev/urandom`), `::read` name collision

### Test plan

- [x] `cmake --preset zig-arm64-android` configures successfully
- [x] `cmake --build --preset zig-arm64-android --target bb-external` —
200/200 targets
- [x] `cmake --preset zig-x86_64-android` configures successfully
- [x] `cmake --build --preset zig-x86_64-android --target bb-external` —
200/200 targets
- [x] CI release build produces
`barretenberg-static-arm64-android.tar.gz` and
`barretenberg-static-x86_64-android.tar.gz`

---------

Co-authored-by: Claude <noreply@anthropic.com>
Add constraints to ensure that the point-at-infinity flag corresponds to
the (fake) coordinates `(0, 0)`.

---------

Co-authored-by: notnotraju <raju@aztec-labs.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@ledwards2225 ledwards2225 enabled auto-merge (squash) February 12, 2026 17:42
@ledwards2225 ledwards2225 merged commit fab4f4a into merge-train/barretenberg Feb 12, 2026
9 checks passed
@ledwards2225 ledwards2225 deleted the lde/origin-tags-0 branch February 12, 2026 17:52
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.

4 participants