Skip to content

blockifier: enable Blake2 contract-address derivation at StarknetVersion 0.14.4#14547

Draft
ron-starkware wants to merge 1 commit into
ron/address-derivation/pluggable-hashfrom
ron/address-derivation/activate-blake-0-14-4
Draft

blockifier: enable Blake2 contract-address derivation at StarknetVersion 0.14.4#14547
ron-starkware wants to merge 1 commit into
ron/address-derivation/pluggable-hashfrom
ron/address-derivation/activate-blake-0-14-4

Conversation

@ron-starkware

@ron-starkware ron-starkware commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Activation: Blake2 contract-address derivation at 0.14.4

Second of two PRs (stacked on #14539). Activates the Pedersen → Blake2 migration, gated purely by the block's Starknet version — no runtime flag, mirroring the 0.14.3 OS-config-hash Blake migration.

Execution / OS

  • blockifier: deploy + deprecated-deploy syscalls select via AddressDerivationHash::for_version(block_info().starknet_version).
  • OS (Cairo): deploy, deprecated-deploy, and deploy-account paths derive with get_contract_address_blake directly; the Pedersen wrapper, the use_blake_address_derivation hint / Ids var, and the OsHintsConfig flag are removed — the post-0.14.4 OS binary is the gate.

Production / consensus derivation sites select via for_version: LATEST at ingestion (gateway, consensus proposal validation, transaction converter), the block's own version at replay (RPC execution, block re-execution). RpcTransaction::calculate_sender_address and the test harnesses track for_version(LATEST).

Regenerated fixtures: OS os_resourcesconstants.cairoprogram_hash (DEPLOY_GAS_COST 162840 → 159540, lower without the wrapper branch), OS-flow fixtures + hint-coverage + fuzz address literals, deploy-syscall gas, stack-trace constructor frames, versioned-constants diff.

Verification: blockifier 965 passed / 0 failed; starknet_os_flow_tests 113 passed / 0 failed (clean run, no UPDATE_EXPECT).

⚠️ Draft / behind the SNIP gate. Landing this is the consensus cutover for any node running the 0.14.4 binary. Hold until the Blake2 preimage is specified (SNIP) and the ecosystem (Juno / Pathfinder / SDKs / L1 program hash) switches at the same block.

🤖 Generated with Claude Code

ron-starkware commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@ron-starkware ron-starkware changed the base branch from ron/address-derivation/version-gate-execution-paths to graphite-base/14547 June 17, 2026 22:30
@ron-starkware ron-starkware force-pushed the ron/address-derivation/activate-blake-0-14-4 branch from af36d9b to 4cde6b1 Compare June 17, 2026 22:30
@ron-starkware ron-starkware force-pushed the ron/address-derivation/activate-blake-0-14-4 branch from 4cde6b1 to c46e984 Compare June 17, 2026 22:47
@ron-starkware ron-starkware changed the base branch from graphite-base/14547 to ron/address-derivation/pluggable-hash June 17, 2026 22:47
@ron-starkware ron-starkware force-pushed the ron/address-derivation/pluggable-hash branch from 543f4a8 to 3e9a800 Compare June 17, 2026 22:51
@ron-starkware ron-starkware force-pushed the ron/address-derivation/activate-blake-0-14-4 branch 2 times, most recently from 37e0999 to d8ccc8d Compare June 17, 2026 23:04
@ron-starkware ron-starkware force-pushed the ron/address-derivation/pluggable-hash branch from 3e9a800 to 8a7f1fc Compare June 17, 2026 23:04
@ron-starkware ron-starkware force-pushed the ron/address-derivation/activate-blake-0-14-4 branch 3 times, most recently from e2e0926 to 15f6c2a Compare June 18, 2026 00:04
…StarknetVersion 0.14.4

Activate the Pedersen->Blake2 contract-address derivation migration, gated
purely by the block's Starknet version (no runtime flag), mirroring the
0.14.3 OS-config-hash Blake migration.

- blockifier: the deploy and deprecated-deploy syscalls select the hash via
  AddressDerivationHash::for_version(block_info().starknet_version).
- OS (Cairo): the deploy syscall, deprecated deploy, and deploy-account
  paths derive the address with get_contract_address_blake directly; the
  Pedersen wrapper, the use_blake_address_derivation hint / Ids var, and the
  OsHintsConfig flag are removed -- the post-0.14.4 OS binary is the gate.
- Production / consensus derivation sites (gateway, consensus proposal
  validation, transaction converter, RPC execution, block re-execution, the
  flow-test harness, RpcTransaction::calculate_sender_address) select via
  for_version: LATEST at ingestion, the block's version at replay.

Regenerate the affected fixtures: OS os_resources -> constants.cairo ->
program_hash (DEPLOY_GAS_COST 147120 -> 159540: Blake2s costs more in-VM than
the Pedersen builtin, raising the deploy syscall ~8%, while the per-calldata
factor drops 4850 -> 1570), the OS program bytecode lengths, the OS-flow
fixtures + hint-coverage + fuzz address literals, the deploy-syscall gas, the
stack-trace constructor frames, the versioned-constants diff, the cende blob
regression fixtures, and the proof-flow fixtures (genesis global root + the
stwo proof).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ron-starkware ron-starkware force-pushed the ron/address-derivation/activate-blake-0-14-4 branch from 15f6c2a to 2948bc5 Compare June 18, 2026 00:13
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.

2 participants