v1.0.0-rc2
Pre-release-
cairo1-run
CLI: Allow loading arguments from file#1739 -
BREAKING: Remove unused
CairoRunner
fieldoriginal_steps
#1742 -
feat: Add
--run_from_cairo_pie
tocairo-vm-cli
+ workflow #1730 -
Serialize directly into writer in
CairoPie::write_zip_file
#1736 -
feat: Add support for cairo1 run with segements arena validation.
- Refactored the runner CASM code generation to user a more high level builder.
- Added segment merging of the dictionary segments.
- Added validation of the generated segment arena in cairo1 run.
-
refactor: Add
lib.rs
to cairo1-run#1714 -
feat: Implement
CairoPie::read_zip_file
#1729 -
feat: Bump to 2.6.3 + Remove gas checks#1709
- Bump cairo_lang crates & corelib to v2.6.3
- Disable gas checks when compiling to sierra & casm
- Add
Known bugs & issues
segment to README, poining out issues derived from the removal of gas checks and cairo v2.6.3
-
feat: Implement running from
CairoPie
#1720- Add function
cairo_run_pie
- Add
CairoPie
methodsrun_validity_checks
&check_pie_compatibility
- Add
Program
methodfrom_stripped_program
- Add function
-
bugfix: Don't assume outer deref when fetching integer values from references#1732
-
feat: Implement
extend_additional_data
forBuiltinRunner
#1726 -
BREAKING: Set dynamic params as null by default on air public input #1716
PublicInput
fieldlayout_params
renamed todynamic_params
& type changed from&'a CairoLayout
to()
.
-
feat:
cairo1-run
accepts Sierra programs #1719 -
refactor(BREAKING): Use
BuiltinName
enum instead of string representation #1722BuiltinName
moved fromcrate::serde::deserialize_program
module tocrate::types::builtin_name
.- Implement
BuiltinName
methodsto_str
,to_str_with_suffix
,from_str
&from_str_with_suffix
.
- Implement
- Remove
BuiltinName
methodname
. - All builtin-related error variants now store
BuiltinName
instead of&'static str
orString
. - Remove constants:
OUTPUT_BUILTIN_NAME
,HASH_BUILTIN_NAME
,RANGE_CHECK_BUILTIN_NAME
,RANGE_CHECK_96_BUILTIN_NAME
,SIGNATURE_BUILTIN_NAME
,BITWISE_BUILTIN_NAME
,EC_OP_BUILTIN_NAME
,KECCAK_BUILTIN_NAME
,POSEIDON_BUILTIN_NAME
,SEGMENT_ARENA_BUILTIN_NAME
,ADD_MOD_BUILTIN_NAME
&
MUL_MOD_BUILTIN_NAME
. - Remove
BuiltinRunner
&ModBuiltinRunner
methodidentifier
- Structs containing string representation of builtin names now use
BuiltinName
instead:AirPrivateInput(pub HashMap<&'static str, Vec<PrivateInput>>)
->AirPrivateInput(pub HashMap<BuiltinName, Vec<PrivateInput>>)
.CairoPieMetadata
fieldadditional_data
:HashMap<String, BuiltinAdditionalData>,
->CairoPieAdditionalData
withCairoPieAdditionalData(pub HashMap<BuiltinName, BuiltinAdditionalData>)
CairoPieMetadata
fieldbuiltin_segments
:HashMap<String, SegmentInfo>
->HashMap<BuiltinName, SegmentInfo>
.ExecutiobResources
fieldbuiltin_instance_counter
:HashMap<String, usize>
->HashMap<BuiltinName, usize>
- Methods returning string representation of builtin names now use
BuiltinName
instead:BuiltinRunner
,ModBuiltinRunner
&RangeCheckBuiltinRunner
methodname
:&'static str
->BuiltinName
.CairoRunner
methodget_builtin_segment_info_for_pie
:Result<HashMap<String, cairo_pie::SegmentInfo>, RunnerError>
->Result<HashMap<BuiltinName, cairo_pie::SegmentInfo>, RunnerError>
Notes: Serialization of vm outputs that now contain
BuiltinName
&Display
implementation ofBuiltinName
have not been affected by this PR -
feat: Add
recursive_with_poseidon
layout#1724 -
refactor(BREAKING): Use an enum to represent layout name#1715
- Add enum
LayoutName
to represent cairo layout names. CairoRunConfig
,Cairo1RunConfig
&CairoRunner
fieldlayout
type changed fromString
toLayoutName
.CairoLayout
fieldname
type changed fromString
toLayoutName
.
- Add enum
-
fix(BREAKING): Remove unsafe impl of
Add<usize> for &'a Relocatable
#1718 -
fix(BREAKING): Handle triple dereference references#1708
- Replace
ValueAddress
boolean fielddereference
with boolean fieldsouter_dereference
&inner_dereference
- Replace
HintReference
boolean fielddereference
with boolean fieldsouter_dereference
&inner_dereference
- Reference parsing now handles the case of dereferences inside the cast. Aka references of type
cast([A + B], type)
such ascast([[fp + 2] + 2], felt)
.
- Replace
-
Bump
starknet-types-core
version + Use the lib's pedersen hash #1692 -
refactor: Remove unused code & use constants whenever possible for builtin instance definitions#1707
-
feat: missing EC hints for Starknet OS 0.13.1 #1706
-
fix(BREAKING): Use program builtins in
initialize_main_entrypoint
&read_return_values
#1703initialize_main_entrypoint
now iterates over the program builtins when building the stack & inserts 0 for any missing builtinread_return_values
now only computes the final stack of the builtins in the program- BREAKING:
read_return_values
now takes a boolean argumentallow_missing_builtins
- Added method
BuiltinRunner::identifier
to get theBuiltinName
of each builtin - BREAKING:
OutputBuiltinRunner::get_public_memory
now takes a reference toMemorySegmentManager
- BREAKING: method
VirtualMachine::get_memory_segment_addresses
moved toCairoRunner::get_memory_segment_addresses
-
feat(BREAKING): Add range_check96 builtin#1698
- Add the new
range_check96
builtin to theall_cairo
layout. RangeCheckBuiltinRunner
changes:- Remove field
n_parts
, replacing it with const genericN_PARTS
. - Remome
n_parts
argument form methodnew
. - Remove field
_bound
, replacing it with public methodbound
. - Add public methods
name
&n_parts
.
- Remove field
- Add the new
-
feat(BREAKING): Add mod builtin #1673
Main Changes:
- Add the new
ModBuiltinRunner
, implementing the builtinsadd_mod
&mul_mod
- Adds
add_mod
&mul_mod
to theall_cairo
&dynamic
layouts under themod_builtin
feature flag. This will be added to the main code in a future update. - Add method
VirtualMachine::fill_memory
in order to perform the new builtin's main logic from within hints - Add hints to run arithmetic circuits using
add_mod
and/ormul_mod
builtins
Other Changes:
- BREAKING: BuiltinRunner method signature change from
air_private_input(&self, memory: &Memory) -> Vec<PrivateInput>
topub fn air_private_input(&self, segments: &MemorySegmentManager) -> Vec<PrivateInput>
- Add
MayleRelocatable::sub_usize
- Implement
Add<u32> for Relocatable
- Add
Memory::get_usize
- BREAKING: Clean up unused/duplicated code from builtins module:
- Remove unused method
get_memory_segment_addresses
from all builtin runners & the enum - Remove empty implementations of
deduce_memory_cell
&add_validation_rules
from all builtin runners - Remove duplicated implementation of
final_stack
from all builtin runners except output and move it to the enum implementation
- Remove unused method
- Add the new
-
bugfix(BREAKING): Handle off2 immediate case in
get_integer_from_reference
#1701get_integer_from_reference
&get_integer_from_var_name
output changed fromResult<Cow<'a, Felt252>, HintError>
toResult<Felt252, HintError>
-
feat: Reorganized builtins to be in the top of stack at the end of a run (Cairo1).
-
BREAKING: Remove
CairoRunner::add_additional_hash_builtin
&VirtualMachine::disable_trace
#1658 -
feat: output builtin add_attribute method #1691
-
feat: add a method to retrieve the output builtin from the VM #1690
-
feat: Add zero segment #1668
-
feat: Bump cairo_lang to 0.13.1 in testing env #1687
-
feat(BREAKING): Use return type info from sierra when serializing return values in cairo1-run crate #1665
- Removed public function
serialize_output
. - Add field
serialize_output
toCairo1RunConfig
. - Function
cairo_run_program
now returns an extraOption<String>
value with the serialized output ifserialize_output
is enabled in the config. - Output serialization improved as it now uses the sierra program data to identify return value's types.
- Removed public function
-
feat: Create hyper_threading crate to benchmark the
cairo-vm
in a hyper-threaded environment #1679 -
feat: add a
--tracer
option which hosts a web server that shows the line by line execution of cairo code along with memory registers #1265 -
feat: Fix error handling in
initialize_state
#1657 -
feat: Make air public inputs deserializable #1657
-
feat: Show only layout builtins in air private input #1651
-
feat: Sort builtin segment info upon serialization for Cairo PIE #1654
-
feat: Fix output serialization for cairo 1 #1645
- Reverts changes added by #1630
- Extends the serialization of Arrays added by the
print_output
flag to Spans and Dictionaries - Now dereferences references upon serialization
-
feat: Add flag to append return values to output segment when not running in proof_mode #1646
- Adds the flag
append_return_values
to both the CLI andCairo1RunConfig
struct. - Enabling flag will add the output builtin and the necessary instructions to append the return values to the output builtin's memory segment.
- Adds the flag
-
feat: Compute program hash chain #1647
-
feat: Add cairo1-run output pretty-printing for felts, arrays/spans and dicts #1630
-
feat: output builtin features for bootloader support #1580