-
Notifications
You must be signed in to change notification settings - Fork 11
WIRE-342: send the OPERATORS roster only when it changes #568
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
Draft
heifner
wants to merge
4
commits into
master
Choose a base branch
from
fix/wire-342-roster-send-on-change
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
aa54789
WIRE-342: send the OPERATORS roster only when it changes
heifner 83c621e
test(epoch): guard the roster's SLASHED carve-out
heifner 546a75e
Merge remote-tracking branch 'origin/master' into fix/wire-342-roster…
heifner 572b203
WIRE-342: bound the roster by the outpost that has to seat it
heifner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[P1] Ensure a target is published before its slash action
Excluding
UNKNOWNleaves an operator absent from every outpost until its first ACTIVE/SLASHED roster. If it remains UNKNOWN across advances, then becomes ACTIVE and is slashed before the next advance,opreg::slashqueuesOPERATOR_ACTION(SLASH)first; this roster is queued later, so FIFO packing makes Solana process the slash without a mapping, returnOperatorNotFound, and consume the action before the roster arrives. Retaining SLASHED therefore does not close the first-publication race. Ensure the target roster precedes any dependent action, or make slash application independent of the cached roster.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.
Confirmed the mechanism, and I agree the gap is real — but I think the fix belongs outpost-side, so I have not changed it here.
Verified on the depot:
opreg::slashcallsemit_slash_attestationinline mid-epoch, the roster is queued fromadvanceat the epoch boundary, andbuildenvwalks the READY status index in att_id order. So the slash genuinely does precede a roster queued later in the same envelope. And you are right that retaining SLASHED does not close it — that carve-out keeps a published operator present, it does not publish a new one.Where I differ is the remedy. "Ensure the target roster precedes any dependent action" is not something the depot can do without restructuring when slashes are emitted: the slash attestation is minted at slash time, and the roster only exists as a queued attestation at advance. Reordering would mean either deferring
emit_slash_attestationto advance (changing existing, unrelated behaviour) or havingopregreach intosysio.epochs roster gate.Your second alternative — make slash application independent of the cached roster — is outpost-side and composes with the tombstone work already in wire-solana#444, which is touching exactly this code (
process_slash_action+ the rebuild loop). I would rather it land there than contort the depot.On reachability, for the record: for BATCH operators the window looks closed, since a slash requires delivery, which requires scheduling, which happens at the same
advancethat publishes the roster. It looks plausible for UNDERWRITERS now that WIRE-297 has landed an underwriting-fault slash path that does not depend on scheduling. I have not proven either.Filing a SOL ticket for the outpost-side fix and linking it here unless you would rather it be tracked under WIRE-342.