-
Notifications
You must be signed in to change notification settings - Fork 52
chore(starknet_l1_provider): add lazy sync height test #5188
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(starknet_l1_provider): add lazy sync height test #5188
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 2 files at r1, all commit messages.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @alonh5)
d8b1c0e
to
7bb36d5
Compare
4d7b272
to
b5afc16
Compare
7bb36d5
to
254769e
Compare
b5afc16
to
94a87e9
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 2 files at r1, 1 of 2 files at r2, all commit messages.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @alonh5)
crates/starknet_l1_provider/tests/startup_flows.rs
line 209 at r2 (raw file):
#[tokio::test] async fn bootstrap_delayed_sync_state_with_catch_up() {
Not sure I understand the scenario from this name, consider a docstring.
Code quote:
bootstrap_delayed_sync_state_with_catch_up
crates/starknet_l1_provider/tests/startup_flows.rs
line 212 at r2 (raw file):
if !in_ci() { return; }
Remind me, why?
Code quote:
if !in_ci() {
return;
}
crates/starknet_l1_provider/tests/startup_flows.rs
line 213 at r2 (raw file):
return; } configure_tracing().await;
Why manually? :(
Code quote:
configure_tracing().await;
254769e
to
fb390a7
Compare
78ef1bb
to
6b16cca
Compare
fb390a7
to
2117d5b
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, 3 unresolved discussions (waiting on @alonh5 and @elintul)
crates/starknet_l1_provider/tests/startup_flows.rs
line 209 at r2 (raw file):
Previously, elintul (Elin) wrote…
Not sure I understand the scenario from this name, consider a docstring.
Srry, is this better?
crates/starknet_l1_provider/tests/startup_flows.rs
line 212 at r2 (raw file):
Previously, elintul (Elin) wrote…
Remind me, why?
Local users might not have anvil installed.
crates/starknet_l1_provider/tests/startup_flows.rs
line 213 at r2 (raw file):
Previously, elintul (Elin) wrote…
Why manually? :(
Looks like without this i don't get tracing in the test :(
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: all files reviewed, 2 unresolved discussions (waiting on @alonh5)
crates/starknet_l1_provider/tests/startup_flows.rs
line 249 at r3 (raw file):
// **Commit** a few blocks. These should get backlogged since they are post-sync-height. // Sleeps are sprinkled in to give the async task a couple shots at attempting to get the sync
✨❤️
Code quote:
sprinkled
crates/starknet_l1_provider/tests/startup_flows.rs
line 283 at r3 (raw file):
assert_eq!( l1_provider.current_height, sync_height.unchecked_next().unchecked_next().unchecked_next()
A better alternative? :(
Code quote:
sync_height.unchecked_next().unchecked_next().unchecked_next()
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 @alonh5)
crates/starknet_l1_provider/tests/startup_flows.rs
line 283 at r3 (raw file):
Previously, elintul (Elin) wrote…
A better alternative? :(
How about this?
7d2b1be
to
06864d2
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 2 of 2 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @alonh5)
crates/starknet_l1_provider/tests/startup_flows.rs
line 283 at r3 (raw file):
Previously, giladchase wrote…
How about this?
Looks good, thanks!
06864d2
to
ffce343
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:complete! all files reviewed, all discussions resolved (waiting on @alonh5)
Also add util for flushing the fake l1 client: its currently just buffering the calls it gets, and needs a manual flush.
2117d5b
to
08b8bd5
Compare
ffce343
to
1bef7fe
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:complete! all files reviewed, all discussions resolved (waiting on @alonh5)
Also add util for flushing the fake l1 client: its currently just
buffering the calls it gets, and needs a manual flush.