-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat(sync): add poll_pending_data to sync config #515
Conversation
a9597e0
to
445ef6f
Compare
901b5aa
to
744c182
Compare
744c182
to
8c048e0
Compare
8c048e0
to
4e62729
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #515 +/- ##
==========================================
+ Coverage 76.45% 76.66% +0.21%
==========================================
Files 314 349 +35
Lines 34205 36548 +2343
Branches 34205 36548 +2343
==========================================
+ Hits 26152 28021 +1869
- Misses 5775 6222 +447
- Partials 2278 2305 +27 ☔ 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 2 of 2 files at r6, 2 of 3 files at r7, all commit messages.
Reviewable status: 4 of 5 files reviewed, 4 unresolved discussions (waiting on @guy-starkware)
-- commits
line 2 at r7:
add a scope to the commit message.
config/papyrus/default_config.json
line 392 at r7 (raw file):
"value": 1000 }, "sync.poll_pending_data": {
The polling is an implementation detail and does not fully explain the effect of the configuration value. Consider something like collect_pending_data
config/papyrus/default_config.json
line 395 at r7 (raw file):
"description": "Whether to poll for pending data.", "privacy": "Public", "value": true
I think the default value should be false. We don't want the node to do extra work unless explicitly requested.
Code quote:
"value": true
crates/papyrus_sync/src/lib.rs
line 695 at r7 (raw file):
if reader.begin_ro_txn()?.get_state_marker()? == header_marker{ // Here is the only place we update the pending data. if poll_pending_data {
Move this check to line 693
Code quote:
if poll_pending_data {
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 5 files reviewed, 4 unresolved discussions (waiting on @DvirYo-starkware)
Previously, DvirYo-starkware wrote…
add a scope to the commit message.
what would be the scope in this case?
config/papyrus/default_config.json
line 392 at r7 (raw file):
Previously, DvirYo-starkware wrote…
The polling is an implementation detail and does not fully explain the effect of the configuration value. Consider something like
collect_pending_data
Done.
config/papyrus/default_config.json
line 395 at r7 (raw file):
Previously, DvirYo-starkware wrote…
I think the default value should be false. We don't want the node to do extra work unless explicitly requested.
Done.
crates/papyrus_sync/src/lib.rs
line 695 at r7 (raw file):
Previously, DvirYo-starkware wrote…
Move this check to line 693
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 r8, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @guy-starkware)
Previously, guy-starkware wrote…
what would be the scope in this case?
You can see all the commitline definitions in the sequencer/commitlint.config.js
file. In this case, it would be sync
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 @DvirYo-starkware)
Previously, DvirYo-starkware wrote…
You can see all the commitline definitions in the
sequencer/commitlint.config.js
file. In this case, it would besync
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @guy-starkware)
This small PR adds a boolean to the
SyncConfig
struct that allows turning on or off the polling for pending data. This is on by default.This change is