-
Notifications
You must be signed in to change notification settings - Fork 28
refactor: phase metadata service across full slot duration #781
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
base: unstable
Are you sure you want to change the base?
Conversation
|
@claude, could you review the changes just for these two files: |
|
Claude finished @shane-moore's task in 1m 23s —— View job Code Review: Metadata Service RefactoringI've reviewed the two files and the phased metadata service refactoring looks solid overall. Here are my observations: Architecture & Design ✅Excellent phasing strategy: The three-phase approach elegantly solves the race condition problem:
The event-driven coordination using watch channels ( Strengths
Issues & Concerns1. Error handling in
|
|
@claude, could you review the changes just for these two files again: anchor/validator_store/src/lib.rs and anchor/validator_store/src/metadata_service.rs for your points:
additionally, i modified produce_selection_proof and produce_sync_selection_proof to be fork gated and use these new services so please take a look at those changes in last 3 commits as well |
|
Claude finished @shane-moore's task in 1m 43s —— View job Code Review: Follow-up on Metadata Service ChangesReviewed the updated files and the fork-gated selection proof changes in the last 3 commits. Todo List:
SummaryThe updates look excellent! You've addressed the critical error handling issues and the typo. The new fork-gated selection proof implementation is well-designed and follows a clean pattern. I found one critical issue and a few minor suggestions below. Issues Addressed from Previous Review✅ Point 1: Error handling for
|
produce_sync_selection_proof uses wrong PartialSignatureKind in Boole fork
i'm ignoring all the minor suggestions |
|
Claude finished @shane-moore's task in 41s —— View job Follow-up Review VerificationTodo List:
SummaryThank you for the clarifications! I've verified the current state: ✅ Point 1 (Error handling)Confirmed fixed in commit ✅ Point 2 (Typo "assignmentsrmation")You're correct - the typo has been completely fixed. I searched the entire file and found no remaining instances of "assignmentsrmation". The struct documentation at line 761-762 now correctly reads: #[derive(Debug, Clone)]
pub struct VotingAssignments {with proper field documentation below. My apologies for the confusion - I must have been looking at an older version. 📝 PartialSignatureKind ClarificationThank you for clarifying that The key insight I was missing: the Final AssessmentAll critical issues have been resolved:
The metadata service refactoring is in excellent shape. The phased approach elegantly solves the race condition, and the fork-gated selection proof implementation correctly uses committee-based collection with proper batching semantics. No remaining issues. Great work on this complex refactoring! 🎉 |
…om the poll channels
dd1c357 to
73e9a82
Compare
8aba0c4 to
146af66
Compare
Dependencies:
Scope: This PR focuses on the validator store changes only. Downstream changes to QBFT consensus and P2P message verification for committee-based partial signatures will be completed in a separate PR.
Issue Addressed
Required for committee-based partial signature collection. The full list of attesting and sync committee validators must be available at slot start before produce_selection_proof is called, which was not possible with the previous single-phase metadata approach.
Proposed Changes
Additional Info
The previous approach computed all metadata at 1/3 into the slot. This created a race condition where duties might not be available yet, and aggregation information wasn't accurate until after selection proofs were computed.
The new phased approach:
This ensures each piece of metadata is available at the earliest point it can be accurately determined.