Skip to content

chore: upgrade Cairo 2.16.1, Foundry 0.57.0, bump garaga to 1.1.0#512

Merged
feltroidprime merged 11 commits intomainfrom
update-cairo-auto
Mar 18, 2026
Merged

chore: upgrade Cairo 2.16.1, Foundry 0.57.0, bump garaga to 1.1.0#512
feltroidprime merged 11 commits intomainfrom
update-cairo-auto

Conversation

@feltroidprime
Copy link
Copy Markdown
Collaborator

@feltroidprime feltroidprime commented Mar 18, 2026

Summary

  • Upgrade Cairo/Scarb from 2.14.0 to 2.16.1
  • Upgrade Starknet Foundry from 0.53.0 to 0.57.0
  • Bump garaga version from 1.0.1 to 1.1.0
  • Regenerate all autogenerated contracts and update documentation

Known issue

  • Cairo Workflow (fork tests): The new Cairo 2.16.1 compiler produces a different ECIP class hash (0x0396d5...) which hasn't been declared on Sepolia yet. Fork tests will pass once the new ECIP contract is declared on-chain. This is an infrastructure issue, not a code bug.

Test plan

  • Rust tests pass (cargo test -p garaga_rs)
  • Hydra tests pass
  • Devnet tests pass
  • WASM build + integration tests pass
  • Shellcheck passes
  • Cairo fork tests (blocked on ECIP class hash declaration on Sepolia)

🤖 Generated with Claude Code

feltroidprime and others added 2 commits March 18, 2026 09:32
Automates the mechanical steps of upgrading Cairo/Scarb versions across
all config files, CI workflows, docs, and contract directories.
Leverages `make rewrite` for autogenerated contracts.

Also fix TypeScript constant generator to use `new Uint8Array([...])`
instead of the deprecated `Buffer.from()` pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…0 → 0.57.0

Update all version references across config files, CI workflows, documentation,
.tool-versions, and Scarb.toml manifests. Fix Cairo 2.16.x breaking change
requiring explicit generic type parameters on const declarations by updating
Python generators to emit Groth16VerifyingKey<T> and G2Line<T> with the
appropriate field type (u288 for BN254, u384 for BLS12_381).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feltroidprime and others added 6 commits March 18, 2026 09:59
…ting

The new Cairo compiler produces a different Sierra class hash for the
universal_ecip contract. Update the hardcoded hash and regenerate all
autogenerated contracts. Also fix black formatting on generator files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pre-commit used black 25.1.0 while CI uses 26.1.0 from requirements.txt,
causing formatting differences. Also add --target-version py310 since CI
runs black on Python 3.10/3.12 which formats f-strings differently than
the local Python 3.14.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update RISC_ZERO_VERIFIER_CLASS_HASH in fibonacci_sequencer to match
the new Sierra class hash from Cairo 2.16.1. Also add missing steps
to the /upgrade-cairo command: ECIP hash update, compilation fix
guidance, and black formatting check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add SHELL=bash and venv activation to makefile targets that need Python
- Fix sed -i for macOS in update_risc0_class_hash.sh (BSD vs GNU sed)
- Fix date +%s.%N in rewrite.sh (not supported on macOS)
- Update upgrade-cairo command with risc0 class hash step

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Flatten profile-test nested if/else using JOBS default
- Remove redundant scarb build from update_risc0_class_hash.sh (sncast
  triggers it)
- Use portable sed -i.bak pattern instead of OS detection branch
- Simplify rewrite.sh: remove redundant set -e/error handlers (set -e
  at top handles it), inline run_generators_with_tests
- Use sncast for ECIP class hash in upgrade-cairo docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace raw PYTHONPATH/python commands with `make constants` and
remove manual venv activation note (makefile handles it).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update version across all constants files (Python/Rust/TS), configs
(pyproject.toml, Cargo.toml, package.json, Scarb.toml), documentation
(12+ gitbook pages), and regenerated autogenerated contracts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@feltroidprime feltroidprime changed the title chore: upgrade Cairo/Scarb 2.16.1 and Starknet Foundry 0.57.0 chore: upgrade Cairo 2.16.1, Foundry 0.57.0, bump garaga to 1.1.0 Mar 18, 2026
@feltroidprime feltroidprime merged commit f8840c4 into main Mar 18, 2026
23 checks passed
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.

1 participant