-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[dag] state sync refactor and notifier reinit #10106
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
cbb2c05
to
b5e9ed8
Compare
89eeac2
to
d8c8f45
Compare
StateSyncStatus::EpochEnds => { | ||
// Wait for epoch manager to signal shutdown | ||
_ = shutdown_rx.await; | ||
return; | ||
}, |
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.
Not sure this is correct, because this peer could have received a old ledger info and it may already be in the new epoch.
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.
the invariant we should hold is that the dag instance only receives message from the same epoch. if it's already in the new epoch, it shouldn't receive message from previous epoch.
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.
sending multiple/stale epoch change proof is okay I think, epoch manager should handle that
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.
We don't check the ledger info is from the same epoch actually. I need to fix that.
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.
I added the check to make sure its same epoch.
consensus/src/dag/dag_state_sync.rs
Outdated
return StateSyncStatus::Synced(Some(node)); | ||
} | ||
|
||
if ledger_info.ledger_info().ends_epoch() { |
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.
this logic is different than sync manager but I think it's good
e7936ea
to
e3ff6a2
Compare
e3ff6a2
to
0a6989d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
❌ Forge suite
|
Description
This PR splits the notifier into OrderedNotifier and ProofNotifier.
Test Plan