Skip to content

chore(bb)!: remove Starknet/Garaga flavors - #25730

Merged
iakovenkos merged 2 commits into
nextfrom
cb/remove-starknet-flavors
Nov 4, 2026
Merged

iakovenkos merged 2 commits into
nextfrom
cb/remove-starknet-flavors

Conversation

@AztecBot

@AztecBot AztecBot commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Barretenberg carries UltraStarknetFlavor, UltraStarknetZKFlavor, a stark252 curve, a Starknet Poseidon and a matching transcript, all behind STARKNET_GARAGA_FLAVORS. Garaga was the only known consumer. Its current Noir docs use --oracle_hash keccak with ultra_keccak_zk_honk, and its maintainers have confirmed they no longer need this code.

Reachability

No preset, script or CMake file defines STARKNET_GARAGA_FLAVORS; every occurrence in the tree is an #ifdef. So the flavors, their template instantiations and their test parameterizations don't compile in any build we produce, and the code goes unexercised by CI.

The guarded code had also bit-rotted. It refers to Transcript_, KeccakTranscriptParams and a single-parameter BaseTranscript. On next, Transcript_ and KeccakTranscriptParams are defined nowhere and BaseTranscript takes two template parameters, so turning the flag on should no longer compile. That comes from reading the source; I didn't try the build.

What changed

  • Deleted barretenberg/cpp/src/barretenberg/ext/ and its CMake wiring. ext_starknet_crypto_poseidon is no longer linked into transcript, stdlib_poseidon2, poseidon2_bench or the barretenberg objects.
  • Removed the #ifdef branches, keeping the non-Starknet side, across flavors, Oink, Ultra prover/verifier, TraceToPolynomials, SmallSubgroupIPA and the test type lists.
  • Restored static_assert(Params::modulus_0 != 1) in field_declarations.hpp. It was commented out only because stark252 violates it, and modulus_minus_two underflows without it.
  • Folded the custom-IV crypto::FieldSponge::hash_internal(input, iv) overload into the single-argument hash_internal. It was added for the Starknet Poseidon, which was its only outside caller. Poseidon2 output doesn't change: the IV is still in_len << 64, converted to FF the same way.
  • Removed OracleHashType and parse_oracle_hash_type from bbapi_shared.hpp. They had no callers, and proof settings dispatch on the oracle_hash_type string.
  • Removed starknet and starknet-no-zk from the CLI, along with the Starknet Garaga Extensions banner line, the bb.js verifierTarget values and the current docs.
  • Dropped Garaga from docs/docs-words.txt, since nothing in that spellcheck's scope uses it, and pointed the Garaga link in barretenberg/docs/docs/index.md at its current URL.

Breaking changes

  • bb: --verifier_target starknet, --verifier_target starknet-no-zk and --oracle_hash starknet now fail at argument parsing. Default builds already failed on these later, with Invalid proof system settings.
  • bb.js: verifierTarget: 'starknet' | 'starknet-no-zk' and the deprecated starknet / starknetZK options are removed from UltraHonkBackendOptions.

Left in place

  • CHANGELOG.md and versioned_docs are historical.
  • barretenberg/docs/docs/index.md still cites Garaga as a third-party verifier implementation, which remains true.
  • starknet stays in the root cspell.json because CHANGELOG.md still contains it and isn't in that file's ignorePaths.

Testing

Run locally on the clang20-no-avm preset with the AVM transpiler disabled:

  • Built bb, ultra_honk_tests, flavor_tests, transcript_tests, crypto_poseidon2_tests, stdlib_poseidon2_tests, bbapi_tests and poseidon2_bench. flavor_tests and poseidon2_bench were built before the follow-up commit and not rebuilt after it.
  • Passed: crypto_poseidon2_tests 12 of 12, stdlib_poseidon2_tests 29 of 29, transcript_tests 69 of 71 with 2 skipped (TranscriptTests/1 and /2.ProverToVerifierConversion).
  • Passed before the follow-up commit: flavor_tests 28 of 28, and a filtered ultra_honk_tests subset of 63 tests (transcript, permutation, one range-constraint flavor, proof length).
  • bbapi_tests has 1 failure, ChonkPinnedIvcInputsTest.AllPinnedFlows, which stops at its assertion that pinned flows exist because the inputs aren't downloaded in this checkout. I didn't read the rest of that run's output, so CI is the real result for this target.
  • bb rejects both starknet spellings, and starknet no longer appears in bb or bb prove --help output.
  • Ran Prettier on backend.ts with the repo's options but without the import-sort plugin, which isn't installed here.

Not run locally: ESLint, the bb.js typecheck, the wasm build and the full test suite. Those are left to CI.


Created by claudebox · group: slackbot · requested by Sergei · Slack thread

@AztecBot AztecBot added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Nov 2, 2026
Fold the custom-IV sponge overload into hash_internal, remove the unused
OracleHashType/parse_oracle_hash_type, fix backend.ts formatting, refresh
the Garaga docs link and drop the stale Garaga dictionary word.
@iakovenkos
iakovenkos marked this pull request as ready for review November 4, 2026 15:30
@iakovenkos
iakovenkos requested review from a team and iakovenkos as code owners November 4, 2026 15:30
@iakovenkos
iakovenkos merged commit b619270 into next Nov 4, 2026
19 checks passed
@iakovenkos
iakovenkos deleted the cb/remove-starknet-flavors branch November 4, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants