-
Notifications
You must be signed in to change notification settings - Fork 11
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: upgrade papyrus commit to ca83fd42 and blockifier to 0.8.0-dev.1 #393
chore: upgrade papyrus commit to ca83fd42 and blockifier to 0.8.0-dev.1 #393
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 7 files reviewed, 1 unresolved discussion (waiting on @ayeletstarkware, @elintul, and @giladchase)
crates/tests-integration/src/state_reader.rs
line 61 at r1 (raw file):
let account_contract_cairo1 = FeatureContract::AccountWithoutValidations(CairoVersion::Cairo1); let test_contract_cairo1 = FeatureContract::TestContract(CairoVersion::Cairo1); let erc20_cairo1 = FeatureContract::ERC20(CairoVersion::Cairo1);
@ArniStarkware/@Yael-Starkware , can you please approve the change I made in this file?
Code quote:
let erc20_cairo1 = FeatureContract::ERC20(CairoVersion::Cairo1);
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
=======================================
Coverage 83.86% 83.86%
=======================================
Files 35 36 +1
Lines 1667 1717 +50
Branches 1667 1717 +50
=======================================
+ Hits 1398 1440 +42
- Misses 196 204 +8
Partials 73 73 ☔ View full report in Codecov by Sentry. |
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 7 files reviewed, 2 unresolved discussions (waiting on @ayeletstarkware, @elintul, and @giladchase)
a discussion (no related file):
I have bumped both Papyrus and Blockifier versions.
Blockifier: 0.8.0-dev.1
.
Papyrus: ca83fd42
.
The main changes in Mempool are related to the Blockifier code.
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 5 of 7 files at r1.
Reviewable status: 5 of 7 files reviewed, 2 unresolved discussions (waiting on @ayeletstarkware, @elintul, @giladchase, and @MohammadNassar1)
crates/gateway/src/stateful_transaction_validator_test.rs
line 61 at r1 (raw file):
max_amount: VALID_L1_GAS_MAX_AMOUNT, max_price: VALID_L1_GAS_MAX_PRICE_PER_UNIT, balance: num_bigint::BigUint::default(),
This is zero - right?
Please make it explicitly zero.
Code quote:
balance: num_bigint::BigUint::default(),
crates/tests-integration/src/state_reader.rs
line 61 at r1 (raw file):
Previously, MohammadNassar1 (mohammad-starkware) wrote…
@ArniStarkware/@Yael-Starkware , can you please approve the change I made in this file?
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 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @ayeletstarkware, @giladchase, and @MohammadNassar1)
a discussion (no related file):
Previously, MohammadNassar1 (mohammad-starkware) wrote…
I have bumped both Papyrus and Blockifier versions.
Blockifier:0.8.0-dev.1
.
Papyrus:ca83fd42
.The main changes in Mempool are related to the Blockifier code.
Please change the commit message to also include the Blockifier bump (so it's clear in git tree
).
crates/gateway/Cargo.toml
line 21 at r1 (raw file):
cairo-vm.workspace = true hyper.workspace = true num-bigint.workspace = true
If only used in tests, please move to [dev-dependencies]
section.
Code quote:
num-bigint.workspace = true
crates/gateway/src/stateful_transaction_validator_test.rs
line 61 at r1 (raw file):
max_amount: VALID_L1_GAS_MAX_AMOUNT, max_price: VALID_L1_GAS_MAX_PRICE_PER_UNIT, balance: num_bigint::BigUint::default(),
I think the convention is not to use the fuily-qualified name; please make sure?
Code quote:
num_bigint::BigUint
crates/tests-integration/src/state_reader.rs
line 220 at r1 (raw file):
| FeatureContract::FaultyAccount(version) | FeatureContract::TestContract(version) => *version, FeatureContract::ERC20 => CairoVersion::Cairo0,
Looks like the ERC20 was Cairo 0 until now? What's the version we have in the repo.?
Code quote:
FeatureContract::ERC20 => CairoVersion::Cairo0
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, 5 unresolved discussions (waiting on @ayeletstarkware, @elintul, @giladchase, and @MohammadNassar1)
crates/tests-integration/src/state_reader.rs
line 220 at r1 (raw file):
Previously, elintul (Elin) wrote…
Looks like the ERC20 was Cairo 0 until now? What's the version we have in the repo.?
It was, but:
- this specific function is correct (
fn cairo_version(contract: &FeatureContract)
). - The logic indeed changed in this PR - it made it so
prepare_state_diff
used to useFeatureContract::ERC20(CairoVersion::Cairo0)
and now uses:FeatureContract::ERC20(CairoVersion::Cairo1)
.
This is fine from the test's perspective.
This changes the logic of the test (Used to use the Code quote: let erc20 = FeatureContract::ERC20(CairoVersion::Cairo1); |
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, 5 unresolved discussions (waiting on @ayeletstarkware, @giladchase, and @MohammadNassar1)
crates/tests-integration/src/state_reader.rs
line 104 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
This changes the logic of the test (Used to use the
Cairo0
contract).
This is fine by us.
How would it work?
crates/tests-integration/src/state_reader.rs
line 220 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
It was, but:
- this specific function is correct (
fn cairo_version(contract: &FeatureContract)
).- The logic indeed changed in this PR - it made it so
prepare_state_diff
used to useFeatureContract::ERC20(CairoVersion::Cairo0)
and now uses:FeatureContract::ERC20(CairoVersion::Cairo1)
.This is fine from the test's perspective.
Why do we need it? Doesn't it exist in Blockifier?
93e467f
to
7711799
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: 4 of 7 files reviewed, 2 unresolved discussions (waiting on @ArniStarkware, @ayeletstarkware, @elintul, and @giladchase)
a discussion (no related file):
Previously, elintul (Elin) wrote…
Please change the commit message to also include the Blockifier bump (so it's clear in
git tree
).
Done
crates/gateway/src/stateful_transaction_validator_test.rs
line 61 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
This is zero - right?
Please make it explicitly zero.
Done.
crates/tests-integration/src/state_reader.rs
line 61 at r1 (raw file):
Thanks!
crates/tests-integration/src/state_reader.rs
line 104 at r1 (raw file):
Previously, elintul (Elin) wrote…
How would it work?
Changed back to Cairo0
.
crates/tests-integration/src/state_reader.rs
line 220 at r1 (raw file):
Previously, elintul (Elin) wrote…
Why do we need it? Doesn't it exist in Blockifier?
Changed back to Cairo0
.
As discussed - this function can be deleted (This PR allows it). Code quote: // TODO (Yael 19/6/2024): make this function public in Blockifier and remove it from here. |
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: 4 of 7 files reviewed, 2 unresolved discussions (waiting on @ayeletstarkware, @elintul, @giladchase, and @MohammadNassar1)
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: 4 of 7 files reviewed, 1 unresolved discussion (waiting on @ayeletstarkware, @elintul, and @giladchase)
crates/tests-integration/src/state_reader.rs
line 212 at r2 (raw file):
} // TODO (Yael 19/6/2024): make this function public in Blockifier and remove it from here.
As discussed - this function can be deleted (This PR allows it).
Code quote:
// TODO (Yael 19/6/2024): make this function public in Blockifier and remove it from here.
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 r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ayeletstarkware and @giladchase)
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 @ayeletstarkware, @elintul, and @giladchase)
crates/tests-integration/src/state_reader.rs
line 212 at r2 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
As discussed - this function can be deleted (This PR allows it).
Correct.
@Yael-Starkware , can you delete it please?
This change is