-
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: add account nonce as input of run_validate and remove validation output #822
refactor: add account nonce as input of run_validate and remove validation output #822
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ArniStarkware and the rest of your teammates on Graphite |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #822 +/- ##
===========================================
- Coverage 74.29% 26.62% -47.67%
===========================================
Files 358 114 -244
Lines 36288 12067 -24221
Branches 36288 12067 -24221
===========================================
- Hits 26960 3213 -23747
- Misses 7190 8618 +1428
+ Partials 2138 236 -1902
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
a52dd31
to
9f74ad3
Compare
5625ed5
to
46125e4
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 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)
crates/gateway/src/gateway.rs
line 169 at r1 (raw file):
let account_nonce = validator.get_nonce(sender_address).map_err(|e| { error!("Failed to get nonce for sender address {}: {}", sender_address, e); GatewaySpecError::UnexpectedError { data: "Internal server error.".to_owned() }
I don't think this should be an internal error.
When does getting the nonce fail?
Code quote:
error!("Failed to get nonce for sender address {}: {}", sender_address, e);
GatewaySpecError::UnexpectedError { data: "Internal server error.".to_owned() }
46125e4
to
df4c10a
Compare
9f74ad3
to
735383b
Compare
df4c10a
to
392d97a
Compare
735383b
to
580522c
Compare
392d97a
to
41a3e0d
Compare
580522c
to
df73a6d
Compare
41a3e0d
to
2bdc640
Compare
df73a6d
to
688ea10
Compare
2bdc640
to
db5fdd1
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: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @yair-starkware)
crates/gateway/src/gateway.rs
line 169 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
I don't think this should be an internal error.
When does getting the nonce fail?
Getting the nonce from the storage fails if the contract address doesn't exist, but in this case, the state reader will return the default value and not an error.
Other failures derive from communication, serde, internal papyrus error, etc, so I think it makes sense to classify it as an internal error.
688ea10
to
e482c6d
Compare
db5fdd1
to
8ab1e32
Compare
e482c6d
to
1e1fbc9
Compare
8ab1e32
to
7921033
Compare
1e1fbc9
to
7e19e82
Compare
7921033
to
2866c29
Compare
Previously, Yael-Starkware (YaelD) wrote…
If I understand @Yael-Starkware correctly, this should indeed be an internal error. No error should be handled differently, and indeed, some internal errors may arise. |
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: 2 of 3 files reviewed, all discussions resolved (waiting on @ArniStarkware)
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, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ArniStarkware)
Merge activity
|
2866c29
to
5060ddd
Compare
This change is