Skip to content

fix: upgrade sozo to v1.8.6 for Blake2s CASM class hash support#13

Merged
Slymeofthemonth merged 2 commits intomainfrom
fix/issue-1-casm-hash-mismatch
Mar 4, 2026
Merged

fix: upgrade sozo to v1.8.6 for Blake2s CASM class hash support#13
Slymeofthemonth merged 2 commits intomainfrom
fix/issue-1-casm-hash-mismatch

Conversation

@Slymeofthemonth
Copy link
Owner

@Slymeofthemonth Slymeofthemonth commented Feb 25, 2026

Problem

Sepolia deployment (sozo migrate --profile sepolia) fails with CASM compiled class hash mismatch. The Sierra→CASM compiler in sozo 1.7.1 produces different hashes than Sepolia expects.

Fix

  • Dockerfile.build: Ubuntu 24.04 base with scarb 2.13.1 + sozo 1.8.6 (latest, with updated CASM compiler)
  • scripts/docker-build.sh: Helper script for Docker-based builds
  • .tool-versions: Pins sozo 1.8.6 for asdf

Verified

  • sozo build passes in the new container
  • Migration test pending Sepolia account credentials

Closes #1

Sepolia now uses Blake2s for CASM class hashing (since Starknet 0.13.4).
sozo v1.8.0 used Pedersen hashing, causing CASM compiled class hash
mismatch on deployment. sozo v1.8.4+ (PR dojoengine/dojo#3377) adds
Blake2s support, auto-detecting the correct hash algorithm from the RPC.

Changes:
- .tool-versions: sozo 1.8.0 → 1.8.6
- Dockerfile.build: dojo image v1.8.0 → v1.8.6
- deployment.md: updated toolchain reference

The dojo cairo library dependency stays at v1.8.0 (unchanged API).
scarb/cairo 2.13.1 remain compatible.

Closes #1
The previous Dockerfile referenced ghcr.io/dojoengine/dojo:v1.8.6 which
doesn't exist. This builds from ubuntu:24.04 and installs:
- scarb 2.13.1 (matching dojo v1.8.0 core deps)
- sozo 1.8.6 (latest, with updated Sierra->CASM compiler)
- Rust toolchain for plugin compilation

sozo build verified passing in this container.

Added docker-build.sh helper script.

Refs #1
@Slymeofthemonth Slymeofthemonth merged commit 7747f85 into main Mar 4, 2026
@Slymeofthemonth Slymeofthemonth deleted the fix/issue-1-casm-hash-mismatch branch March 4, 2026 08:18
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.

Sepolia deployment blocked: CASM compiled class hash mismatch

1 participant