Merged
Conversation
72c594c to
b6030a9
Compare
dknopik
reviewed
May 13, 2025
c995bf1 to
55c1dce
Compare
55c1dce to
193c159
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the old voluntary_exit module and introduces a standalone duties_tracker crate to fetch voluntary exit duty counts, wiring it into the message validator and ETH clients.
- Move exit duty logic into
duties_trackerand update all crates to depend on it - Integrate
get_voluntary_exit_duty_countinto consensus message validation forRole::VoluntaryExit - Update Cargo.toml and import paths in
message_validator,eth,client, and fuzz targets
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| anchor/voluntary_exit/src/lib.rs | Remove obsolete modules |
| anchor/message_validator/src/lib.rs | Drop local duties; re-export and depend on new duties_tracker crate |
| anchor/message_validator/src/consensus_message.rs | Add voluntary-exit duty lookup via DutiesProvider |
| anchor/message_validator/Cargo.toml | Add duties_tracker dependency |
| anchor/fuzz/fuzz_targets/setup.rs | Stub get_voluntary_exit_duty_count in fuzz mock |
| anchor/eth/src/voluntary_exit_processor.rs | Switch to duties_tracker::voluntary_exit_tracker types |
| anchor/eth/src/sync.rs | Correct ExitTx import path |
| anchor/eth/src/lib.rs | Expose voluntary_exit_processor module |
| anchor/eth/src/event_processor.rs | Fix import of ExitRequest/ExitTx |
| anchor/eth/Cargo.toml | Add duties_tracker and anchor_validator_store deps; remove old voluntary_exit |
| anchor/duties_tracker/src/lib.rs | Define DutiesProvider::get_voluntary_exit_duty_count |
| anchor/duties_tracker/src/duties_tracker.rs | Wire new voluntary exit tracker into DutiesTracker struct |
| anchor/duties_tracker/Cargo.toml | Rename package to duties_tracker, add new dependencies |
| anchor/client/src/lib.rs | Pass VoluntaryExitTracker into DutiesTracker::new |
| anchor/client/Cargo.toml | Add duties_tracker dep, remove old voluntary_exit |
| Cargo.toml | Include anchor/duties_tracker in workspace modules |
Comments suppressed due to low confidence (3)
anchor/message_validator/src/consensus_message.rs:726
- The stub implementation for
get_voluntary_exit_duty_countis present in tests, but there’s no unit test exercising theRole::VoluntaryExitbranch ofduty_limit. Add a test that injects a fakeDutiesProviderand verifies correct handling of voluntary exit duties.
fn get_voluntary_exit_duty_count(&self, _slot: Slot, _pubkey: &PublicKeyBytes) -> u64 {
anchor/message_validator/src/consensus_message.rs:590
- The variable
duty_provideris not defined in this scope. Consider passing aDutiesProviderinstance intoduty_limit(e.g., viaValidationContextor as a new function parameter) so you can callget_voluntary_exit_duty_count.
duty_provider.get_voluntary_exit_duty_count(slot, &pubkey)
anchor/duties_tracker/src/lib.rs:106
- Public API methods should include doc comments. Add a
///comment describing whatget_voluntary_exit_duty_countreturns and under what conditions (e.g., slot resolution, missing data).
fn get_voluntary_exit_duty_count(&self, slot: Slot, pubkey: &PublicKeyBytes) -> u64;
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.
Issue Addressed
#277
Proposed Changes
This PR removes the old voluntary_exit module and introduces a standalone duties_tracker crate to fetch voluntary exit duty counts, wiring it into the message validator and ETH clients.