-
Notifications
You must be signed in to change notification settings - Fork 38
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
chore(cairo_native): update cairo native version in rust to 0.3.1 #4160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 8 files reviewed, 1 unresolved discussion (waiting on @avi-starkware and @noaov1)
crates/blockifier/src/execution/syscalls/syscall_tests/builtins_test.rs
line 103 at r1 (raw file):
execution_result.execution.gas_consumed == native_execution_result.execution.gas_consumed ); }
I added this just to make sure that 0.3.1 solved the circuit problem, but if you think it might be useful to have a test that checks that native and casm have the same builtins prices I can add this test with some changes in another PR
Code quote:
#[cfg(feature = "cairo_native")]
#[test]
fn test_circuit() {
let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Casm));
let native_test_contract =
FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Native));
let chain_info = &ChainInfo::create_for_testing();
let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]);
let mut native_state = test_state(chain_info, BALANCE, &[(native_test_contract, 1)]);
let calldata = calldata![];
let entry_point_call = CallEntryPoint {
entry_point_selector: selector_from_name("test_circuit"),
calldata,
..trivial_external_entry_point_new(test_contract)
};
let execution_result = entry_point_call.clone().execute_directly(&mut state).unwrap();
let native_execution_result = entry_point_call.execute_directly(&mut native_state).unwrap();
println!("casm gas consumed: {}", execution_result.execution.gas_consumed);
println!("native gas consumed: {}", native_execution_result.execution.gas_consumed);
assert!(
execution_result.execution.gas_consumed == native_execution_result.execution.gas_consumed
);
}
7fbdda9
to
36c1784
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 8 files reviewed, 1 unresolved discussion (waiting on @avi-starkware and @noaov1)
crates/blockifier/src/execution/syscalls/syscall_tests/builtins_test.rs
line 103 at r1 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
I added this just to make sure that 0.3.1 solved the circuit problem, but if you think it might be useful to have a test that checks that native and casm have the same builtins prices I can add this test with some changes in another PR
talked f2f we don't want this at the moment
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 8 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @noaov1)
36c1784
to
43b4dbf
Compare
43b4dbf
to
86c1e1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @meship-starkware)
crates/starknet_api/src/contract_class.rs
line 34 at r3 (raw file):
} // TODO(Meshi): Share this code with the blockifier crate.
Maybe add this TODO in the blockifier (to use the method defined in starknet api). Starknet api should not be aware to the blockifier.
Code quote:
// TODO(Meshi): Share this code with the blockifier crate.
86c1e1e
to
7836745
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 8 files at r1, 2 of 2 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 8 files at r1.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
No description provided.