-
Notifications
You must be signed in to change notification settings - Fork 25
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
refactor(blockifier): impl .into() from api executable tx to blockifier AccountTransaction #1868
Conversation
Artifacts upload triggered. View details here |
eba5bdd
to
309672f
Compare
Artifacts upload triggered. View details here |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1868 +/- ##
===========================================
+ Coverage 40.10% 67.66% +27.55%
===========================================
Files 26 102 +76
Lines 1895 13872 +11977
Branches 1895 13872 +11977
===========================================
+ Hits 760 9386 +8626
- Misses 1100 4085 +2985
- Partials 35 401 +366 ☔ 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.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ArniStarkware and @noaov1)
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 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @noaov1)
crates/blockifier/src/test_utils/deploy_account.rs
line 28 at r1 (raw file):
DeployAccountTransaction::new(deploy_account_tx, tx_hash, contract_address); executable_deploy_account_tx.into()
use starknet_api::test_utils::deploy_account::executable_deploy_account_tx
Same for the declare (wow!).
It's not the same for the invoke - add a todo over there...
Suggestion:
let executable_deploy_account_tx =
executable_deploy_account_tx(..);
executable_deploy_account_tx.into()
crates/blockifier/src/test_utils/declare.rs
line 10 at r1 (raw file):
let tx_hash = declare_tx_args.tx_hash; let declare_tx = starknet_api::test_utils::declare::declare_tx(declare_tx_args); let executable_declare = DeclareTransaction::new(declare_tx, tx_hash, class_info).unwrap();
Good job!
Code quote:
let executable_declare = DeclareTransaction::new(declare_tx, tx_hash, class_info).unwrap();
crates/blockifier/src/transaction/account_transaction.rs
line 80 at r1 (raw file):
/// Represents a paid Starknet transaction. #[derive(Clone, Debug, derive_more::From)]
This did not work? Didn't it do what these from
methods did?
Code quote:
, derive_more::From
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 5 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @noaov1)
35360cd
to
5f06479
Compare
309672f
to
339b124
Compare
Artifacts upload triggered. View details 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 5 files reviewed, 2 unresolved discussions (waiting on @ArniStarkware, @meship-starkware, and @noaov1)
crates/blockifier/src/test_utils/declare.rs
line 10 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
Good job!
:)
crates/blockifier/src/test_utils/deploy_account.rs
line 28 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
use starknet_api::test_utils::deploy_account::executable_deploy_account_tx
Same for the declare (wow!).
It's not the same for the invoke - add a todo over there...
Will use the code SUGGESTION in #1688.
What is the change you mean for the invoke?
crates/blockifier/src/transaction/account_transaction.rs
line 80 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
This did not work? Didn't it do what these
from
methods did?
Sorry, works! there is a test that sometimes fails for me after making a change and running for the 1st time- sync_happy_flow(). are you familiar with this perhaps?
339b124
to
80156fa
Compare
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
80156fa
to
9be723e
Compare
Artifacts upload triggered. View details here |
5f06479
to
9df07b4
Compare
9be723e
to
9e1de53
Compare
Artifacts upload triggered. View details here |
9df07b4
to
8f7eddc
Compare
9e1de53
to
28fcaec
Compare
Artifacts upload triggered. View details here |
Previously, avivg-starkware wrote…
Don't know what you are talking about :o |
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 r2.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @noaov1)
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 (commit messages unreviewed), 1 unresolved discussion (waiting on @avivg-starkware and @noaov1)
crates/blockifier/src/test_utils/deploy_account.rs
line 28 at r1 (raw file):
Previously, avivg-starkware wrote…
Will use the code SUGGESTION in #1688.
What is the change you mean for the invoke?
I don't understand.
- Which PR came before which PR?
- I don't see my suggestion implemented here or there.
- This PR is small as it is, and this suggestion is small - you can follow through with my suggestion here and close this subject.
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: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware, @meship-starkware, and @noaov1)
crates/blockifier/src/test_utils/deploy_account.rs
line 28 at r1 (raw file):
Previously, avivg-starkware wrote…
executable_deploy_account_tx
, returns a DeployAccountTransaction that is api executable,
currently here, DeployAccountTransaction is a blockifier struct.
After the PR i mentioned, the DeployAccountTransaction used here, will be the api executable.
Does it answer? am I missing something?
Added a comment
Suggestion: // TODO(AvivG): use starknet_api::test_utils::deploy_account::executable_deploy_account_tx to
// create executable_deploy_account_tx.
let executable_deploy_account_tx =
DeployAccountTransaction::new(deploy_account_tx, tx_hash, contract_address); |
Previously, avivg-starkware wrote…
Yes. |
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 r3, 1 of 1 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), 2 unresolved discussions (waiting on @avivg-starkware and @noaov1)
crates/blockifier/src/test_utils/deploy_account.rs
line 28 at r1 (raw file):
Previously, avivg-starkware wrote…
Added a comment
I still do not understand what you mean, but following through on the to-do list will solve the issue I mentioned.
crates/blockifier/src/test_utils/declare.rs
line 10 at r4 (raw file):
let tx_hash = declare_tx_args.tx_hash; let declare_tx = starknet_api::test_utils::declare::declare_tx(declare_tx_args); let executable_declare = DeclareTransaction::new(declare_tx, tx_hash, class_info).unwrap();
Suggestion:
// TODO(AvivG): use starknet_api::test_utils::declare::executable_declare_tx to
// create executable_declare.
let executable_declare = DeclareTransaction::new(declare_tx, tx_hash, class_info).unwrap();
8f7eddc
to
30c58aa
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 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @noaov1)
30c58aa
to
ca4a66d
Compare
2e700bb
to
0d83419
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @avivg-starkware and the rest of your teammates on Graphite |
Artifacts upload triggered. View details 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 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @noaov1)
0d83419
to
b58a0cf
Compare
ca4a66d
to
44866d0
Compare
…er AccountTransaction
b58a0cf
to
0930b05
Compare
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details 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: all files reviewed, 2 unresolved discussions (waiting on @ArniStarkware and @noaov1)
crates/blockifier/src/test_utils/deploy_account.rs
line 28 at r4 (raw file):
// create executable_deploy_account_tx instead of code above. let executable_deploy_account_tx = DeployAccountTransaction::new(deploy_account_tx, tx_hash, contract_address);
Done.
crates/blockifier/src/test_utils/declare.rs
line 10 at r4 (raw file):
let tx_hash = declare_tx_args.tx_hash; let declare_tx = starknet_api::test_utils::declare::declare_tx(declare_tx_args); let executable_declare = DeclareTransaction::new(declare_tx, tx_hash, class_info).unwrap();
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArniStarkware and @noaov1)
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 r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noaov1)
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 @noaov1)
…tx to account_transaction