-
Notifications
You must be signed in to change notification settings - Fork 28
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
test(blockifier): revert storgae changes #2913
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware and @Yoni-Starkware)
crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs
line 213 at r1 (raw file):
for call in outer_call.iter() { assert_eq!(call.tracked_resource, TrackedResource::SierraGas); }
what is this for...?
also, just because sierra gas is tracked, doesn't mean native is running
Code quote:
// Check that the tracked resource is SierraGas to make sure that Native is running.
for call in outer_call.iter() {
assert_eq!(call.tracked_resource, TrackedResource::SierraGas);
}
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: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)
crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs
line 213 at r1 (raw file):
Previously, dorimedini-starkware wrote…
what is this for...?
also, just because sierra gas is tracked, doesn't mean native is running
Yeah that's my code. Currently Native is transparent, but it should run (given the test case) only when all calls are of SierraGas mode.
That's the best we can do right now. We should probably add some flag somewhere, for sanity. Out of scope.
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: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)
a33c06c
to
722577e
Compare
6e3a0df
to
03bfc2e
Compare
722577e
to
4dd8747
Compare
03bfc2e
to
bb0eb44
Compare
4dd8747
to
1658f7a
Compare
bb0eb44
to
3d60026
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 all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)
a discussion (no related file):
blocking until I'm sure the base branch is correct
1658f7a
to
7cf7409
Compare
3d60026
to
74e6d30
Compare
aa6067b
to
52633ad
Compare
74e6d30
to
3f85af2
Compare
3f85af2
to
1a20961
Compare
52633ad
to
7002777
Compare
1a20961
to
ab6bb29
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: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)
ab6bb29
to
77b510c
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 2 of 2 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-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 4 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @AvivYossef-starkware)
crates/blockifier/feature_contracts/cairo1/test_contract.cairo
line 119 at r3 (raw file):
/// The function performs the following: /// 1. Calls `write_10_to_my_storage_var` to set the storage variable to 10. /// 2. Calls `test_revert_helper` with `to_panic` = true`.
Suggestion:
`to_panic=true`.
crates/blockifier/feature_contracts/cairo1/test_contract.cairo
line 121 at r3 (raw file):
/// 2. Calls `test_revert_helper` with `to_panic` = true`. /// - `test_revert_helper` is expected to change the storage variable to 17 and then panic. /// 3. Verifies that the `test_revert_helper`` changes are reverted,
Suggestion:
// 3. Verifies that the `test_revert_helper` changes are reverted,
crates/blockifier/feature_contracts/cairo1/test_contract.cairo
line 127 at r3 (raw file):
ref self: ContractState, contract_address: ContractAddress, class_hash: ClassHash,
Please rename other relevant functions to make it clear
Suggestion:
replacement_class_hash
crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs
line 174 at r3 (raw file):
let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1), (empty_contract, 0)]); // Call data of contract A
Suggestion:
// Calldata of contract A.
crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs
line 179 at r3 (raw file):
FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Casm)) .get_instance_address(0) .into(),
Please fix other places
Suggestion:
test_contract.get_instance_address(0).into(),
77b510c
to
34867c5
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: 1 of 4 files reviewed, 5 unresolved discussions (waiting on @dorimedini-starkware and @Yoni-Starkware)
crates/blockifier/feature_contracts/cairo1/test_contract.cairo
line 127 at r3 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Please rename other relevant functions to make it clear
Done.
crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs
line 179 at r3 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Please fix other places
in different PR
crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs
line 174 at r3 (raw file):
let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1), (empty_contract, 0)]); // Call data of contract A
Done.
crates/blockifier/feature_contracts/cairo1/test_contract.cairo
line 119 at r3 (raw file):
/// The function performs the following: /// 1. Calls `write_10_to_my_storage_var` to set the storage variable to 10. /// 2. Calls `test_revert_helper` with `to_panic` = true`.
Done.
crates/blockifier/feature_contracts/cairo1/test_contract.cairo
line 121 at r3 (raw file):
/// 2. Calls `test_revert_helper` with `to_panic` = true`. /// - `test_revert_helper` is expected to change the storage variable to 17 and then panic. /// 3. Verifies that the `test_revert_helper`` changes are reverted,
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 3 of 3 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-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 3 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)
No description provided.