Skip to content
This repository has been 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

Closed
FabijanC opened this issue Jul 7, 2023 · 0 comments · Fixed by #819
Closed

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

FabijanC opened this issue Jul 7, 2023 · 0 comments · Fixed by #819
Assignees
Milestone

Comments

@FabijanC
Copy link

FabijanC commented Jul 7, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants