Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Compiling Sierra to Casm in Declare V2 and checking the hash #791

@FabijanC

Description

@FabijanC

In Declare v2 (Cairo 1 declaration), whose responsibility should it be to compile the received Sierra to Casm? I'm under the strong impression that it should not be done on the Starknet level. E.g. that's what Devnet's been doing: it receives the Sierra, compiles to Casm, and checks that the received Casm hash from the transaction matches the hash of the freshly compiled Casm. I see that starknet_in_rust doesn't do this check:

pub(crate) fn compile_and_store_casm_class<S: State + StateReader>(

So maybe the compilation to Casm shouldn't even be done in starknet_in_rust.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions