-
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(starknet_integration_tests): temporary fixes to make the e2e flow test pass #2591
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2591 +/- ##
==========================================
- Coverage 40.10% 34.59% -5.51%
==========================================
Files 26 276 +250
Lines 1895 32180 +30285
Branches 1895 32180 +30285
==========================================
+ Hits 760 11133 +10373
- Misses 1100 20058 +18958
- Partials 35 989 +954 ☔ 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 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dan-starkware, @matan-starkware, and @yair-starkware)
crates/starknet_integration_tests/tests/end_to_end_flow_test.rs
line 42 at r1 (raw file):
const LISTEN_TO_BROADCAST_MESSAGES_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(50);
I think this could be less.
Suggestion:
15
crates/starknet_batcher/src/batcher.rs
line 458 at r1 (raw file):
let as_duration = time_to_deadline.to_std().map_err(|_| BatcherError::TimeToDeadlineError { deadline })?; // TODO(Matan): this is a temporary solution to the timeout issue.
@matan-starkware please ack
Also below
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, 4 unresolved discussions (waiting on @alonh5, @dan-starkware, and @yair-starkware)
crates/starknet_batcher/src/batcher.rs
line 458 at r1 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
@matan-starkware please ack
Also below
I think we more likely want some constant buffer that can be configured. duration - buffer
. Do I understand you want this to be part of the context?
crates/starknet_integration_tests/src/utils.rs
line 94 at r1 (raw file):
// TODO: Need to also add a channel for votes, in addition to the proposals channel. // TODO(Matan, Dan): set reasonable default timeouts.
The defaults are (3s, 1s, 1s). What was the issue with those times? We are aiming for 3s block time decentralized I thought, so we should make sure our tests can handle that, no?
Code quote:
// TODO(Matan, Dan): set reasonable default timeouts.
crates/starknet_integration_tests/src/utils.rs
line 107 at r1 (raw file):
start_height: BlockNumber(1), // TODO(Matan, Dan): Set the right amount consensus_delay: Duration::from_secs(5),
:(
1s wasn't enough in the test? How are we handling startup for the nodes in the test?
Code quote:
consensus_delay: Duration::from_secs(5),
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, 3 unresolved discussions (waiting on @dan-starkware and @yair-starkware)
crates/starknet_batcher/src/batcher.rs
line 458 at r1 (raw file):
Previously, matan-starkware wrote…
I think we more likely want some constant buffer that can be configured.
duration - buffer
. Do I understand you want this to be part of the context?
This is the simplest patch for now, so you and others can run the flow test. Yes, the context should decide how much time to give the batcher so there's enough time to reach a consensus with the block. a time buffer sounds good.
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, 3 unresolved discussions (waiting on @alonh5, @dan-starkware, and @matan-starkware)
crates/starknet_integration_tests/src/utils.rs
line 94 at r1 (raw file):
Previously, matan-starkware wrote…
The defaults are (3s, 1s, 1s). What was the issue with those times? We are aiming for 3s block time decentralized I thought, so we should make sure our tests can handle that, no?
Occasionally there was not enough time to get the whole flow done before the deadline (+ the buffer time added between block building and consensus)
crates/starknet_integration_tests/src/utils.rs
line 107 at r1 (raw file):
Previously, matan-starkware wrote…
:(
1s wasn't enough in the test? How are we handling startup for the nodes in the test?
Also, we start the nodes in sequence to make sure they don't try to get the same ports (should be fixed in the future as well)
crates/starknet_integration_tests/tests/end_to_end_flow_test.rs
line 42 at r1 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
I think this could be less.
I prefer not to deal with sporadic failures. We shouldn't reach the deadline anyway, so I don't think setting a high number here is a problem.
04595ed
to
08adc42
Compare
f1e1800
to
806e951
Compare
08adc42
to
b1ee806
Compare
806e951
to
bff4ffa
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 r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dan-starkware and @matan-starkware)
b1ee806
to
a9e9690
Compare
bff4ffa
to
93da9cd
Compare
a9e9690
to
a4dc64d
Compare
93da9cd
to
901e1ca
Compare
a4dc64d
to
2a55126
Compare
901e1ca
to
89639f9
Compare
89639f9
to
15f96fe
Compare
No description provided.