Refactor/stream vc vote publishing#8880
Open
shane-moore wants to merge 11 commits intosigp:unstablefrom
Open
Conversation
shane-moore
commented
Feb 20, 2026
| /// Sign a batch of sync committee contributions and return results as a stream of batches. | ||
| fn sign_sync_committee_contributions( | ||
| self: &Arc<Self>, | ||
| contributions: Vec<ContributionToSign<Self::E>>, |
Member
Author
There was a problem hiding this comment.
@dknopik @michaelsproul, made some helper structs like ContributionToSign to replace inline tuple structs like
(
u64,
PublicKeyBytes,
SyncCommitteeContribution<Self::E>,
SyncSelectionProof,
)
wdyt?
shane-moore
commented
Feb 20, 2026
| .map(|att| att.attester_index) | ||
| .collect::<Vec<_>>(); | ||
| let published_count = single_attestations.len(); | ||
| Err(e) => { |
Member
Author
There was a problem hiding this comment.
I was originally doing return Err('...') in this variant after the log. I think an issue with that is that if we hit an error with one batch, then we'd early return before the rest could be processed
also, propagating the error up just logs an error, which we're doing with the crit! anyways, so seems fine to allow the stream to complete and hit the Ok(), since the logging happens regardless
open to thoughts from @dknopik and otherwise
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed Changes
Changes four
ValidatorStorebatch signing methods to returnimpl Streaminstead ofFuture. Services consume the stream and publish each batch as it arrives. No behavioral change for lh sinceLighthouseValidatorStorewraps everything instream::onceAlso replaces anonymous tuples in method signatures with named structs
Motivation
Anchor needs to yield signing results per SSV committee. Each committee runs consensus independently, so streams let faster committees publish without waiting on slower ones.