-
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
fix(blockifier_reexecution): bug in get storage at #1698
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @AvivYossef-starkware and the rest of your teammates on Graphite |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1698 +/- ##
==========================================
+ Coverage 40.10% 41.90% +1.79%
==========================================
Files 26 197 +171
Lines 1895 23140 +21245
Branches 1895 23140 +21245
==========================================
+ Hits 760 9696 +8936
- Misses 1100 12988 +11888
- Partials 35 456 +421 ☔ View full report in Codecov by Sentry. |
9ccc5ba
to
50739a6
Compare
c284c62
to
45c1c08
Compare
494a7f0
to
e9b484e
Compare
45c1c08
to
cc6159d
Compare
e9b484e
to
9b4dc89
Compare
ee896e2
to
65e5785
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 r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Ok(Felt::default()) } Err(e) => panic!("Unexpected error in get_storage_at: {:?}", e),
this isn't a bug in rpc state reader?
Code quote:
Ok(value) => Ok(value),
// If the contract address is not found, The blockifier expect to get the default value
// of felt.
Err(e) if e.to_string().contains("Contract address not found for request") => {
Ok(Felt::default())
}
Err(e) => panic!("Unexpected error in get_storage_at: {:?}", e),
9b4dc89
to
a1245bd
Compare
65e5785
to
fc3e25f
Compare
a1245bd
to
63e0d12
Compare
fc3e25f
to
067762c
Compare
63e0d12
to
f61947f
Compare
067762c
to
8d20b7f
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: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @dorimedini-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, dorimedini-starkware wrote…
this isn't a bug in rpc state reader?
My guess is that the gateway group is using papyrus. So they just receive 0 instead of an error when doing this request
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, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, AvivYossef-starkware wrote…
My guess is that the gateway group is using papyrus. So they just receive 0 instead of an error when doing this request
who - other than us - is using the RPC reader, then?
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, 1 unresolved discussion (waiting on @aner-starkware and @dorimedini-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, dorimedini-starkware wrote…
who - other than us - is using the RPC reader, then?
The gateway group
8d20b7f
to
23ebe4a
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 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, AvivYossef-starkware wrote…
The gateway group
no, you said the gateway group is using papyrus state reader. not the rpc reader...
- if the GW group are using the rpc reader, why do they allow the error behavior instead of returning zero like papyrus?
- if they are not using the rpc reader, who is?
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, 1 unresolved discussion (waiting on @aner-starkware and @dorimedini-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, dorimedini-starkware wrote…
no, you said the gateway group is using papyrus state reader. not the rpc reader...
- if the GW group are using the rpc reader, why do they allow the error behavior instead of returning zero like papyrus?
- if they are not using the rpc reader, who is?
The gateway group uses the RPC reader. Papyrus is also an RPC server, so they tested their RPC reader with Papyrus while we use the link to other RPC server
23ebe4a
to
8b1cceb
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, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, AvivYossef-starkware wrote…
The gateway group uses the RPC reader. Papyrus is also an RPC server, so they tested their RPC reader with Papyrus while we use the link to other RPC server
so the remote RPC returns an error where the papyrus reader returns zero?
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, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, dorimedini-starkware wrote…
so the remote RPC returns an error where the papyrus reader returns zero?
the papyrus server does not behave like the RPC server we use?
8b1cceb
to
7c85aac
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: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @dorimedini-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, dorimedini-starkware wrote…
the papyrus server does not behave like the RPC server we use?
That is what I thought at the beginning, but after first looking at the papyrus_rpc crate, I think that the papyrus RPC server returns an Error as well. I have a meeting with Yael tomorrow to understand it
7c85aac
to
9607af3
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 r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, AvivYossef-starkware wrote…
That is what I thought at the beginning, but after first looking at the papyrus_rpc crate, I think that the papyrus RPC server returns an Error as well. I have a meeting with Yael tomorrow to understand it
OK, keeping this blocked for now, because it changes the behavior of the client - I would like to understand why (if) we need it
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, 1 unresolved discussion (waiting on @aner-starkware and @dorimedini-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 59 at r1 (raw file):
Previously, dorimedini-starkware wrote…
OK, keeping this blocked for now, because it changes the behavior of the client - I would like to understand why (if) we need it
It changes the behavior of our wrapper; I didn't touch the gateway`s code
9607af3
to
25ae07d
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 r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
crates/blockifier_reexecution/src/state_reader/test_state_reader.rs
line 75 at r5 (raw file):
Err(e) if e.to_string().contains("Contract address not found for request") => { Ok(Felt::default()) }
Suggestion:
// TODO: Once the RPC state reader bug is fixed (CONTRACT_NOT_FOUND error should cause the
// reader to return the default felt), remove this `match` arm.
Err(e) if e.to_string().contains("Contract address not found for request") => {
Ok(Felt::default())
}
No description provided.