Skip to content

Merged main#9

Open
prkpndy wants to merge 46 commits into
fix/l3from
fix/l3-and-merge-main
Open

Merged main#9
prkpndy wants to merge 46 commits into
fix/l3from
fix/l3-and-merge-main

Conversation

@prkpndy
Copy link
Copy Markdown
Collaborator

@prkpndy prkpndy commented Dec 8, 2025

Short description of what this PR does.


A longer description, include motivation and intent if possible. Detail any caveats or follow-up steps still required.


Consider motivating any new dependencies.


Delete once completed:

  • link any issues closed by this pull-request
  • add all user-facing changes to CHANGELOG.md
  • new dependencies were added to the workspace toml

t00ts and others added 30 commits November 4, 2025 14:12
…le `executing` flag tracking for proposals
CASM hashes are now not unique by Sierra class hash alone, but by the combination
of class hash and block number. This migration updates the database schema to
reflect this change.

CASM class hashes are no longer stored in the `casm_definitions` table, but are
split out to their own `casm_class_hashes` table. In this table (class_hash, block_number)
is a unique key.
This change adds support for migrated compiled classes (effectively
CASM hash updates) to the following parts of our code:

* storage: CASM class hash / definition insertion and lookup
* gateway client: parsing of migrated compiled classes from feeder
  gateway response
* common: core state update data structures
* pathfinder/state: CASM hashes are now updated both in storage and the
  classes Merkle tree
Hash and length calculation should now include migrated compiled
classes.
For JSON-RPC 0.10.0 we have to include migrated compiled classes in the
response.
…s hashes

Migrated CASM class hashes have to be included in the reverse diff
calculation.

The schema change actually makes this query simpler, as we now have a
single table with all the information required: class hash, CASM class
hash and block number.
Our StateReader needs to implement the new method
`get_compiled_class_hash_v2` to support Starknet 0.14.1 execution.

We now use the "default" implementation that is always re-computing the
CASM class hash. Ideally we'll implement some optimization later to
either pre-compute or cache these values.
…-migration

feat: add support for migrated CASM class hashes
…jections

test(consensus): add more failure injection points
Blockifier on Starknet 0.14.1 requires being able to look up Blake2 CASM
class hashes for all CASM hashes that are executed.

Unfortunately, computing these Blake2 hashes on-the-fly is quite
expensive, so we add a pre-computed mapping from class hashes to Blake2
CASM class hashes to the storage layer.

This migration step uses two binary files containing the pre-computed
mappings for a subset of mainnet and Sepolia testnet respectively. These
files were generated using the `recompute_casm_class_hashes` example.
The files contain a mapping of (ClassHash, CasmHash) pairs and are used
to avoid parsing the CASM class definitions and computing the Blake2
CASM class hash for all classes for which we already have the result
for.
kkovaacs and others added 16 commits November 7, 2025 08:05
And store in storage so that during execution we can look up the
pre-computed hash and fall back to computing it only if not present.
This seems to be a pretty common operation during execution, so even
doing a storage lookup could hurt performance.
…re-computation

feat: implement pre-computation of Blake2 CASM class hashes
…timization

refactor(validator): move to single `Executor` architecture
…sactionsfin

fix(validator): handle deferred `TransactionsFin` properly
…posals

fix(validator): executor not required on empty proposals
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