-
Notifications
You must be signed in to change notification settings - Fork 26
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(tests_integration): add nonce verification #2071
Conversation
Artifacts upload triggered. View details here |
4aab3a1
to
5f18e2e
Compare
Artifacts upload triggered. View details here |
5f18e2e
to
c4734f6
Compare
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
Benchmark movements: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2071 +/- ##
===========================================
+ Coverage 40.10% 77.36% +37.25%
===========================================
Files 26 385 +359
Lines 1895 40416 +38521
Branches 1895 40416 +38521
===========================================
+ Hits 760 31266 +30506
- Misses 1100 6851 +5751
- Partials 35 2299 +2264 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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 r1, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @Itay-Tsabary-Starkware)
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 69 at r1 (raw file):
fn get_latest_block_number(storage_reader: &StorageReader) -> BlockNumber { let txn = storage_reader.begin_ro_txn().unwrap(); txn.get_state_marker().unwrap().prev().unwrap()
This will panic if no blocks have been written yet, right? Is that what we want?
Same below at get nonce
Code quote:
txn.get_state_marker().unwrap().prev().unwrap()
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 80 at r1 (raw file):
let txn = storage_reader.begin_ro_txn().unwrap(); let state_number = StateNumber::unchecked_right_after_block(block_number); get_nonce_at(&txn, state_number, None.as_ref(), contract_address).unwrap().unwrap()
Suggestion:
&None
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 83 at r1 (raw file):
} /// Sample a storage until sufficiently many blocks have been stored. Returns an error if the after
Suggestion:
if after
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 84 at r1 (raw file):
/// Sample a storage until sufficiently many blocks have been stored. Returns an error if the after /// a certain number of attempts the target block number has not been reached.
Suggestion:
the given
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 85 at r1 (raw file):
/// Sample a storage until sufficiently many blocks have been stored. Returns an error if the after /// a certain number of attempts the target block number has not been reached. async fn await_until_storage_contains_block(
Suggestion:
await_block
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 176 at r1 (raw file):
); info!("Verify tx sender account nonce.");
Suggestion:
info!("Verifying tx sender account nonce.");
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 @alonh5)
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 69 at r1 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
This will panic if no blocks have been written yet, right? Is that what we want?
Same below at get nonce
The setup function that creates the db ensures it is not empty. I prefer not to add error handling here.
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 83 at r1 (raw file):
} /// Sample a storage until sufficiently many blocks have been stored. Returns an error if the after
Done.
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 84 at r1 (raw file):
/// Sample a storage until sufficiently many blocks have been stored. Returns an error if the after /// a certain number of attempts the target block number has not been reached.
Done.
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 85 at r1 (raw file):
/// Sample a storage until sufficiently many blocks have been stored. Returns an error if the after /// a certain number of attempts the target block number has not been reached. async fn await_until_storage_contains_block(
Done.
93c64cc
to
e42c2fb
Compare
c4734f6
to
2c84980
Compare
Artifacts upload triggered. View details here |
2c84980
to
9a5ac14
Compare
Artifacts upload triggered. View details here |
9a5ac14
to
6a62e53
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 3 files reviewed, 5 unresolved discussions (waiting on @alonh5)
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 176 at r1 (raw file):
); info!("Verify tx sender account nonce.");
Done.
Artifacts upload triggered. View details here |
6a62e53
to
924781b
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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 69 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
The setup function that creates the db ensures it is not empty. I prefer not to add error handling here.
No need for error handling. Could you add documentation and also use expect
instead of the respective unwrap
?
924781b
to
7cd33b7
Compare
65c86ce
to
6d9ea3a
Compare
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
7cd33b7
to
c364f8c
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: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @alonh5)
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 69 at r1 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
No need for error handling. Could you add documentation and also use
expect
instead of the respectiveunwrap
?
Changed to expect
s, in both location. IMO thier message suffices as documentation, if you think otherwise please lmk what you'd like to be added 🙏
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 3 files reviewed, 1 unresolved discussion (waiting on @alonh5)
crates/starknet_integration_tests/tests/end_to_end_integration_test.rs
line 69 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Changed to
expect
s, in both location. IMO thier message suffices as documentation, if you think otherwise please lmk what you'd like to be added 🙏
locations
Benchmark movements: full_committer_flow performance regressed! |
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 @Itay-Tsabary-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 r1, 2 of 2 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)
commit-id:82d3fb9c
commit-id:ab21c59b
c364f8c
to
1511a6c
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.
Reviewed 2 of 2 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)
commit-id:ab21c59b
Stack: