-
Notifications
You must be signed in to change notification settings - Fork 85
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(network): db executor is removed from NetworkManager and runs in a separate task #2122
refactor(network): db executor is removed from NetworkManager and runs in a separate task #2122
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## shahak/db_executor_channels #2122 +/- ##
===============================================================
- Coverage 64.37% 64.31% -0.07%
===============================================================
Files 136 136
Lines 17941 17900 -41
Branches 17941 17900 -41
===============================================================
- Hits 11550 11512 -38
Misses 5113 5113
+ Partials 1278 1275 -3 ☔ View full report in Codecov by Sentry. |
771f1f9
to
fc774a1
Compare
761368c
to
cf5b2c9
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 7 of 7 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ShahakShama)
fc774a1
to
48cd1af
Compare
cf5b2c9
to
9f874f3
Compare
48cd1af
to
cb8c766
Compare
19c549c
to
c75a7c7
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 4 of 7 files at r1, 1 of 2 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ShahakShama)
crates/papyrus_network/src/db_executor/mod.rs
line 79 at r3 (raw file):
StateDiffResponsesSender: Sink<DataOrFin<StateDiffChunk>, Error = SendError> + Unpin + Send + 'static, {
These go over 100 columns. Should we use subtypes type Y = XXX
Code quote:
where
HeaderQueryReceiver: Stream<Item = (Result<HeaderQuery, ProtobufConversionError>, HeaderResponsesSender)>
+ Unpin,
HeaderResponsesSender:
Sink<DataOrFin<SignedBlockHeader>, Error = SendError> + Unpin + Send + 'static,
StateDiffQueryReceiver: Stream<Item = (Result<StateDiffQuery, ProtobufConversionError>, StateDiffResponsesSender)>
+ Unpin,
StateDiffResponsesSender:
Sink<DataOrFin<StateDiffChunk>, Error = SendError> + Unpin + Send + 'static,
{
crates/papyrus_network/src/db_executor/test.rs
line 171 at r3 (raw file):
Sender<DataOrFin<StateDiffChunk>>, )>, >,
type TestDbExecutor = ...
Code quote:
DBExecutor<
Receiver<(
Result<HeaderQuery, ProtobufConversionError>,
Sender<DataOrFin<SignedBlockHeader>>,
)>,
Receiver<(
Result<StateDiffQuery, ProtobufConversionError>,
Sender<DataOrFin<StateDiffChunk>>,
)>,
>,
crates/papyrus_node/src/main.rs
line 143 at r3 (raw file):
.await?; // P2P Sync Server task.
Why do you specify p2p?
Code quote:
// P2P Sync Server task.
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 @matan-starkware)
crates/papyrus_network/src/db_executor/mod.rs
line 79 at r3 (raw file):
Previously, matan-starkware wrote…
These go over 100 columns. Should we use subtypes
type Y = XXX
This is not a type, it's a type bound. type bound aliases is an experimental feature in rust
But we plan to remove these generics once we create a test utility for sync like the one Asmaa created today for consensus
crates/papyrus_network/src/db_executor/test.rs
line 171 at r3 (raw file):
Previously, matan-starkware wrote…
type TestDbExecutor = ...
This is the only place we define it, so I see no reason to create a type alias
crates/papyrus_node/src/main.rs
line 143 at r3 (raw file):
Previously, matan-starkware wrote…
Why do you specify p2p?
Because there's a central sync (It doesn't have a server, but we want to connect this to the p2p sync client)
c75a7c7
to
4af5acc
Compare
4a49a45
to
bb9be89
Compare
…s in a separate task
4af5acc
to
161c1cc
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 6 of 6 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ShahakShama)
crates/papyrus_network/src/db_executor/test.rs
line 171 at r3 (raw file):
Previously, ShahakShama wrote…
This is the only place we define it, so I see no reason to create a type alias
just made this function hard to read. I think it's worthwhile but won't block
f69f005
into
shahak/db_executor_channels
* refactor(network): db executor communicates through channels * refactor(network): fix cr comments * refactor(network): db executor is removed from NetworkManager and runs in a separate task (#2122) * refactor(network): db executor is removed from NetworkManager and runs in a separate task * test(network): return network manager tests (#2124)
* refactor(network): remove Data from db executor * refactor(network): fix cr comments * refactor(network): db executor communicates through channels (#2121) * refactor(network): db executor communicates through channels * refactor(network): fix cr comments * refactor(network): db executor is removed from NetworkManager and runs in a separate task (#2122) * refactor(network): db executor is removed from NetworkManager and runs in a separate task * test(network): return network manager tests (#2124)
This change is