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.
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:
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'sget_compiled_class_by_class_hash
endpoint.This change is