Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GetCompiledCasm endpoint #221

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Add GetCompiledCasm endpoint #221

merged 2 commits into from
Sep 17, 2024

Conversation

ArielElp
Copy link
Collaborator

@ArielElp ArielElp commented Jul 30, 2024

Today, all nodes store the compiled CASM artifacts but do not externalize them. Third parties can use them and save the overhead of compilation, concrete usecases are:

  • Replay startknet via a json-rpc based state reader, without the new endpoint replay time & complexity may be dominated by compilation
  • Running the Starknet OS requires access to compiled CASM (this usecase also requires the bytecode_segment_lengths data, which is not stored ATM on nodes, hence it remains optional on the spec)

In this PR we add a starknet_executables.json section to the API, with a new endpoint to return the compiled CASM. The specification attempts to reflect the json serialization of CasmContractClass, and should agree with the feeder gateway's get_compiled_class_by_class_hash endpoint.


This change is Reviewable

Copy link
Collaborator Author

@ArielElp ArielElp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArielElp)

@ArielElp ArielElp merged commit 7312ac1 into v0.8.0 Sep 17, 2024
@ArielElp ArielElp deleted the get_compiled_class branch September 17, 2024 06:57
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.

1 participant