-
Notifications
You must be signed in to change notification settings - Fork 65
test(blockifier): refactor account_transaction_test #3250
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): refactor account_transaction_test #3250
Conversation
|
Artifacts upload workflows: |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
1e46d10 to
5881e4d
Compare
dorimedini-starkware
left a comment
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 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @TzahiTaub)
crates/blockifier/src/transaction/account_transactions_test.rs line 1652 at r1 (raw file):
let chain_info = &block_context.chain_info; let TestInitData { mut state, account_address, contract_address, .. } = create_test_init_data(chain_info, CairoVersion::Cairo1(RunnableCairo1::Casm));
the test contract was previously cairo0. don't we need cairo0 coverage here?
Code quote:
let TestInitData { mut state, account_address, contract_address, .. } =
create_test_init_data(chain_info, CairoVersion::Cairo1(RunnableCairo1::Casm));crates/blockifier/src/transaction/account_transactions_test.rs line 1745 at r1 (raw file):
let chain_info = &block_context.chain_info; let TestInitData { mut state, account_address, contract_address, .. } = create_test_init_data(chain_info, CairoVersion::Cairo1(RunnableCairo1::Casm));
same remark (was cairo0 test contract)
Code quote:
let TestInitData { mut state, account_address, contract_address, .. } =
create_test_init_data(chain_info, CairoVersion::Cairo1(RunnableCairo1::Casm));crates/blockifier/src/transaction/account_transactions_test.rs line 1937 at r1 (raw file):
block_context.versioned_constants.enable_reverts = enable_reverts; let TestInitData { mut state, account_address, contract_address, mut nonce_manager } = create_test_init_data(&block_context.chain_info, cairo_version);
similar comment: I think that even if you are testing a cairo0 contract you would want a cairo1 account for this test
Code quote:
block_context.versioned_constants.enable_reverts = enable_reverts;
let TestInitData { mut state, account_address, contract_address, mut nonce_manager } =
create_test_init_data(&block_context.chain_info, cairo_version);
TzahiTaub
left a comment
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, 3 unresolved discussions (waiting on @dorimedini-starkware and @Yoni-Starkware)
crates/blockifier/src/transaction/account_transactions_test.rs line 1652 at r1 (raw file):
Previously, dorimedini-starkware wrote…
the test contract was previously cairo0. don't we need cairo0 coverage here?
It doesn't seem to. This test doesn't check anything about the test contract; it just makes a trivial call to have some base tx.
crates/blockifier/src/transaction/account_transactions_test.rs line 1745 at r1 (raw file):
Previously, dorimedini-starkware wrote…
same remark (was cairo0 test contract)
Same as above.
crates/blockifier/src/transaction/account_transactions_test.rs line 1937 at r1 (raw file):
Previously, dorimedini-starkware wrote…
similar comment: I think that even if you are testing a cairo0 contract you would want a cairo1 account for this test
This wasn't cairo0, but the account contract was cairo1-casm for the native run, and it will now be native for that run. The address remains the same, it's the same computation for both. This is the TODO @Yoni-Starkware wrote.
dorimedini-starkware
left a comment
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 @TzahiTaub)

No description provided.