feat(rpc-types-beacon): add proposer duties, state validators, and fork types#3688
Merged
feat(rpc-types-beacon): add proposer duties, state validators, and fork types#3688
Conversation
…rk types
Add standard Beacon API types that were missing:
- `proposer`: ProposerDutiesResponse, ProposerDuty for /eth/v1/validator/duties/proposer/{epoch}
- `validator`: ValidatorsResponse, ValidatorResponse, ValidatorData, Validator for /eth/v1/beacon/states/{state_id}/validators
- `fork`: ForkResponse, Fork for /eth/v1/beacon/states/{state_id}/fork
Cross-referenced with the Beacon API v4.0.0 spec and added all missing standard endpoint types: New modules: - `state`: Committee, SyncCommittee, FinalityCheckpoints, ValidatorBalance, Randao, StateRoot (for /eth/v1/beacon/states/* endpoints) - `config`: DepositContract, ForkSchedule, Spec (for /eth/v1/config/* endpoints) - `duties`: AttesterDuty, SyncCommitteeDuty (for /eth/v1/validator/duties/* endpoints) - `rewards`: BlockRewards, SyncCommitteeReward, AttestationRewards (for /eth/v1/beacon/rewards/* endpoints) Improved docs: - Added Beacon API spec endpoint links to all existing types - Reorganized lib.rs module declarations by API category
mattsse
approved these changes
Feb 14, 2026
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.
Summary
Cross-reference all types with the Beacon API v4.0.0 spec and add all missing standard endpoint types.
Motivation
Identified missing types by comparing with rs-mev-relay primitives and then cross-referencing against the full Beacon Node OpenAPI spec. Many standard Beacon API endpoints had no type coverage.
Changes
New modules
state— types for/eth/v1/beacon/states/{state_id}/*endpoints:CommitteesResponse,Committee(committees)SyncCommitteesResponse,SyncCommittee(sync_committees)FinalityCheckpointsResponse,FinalityCheckpoints(finality_checkpoints)ValidatorBalancesResponse,ValidatorBalance(validator_balances)RandaoResponse,RandaoData(randao)StateRootResponse,StateRootData(root)config— types for/eth/v1/config/*endpoints:DepositContractResponse,DepositContract(deposit_contract)ForkScheduleResponse(fork_schedule)SpecResponse(spec)duties— types for/eth/v1/validator/duties/*endpoints:AttesterDutiesResponse,AttesterDuty(attester duties)SyncCommitteeDutiesResponse,SyncCommitteeDuty(sync committee duties)rewards— types for/eth/v1/beacon/rewards/*endpoints:BlockRewardsResponse,BlockRewards(block rewards)SyncCommitteeRewardsResponse,SyncCommitteeReward(sync committee rewards)AttestationRewardsResponse,AttestationRewards,IdealAttestationReward,TotalAttestationReward(attestation rewards)proposer—ProposerDutiesResponse,ProposerDuty(proposer duties)validator—ValidatorsResponse,ValidatorResponse,ValidatorData,Validator(state validators)fork—ForkResponse,Fork(state fork)Improved docs
block.rs,header.rs,genesis.rs,node.rs,sidecar.rslib.rsmodule declarations by API categoryTesting
Prompted by: mattsse