-
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
refactor(starknet_batcher): delete the proposal manager #2618
base: main
Are you sure you want to change the base?
refactor(starknet_batcher): delete the proposal manager #2618
Conversation
1eb6f9f
to
8c939e2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 12-10-refactor_starknet_batcher_move_around_some_types_and_utils_to_a_common_utils_file #2618 +/- ##
==========================================================================================================================
- Coverage 6.45% 6.31% -0.14%
==========================================================================================================================
Files 146 145 -1
Lines 17386 17335 -51
Branches 17386 17335 -51
==========================================================================================================================
- Hits 1122 1095 -27
+ Misses 16188 16166 -22
+ Partials 76 74 -2 ☔ View full report in Codecov by Sentry. |
c0673ad
to
1b75381
Compare
1b75381
to
65f45b2
Compare
65f45b2
to
cfc0dcc
Compare
3bc9a7f
to
09f7de9
Compare
cfc0dcc
to
8b33c06
Compare
09f7de9
to
08ae4fc
Compare
9aaf571
to
1582e58
Compare
08ae4fc
to
8a1dcfd
Compare
1582e58
to
b315f6c
Compare
8a1dcfd
to
b3026d5
Compare
b315f6c
to
cdaa5ee
Compare
9e4709d
to
dfa16fa
Compare
89fb62f
to
7b9ca0b
Compare
dfa16fa
to
5fda731
Compare
7b9ca0b
to
35adc06
Compare
5fda731
to
cbee779
Compare
35adc06
to
8c61b02
Compare
8c61b02
to
72ce408
Compare
cbee779
to
127a796
Compare
72ce408
to
e1fdcc8
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 5 files at r2, 1 of 3 files at r3, 4 of 4 files at r4, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @dafnamatsry and @Yael-Starkware)
crates/starknet_batcher/src/proposal_manager.rs
line 0 at r4 (raw file):
Delete files.
crates/starknet_batcher/src/batcher.rs
line 289 at r4 (raw file):
// TODO(dafna): at this point the proposal result must be an error, since it finsisehd // earlier than expected. Consider panicking instead of returning an error. Ok(_) => Err(BatcherError::ProposalAlreadyFinished { proposal_id }),
Okay, let's panic.
Code quote:
// TODO(dafna): at this point the proposal result must be an error, since it finsisehd
// earlier than expected. Consider panicking instead of returning an error.
Ok(_) => Err(BatcherError::ProposalAlreadyFinished { proposal_id }),
crates/starknet_batcher/src/batcher.rs
line 300 at r4 (raw file):
debug!("Send proposal content done for {}", proposal_id); self.validate_tx_streams.remove(&proposal_id);
expect.
Code quote:
self.validate_tx_streams.remove(&proposal_id);
crates/starknet_batcher/src/batcher.rs
line 304 at r4 (raw file):
if let Some(proposal_task) = self.active_proposal_task.take() { proposal_task.join_handle.await.ok(); }
Use await_active_proposal()
.
Code quote:
if let Some(proposal_task) = self.active_proposal_task.take() {
proposal_task.join_handle.await.ok();
}
crates/starknet_batcher/src/batcher.rs
line 422 at r4 (raw file):
let mut active_proposal = self.active_proposal.lock().await; if let Some(active_proposal_id) = *active_proposal { return Err(BatcherError::ServerBusy {
This error name isn't very informative, should we change it? (In a different PR)
Code quote:
ServerBusy
e1fdcc8
to
73d8a51
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, 5 unresolved discussions (waiting on @dafnamatsry and @Yael-Starkware)
73d8a51
to
f8ffd4c
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 6 files reviewed, 5 unresolved discussions (waiting on @alonh5 and @Yael-Starkware)
crates/starknet_batcher/src/batcher.rs
line 289 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Okay, let's panic.
Done.
Note that I deleted a test that simulated this scenario (something that cannot happen for real).
crates/starknet_batcher/src/batcher.rs
line 300 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
expect.
Done.
crates/starknet_batcher/src/batcher.rs
line 304 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Use
await_active_proposal()
.
Done.
crates/starknet_batcher/src/batcher.rs
line 422 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
This error name isn't very informative, should we change it? (In a different PR)
Yes, something like ProposalInProgress
would be better. WDYT?
crates/starknet_batcher/src/proposal_manager.rs
line at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Delete files.
Done.
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 4 of 4 files at r6, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dafnamatsry and @Yael-Starkware)
crates/starknet_batcher/src/batcher.rs
line 289 at r4 (raw file):
Previously, dafnamatsry wrote…
Done.
Note that I deleted a test that simulated this scenario (something that cannot happen for real).
I'm confused, how could it be simulated if it cannot happen?
crates/starknet_batcher/src/batcher.rs
line 422 at r4 (raw file):
Previously, dafnamatsry wrote…
Yes, something like
ProposalInProgress
would be better. WDYT?
Sounds good. New PR?
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 @alonh5 and @Yael-Starkware)
crates/starknet_batcher/src/batcher.rs
line 289 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
I'm confused, how could it be simulated if it cannot happen?
With a mock block builder. The test mocks a block builder that finish successfully. I the validate flow it can't finish successfully unless we get an explicit Finish request from the consensus.
crates/starknet_batcher/src/batcher.rs
line 422 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Sounds good. New PR?
Yap, I'll open one.
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 @Yael-Starkware)
f8ffd4c
to
acc4aba
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 r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Yael-Starkware)
No description provided.