Remove use of committee list from validator client (#15039)

* wip

* fixing unit tests

* changing is aggregator function

* wip

* fully removing the use of committee from validator client, adding a wrapper type for duties

* fixing tests

* fixing linting

* fixing more tests

* changelog

* adding some more tests

* Update proto/prysm/v1alpha1/validator.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* radek's feedback

* removing accidently checked in

---------

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
james-prysm
2025-03-25 11:25:42 -05:00
committed by GitHub
parent bd17779231
commit c735ed2e32
21 changed files with 418 additions and 420 deletions

View File

@@ -342,6 +342,7 @@ go_library(
"eip_7521.go",
"sync_committee_mainnet.go",
"sync_committee_minimal.go", # keep
"validator.go",
":ssz_generated_altair", # keep
":ssz_generated_bellatrix", # keep
":ssz_generated_capella", # keep

View File

@@ -0,0 +1,25 @@
package eth
import (
"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
)
// ValidatorDutiesContainer is a wrapper that can be both used for the gRPC DutiesResponse and Rest API response structs for attestation, proposer, and sync duties.
type ValidatorDutiesContainer struct {
CurrentEpochDuties []*ValidatorDuty
NextEpochDuties []*ValidatorDuty
}
// ValidatorDuty is all the information needed to execute validator duties
type ValidatorDuty struct {
CommitteeLength uint64
CommitteeIndex primitives.CommitteeIndex
CommitteesAtSlot uint64
ValidatorCommitteeIndex uint64
AttesterSlot primitives.Slot
ProposerSlots []primitives.Slot
PublicKey []byte
Status ValidatorStatus
ValidatorIndex primitives.ValidatorIndex
IsSyncCommittee bool
}