diff --git a/WORKSPACE b/WORKSPACE index 5da88b2b3a..0604a8a4a6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1259,7 +1259,7 @@ go_repository( go_repository( name = "com_github_prysmaticlabs_ethereumapis", - commit = "10e0aa6523a7cf0804fb79096b41d7d8d7df37e5", + commit = "b39a0c15028a20e7ef54e666d92b8d7fd61f5f0e", importpath = "github.com/prysmaticlabs/ethereumapis", ) diff --git a/beacon-chain/archiver/service_test.go b/beacon-chain/archiver/service_test.go index 6aaff9a0c1..3ea5b89cba 100644 --- a/beacon-chain/archiver/service_test.go +++ b/beacon-chain/archiver/service_test.go @@ -72,20 +72,20 @@ func TestArchiverService_ComputesAndSavesParticipation(t *testing.T) { triggerNewHeadEvent(t, svc, [32]byte{}) attestedBalance := uint64(1) + currentEpoch := helpers.CurrentEpoch(headState) wanted := ðpb.ValidatorParticipation{ - Epoch: helpers.SlotToEpoch(headState.Slot), VotedEther: attestedBalance, EligibleEther: validatorCount * params.BeaconConfig().MaxEffectiveBalance, GlobalParticipationRate: float32(attestedBalance) / float32(validatorCount*params.BeaconConfig().MaxEffectiveBalance), } - retrieved, err := svc.beaconDB.ArchivedValidatorParticipation(svc.ctx, wanted.Epoch) + retrieved, err := svc.beaconDB.ArchivedValidatorParticipation(svc.ctx, currentEpoch) if err != nil { t.Fatal(err) } if !proto.Equal(wanted, retrieved) { - t.Errorf("Wanted participation for epoch %d %v, retrieved %v", wanted.Epoch, wanted, retrieved) + t.Errorf("Wanted participation for epoch %d %v, retrieved %v", currentEpoch, wanted, retrieved) } testutil.AssertLogsContain(t, hook, "archived validator participation") } diff --git a/beacon-chain/core/epoch/participation.go b/beacon-chain/core/epoch/participation.go index 8387a93e00..94de568b3c 100644 --- a/beacon-chain/core/epoch/participation.go +++ b/beacon-chain/core/epoch/participation.go @@ -11,8 +11,6 @@ import ( // computing the attesting balance, and how much attested compared to the total balances. func ComputeValidatorParticipation(state *pb.BeaconState) (*ethpb.ValidatorParticipation, error) { currentEpoch := helpers.SlotToEpoch(state.Slot) - finalized := currentEpoch == state.FinalizedCheckpoint.Epoch - atts, err := MatchAttestations(state, currentEpoch) if err != nil { return nil, errors.Wrap(err, "could not retrieve head attestations") @@ -26,8 +24,6 @@ func ComputeValidatorParticipation(state *pb.BeaconState) (*ethpb.ValidatorParti return nil, errors.Wrap(err, "could not retrieve total balances") } return ðpb.ValidatorParticipation{ - Epoch: currentEpoch, - Finalized: finalized, GlobalParticipationRate: float32(attestedBalances) / float32(totalBalances), VotedEther: attestedBalances, EligibleEther: totalBalances, diff --git a/beacon-chain/core/epoch/participation_test.go b/beacon-chain/core/epoch/participation_test.go index f8c02f85c6..c3110744fd 100644 --- a/beacon-chain/core/epoch/participation_test.go +++ b/beacon-chain/core/epoch/participation_test.go @@ -57,7 +57,6 @@ func TestComputeValidatorParticipation(t *testing.T) { } wanted := ðpb.ValidatorParticipation{ - Epoch: epoch, VotedEther: attestedBalance, EligibleEther: validatorCount * params.BeaconConfig().MaxEffectiveBalance, GlobalParticipationRate: float32(attestedBalance) / float32(validatorCount*params.BeaconConfig().MaxEffectiveBalance), diff --git a/beacon-chain/db/kv/archive_test.go b/beacon-chain/db/kv/archive_test.go index ef235cda45..be78346652 100644 --- a/beacon-chain/db/kv/archive_test.go +++ b/beacon-chain/db/kv/archive_test.go @@ -177,8 +177,6 @@ func TestStore_ArchivedValidatorParticipation(t *testing.T) { ctx := context.Background() epoch := uint64(10) part := ðpb.ValidatorParticipation{ - Epoch: epoch, - Finalized: true, GlobalParticipationRate: 0.99, EligibleEther: 12202000, VotedEther: 12079998, diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index ad1be9af54..12a0f5ff61 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -443,6 +443,7 @@ func (b *BeaconNode) registerRPCService(ctx *cli.Context) error { BeaconDB: b.db, Broadcaster: b.fetchP2P(ctx), HeadFetcher: chainService, + FinalizationFetcher: chainService, BlockReceiver: chainService, AttestationReceiver: chainService, StateFeedListener: chainService, diff --git a/beacon-chain/rpc/beacon_chain_server.go b/beacon-chain/rpc/beacon_chain_server.go index da196ce667..4be359515b 100644 --- a/beacon-chain/rpc/beacon_chain_server.go +++ b/beacon-chain/rpc/beacon_chain_server.go @@ -30,6 +30,7 @@ type BeaconChainServer struct { ctx context.Context chainStartFetcher powchain.ChainStartFetcher headFetcher blockchain.HeadFetcher + finalizationFetcher blockchain.FinalizationFetcher stateFeedListener blockchain.ChainFeeds pool operations.Pool incomingAttestation chan *ethpb.Attestation @@ -476,17 +477,72 @@ func (bs *BeaconChainServer) ListValidatorAssignments( } // GetValidatorParticipation retrieves the validator participation information for a given epoch, -// it returns the information about validator's participation rate -// -// TODO(#3064): Implement validator participation for a specific epoch. Current implementation returns latest, -// this is blocked by DB refactor. +// it returns the information about validator's participation rate in voting on the proof of stake +// rules based on their balance compared to the total active validator balance. func (bs *BeaconChainServer) GetValidatorParticipation( ctx context.Context, req *ethpb.GetValidatorParticipationRequest, -) (*ethpb.ValidatorParticipation, error) { +) (*ethpb.ValidatorParticipationResponse, error) { headState := bs.headFetcher.HeadState() + currentEpoch := helpers.SlotToEpoch(headState.Slot) + + var requestedEpoch uint64 + var isGenesis bool + switch q := req.QueryFilter.(type) { + case *ethpb.GetValidatorParticipationRequest_Genesis: + isGenesis = q.Genesis + case *ethpb.GetValidatorParticipationRequest_Epoch: + requestedEpoch = q.Epoch + default: + requestedEpoch = currentEpoch + } + + if requestedEpoch > helpers.SlotToEpoch(headState.Slot) { + return nil, status.Errorf( + codes.FailedPrecondition, + "cannot request data from an epoch in the future: req.Epoch %d, currentEpoch %d", requestedEpoch, currentEpoch, + ) + } + // If the request is from genesis or another past epoch, we look into our archived + // data to find it and return it if it exists. + if isGenesis { + participation, err := bs.beaconDB.ArchivedValidatorParticipation(ctx, 0) + if err != nil { + return nil, status.Errorf(codes.Internal, "could not fetch archived participation: %v", err) + } + if participation == nil { + return nil, status.Error(codes.NotFound, "could not find archival data for epoch 0") + } + return ðpb.ValidatorParticipationResponse{ + Epoch: 0, + Finalized: true, + Participation: participation, + }, nil + } else if requestedEpoch < helpers.SlotToEpoch(headState.Slot) { + participation, err := bs.beaconDB.ArchivedValidatorParticipation(ctx, requestedEpoch) + if err != nil { + return nil, status.Errorf(codes.Internal, "could not fetch archived participation: %v", err) + } + if participation == nil { + return nil, status.Errorf(codes.NotFound, "could not find archival data for epoch %d", requestedEpoch) + } + finalizedEpoch := bs.finalizationFetcher.FinalizedCheckpt().Epoch + // If the epoch we requested is <= the finalized epoch, we consider it finalized as well. + finalized := requestedEpoch <= finalizedEpoch + return ðpb.ValidatorParticipationResponse{ + Epoch: requestedEpoch, + Finalized: finalized, + Participation: participation, + }, nil + } + // Else if the request is for the current epoch, we compute validator participation + // right away and return the result based on the head state. participation, err := epoch.ComputeValidatorParticipation(headState) if err != nil { return nil, status.Errorf(codes.Internal, "could not compute participation: %v", err) } - return participation, nil + return ðpb.ValidatorParticipationResponse{ + Epoch: currentEpoch, + Finalized: false, // The current epoch can never be finalized. + Participation: participation, + }, nil } diff --git a/beacon-chain/rpc/beacon_chain_server_test.go b/beacon-chain/rpc/beacon_chain_server_test.go index 78742a5bfe..23237a884c 100644 --- a/beacon-chain/rpc/beacon_chain_server_test.go +++ b/beacon-chain/rpc/beacon_chain_server_test.go @@ -862,7 +862,66 @@ func TestBeaconChainServer_ListAssignmentsCanFilterPubkeysIndicesWithPages(t *te } } -func TestBeaconChainServer_GetValidatorsParticipation(t *testing.T) { +func TestBeaconChainServer_GetValidatorsParticipation_FromArchive(t *testing.T) { + db := dbTest.SetupDB(t) + defer dbTest.TeardownDB(t, db) + ctx := context.Background() + epoch := uint64(4) + part := ðpb.ValidatorParticipation{ + GlobalParticipationRate: 1.0, + VotedEther: 20, + EligibleEther: 20, + } + if err := db.SaveArchivedValidatorParticipation(ctx, epoch, part); err != nil { + t.Fatal(err) + } + + bs := &BeaconChainServer{ + beaconDB: db, + headFetcher: &mock.ChainService{ + State: &pbp2p.BeaconState{Slot: helpers.StartSlot(epoch + 1)}, + }, + finalizationFetcher: &mock.ChainService{ + FinalizedCheckPoint: ðpb.Checkpoint{ + Epoch: epoch + 1, + }, + }, + } + if _, err := bs.GetValidatorParticipation(ctx, ðpb.GetValidatorParticipationRequest{ + QueryFilter: ðpb.GetValidatorParticipationRequest_Epoch{ + Epoch: epoch + 2, + }, + }); err == nil { + t.Error("Expected error when requesting future epoch, received nil") + } + // We request data from epoch 0, which we didn't archive, so we should expect an error. + if _, err := bs.GetValidatorParticipation(ctx, ðpb.GetValidatorParticipationRequest{ + QueryFilter: ðpb.GetValidatorParticipationRequest_Genesis{ + Genesis: true, + }, + }); err == nil { + t.Error("Expected error when data from archive is not found, received nil") + } + + want := ðpb.ValidatorParticipationResponse{ + Epoch: epoch, + Finalized: true, + Participation: part, + } + res, err := bs.GetValidatorParticipation(ctx, ðpb.GetValidatorParticipationRequest{ + QueryFilter: ðpb.GetValidatorParticipationRequest_Epoch{ + Epoch: epoch, + }, + }) + if err != nil { + t.Fatal(err) + } + if !proto.Equal(want, res) { + t.Errorf("Wanted %v, received %v", want, res) + } +} + +func TestBeaconChainServer_GetValidatorsParticipation_CurrentEpoch(t *testing.T) { helpers.ClearAllCaches() db := dbTest.SetupDB(t) defer dbTest.TeardownDB(t, db) @@ -912,19 +971,18 @@ func TestBeaconChainServer_GetValidatorsParticipation(t *testing.T) { headFetcher: &mock.ChainService{State: s}, } - res, err := bs.GetValidatorParticipation(ctx, ðpb.GetValidatorParticipationRequest{Epoch: epoch}) + res, err := bs.GetValidatorParticipation(ctx, ðpb.GetValidatorParticipationRequest{}) if err != nil { t.Fatal(err) } wanted := ðpb.ValidatorParticipation{ - Epoch: epoch, VotedEther: attestedBalance, EligibleEther: validatorCount * params.BeaconConfig().MaxEffectiveBalance, GlobalParticipationRate: float32(attestedBalance) / float32(validatorCount*params.BeaconConfig().MaxEffectiveBalance), } - if !reflect.DeepEqual(res, wanted) { + if !reflect.DeepEqual(res.Participation, wanted) { t.Error("Incorrect validator participation respond") } } diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index d7e90b0cbe..5bd1141ff3 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -42,6 +42,7 @@ type Service struct { beaconDB db.Database stateFeedListener blockchain.ChainFeeds headFetcher blockchain.HeadFetcher + finalizationFetcher blockchain.FinalizationFetcher genesisTimeFetcher blockchain.GenesisTimeFetcher attestationReceiver blockchain.AttestationReceiver blockReceiver blockchain.BlockReceiver @@ -72,6 +73,7 @@ type Config struct { BeaconDB db.Database StateFeedListener blockchain.ChainFeeds HeadFetcher blockchain.HeadFetcher + FinalizationFetcher blockchain.FinalizationFetcher AttestationReceiver blockchain.AttestationReceiver BlockReceiver blockchain.BlockReceiver POWChainService powchain.Chain @@ -96,6 +98,7 @@ func NewService(ctx context.Context, cfg *Config) *Service { beaconDB: cfg.BeaconDB, stateFeedListener: cfg.StateFeedListener, headFetcher: cfg.HeadFetcher, + finalizationFetcher: cfg.FinalizationFetcher, genesisTimeFetcher: cfg.GenesisTimeFetcher, attestationReceiver: cfg.AttestationReceiver, blockReceiver: cfg.BlockReceiver, @@ -190,11 +193,12 @@ func (s *Service) Start() { genesisTimeFetcher: s.genesisTimeFetcher, } beaconChainServer := &BeaconChainServer{ - beaconDB: s.beaconDB, - pool: s.attestationsPool, - headFetcher: s.headFetcher, - chainStartFetcher: s.chainStartFetcher, - canonicalStateChan: s.canonicalStateChan, + beaconDB: s.beaconDB, + pool: s.attestationsPool, + headFetcher: s.headFetcher, + finalizationFetcher: s.finalizationFetcher, + chainStartFetcher: s.chainStartFetcher, + canonicalStateChan: s.canonicalStateChan, } pb.RegisterProposerServiceServer(s.grpcServer, proposerServer) pb.RegisterAttesterServiceServer(s.grpcServer, attesterServer) diff --git a/proto/beacon/p2p/v1/messages.pb.go b/proto/beacon/p2p/v1/messages.pb.go index 429de7fc2a..c49daf0c20 100755 --- a/proto/beacon/p2p/v1/messages.pb.go +++ b/proto/beacon/p2p/v1/messages.pb.go @@ -5,11 +5,10 @@ package ethereum_beacon_p2p_v1 import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/beacon/p2p/v1/types.pb.go b/proto/beacon/p2p/v1/types.pb.go index b77e9294f0..99c22032db 100755 --- a/proto/beacon/p2p/v1/types.pb.go +++ b/proto/beacon/p2p/v1/types.pb.go @@ -5,13 +5,12 @@ package ethereum_beacon_p2p_v1 import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/beacon/rpc/v1/services.pb.go b/proto/beacon/rpc/v1/services.pb.go index 9bb9f4f0ea..dd55aba8ab 100755 --- a/proto/beacon/rpc/v1/services.pb.go +++ b/proto/beacon/rpc/v1/services.pb.go @@ -7,15 +7,14 @@ import ( context "context" encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/beacon/rpc/v1_gateway/services.pb.go b/proto/beacon/rpc/v1_gateway/services.pb.go index b07bd19525..c1fea1709b 100755 --- a/proto/beacon/rpc/v1_gateway/services.pb.go +++ b/proto/beacon/rpc/v1_gateway/services.pb.go @@ -6,14 +6,13 @@ package ethereum_beacon_rpc_v1 import ( context "context" fmt "fmt" - math "math" - proto "github.com/golang/protobuf/proto" empty "github.com/golang/protobuf/ptypes/empty" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/eth/v1alpha1/_compatibility/compatability_test.go b/proto/eth/v1alpha1/_compatibility/compatability_test.go index 7eda62b5c3..4e0e3f81a8 100644 --- a/proto/eth/v1alpha1/_compatibility/compatability_test.go +++ b/proto/eth/v1alpha1/_compatibility/compatability_test.go @@ -144,8 +144,8 @@ func TestProtoCompatability(t *testing.T) { b: &upstreampb.GetValidatorParticipationRequest{}, }, { - a: &pb.ValidatorParticipation{}, - b: &upstreampb.ValidatorParticipation{}, + a: &pb.ValidatorParticipationResponse{}, + b: &upstreampb.ValidatorParticipationResponse{}, }, { a: &pb.AttestationPoolResponse{}, @@ -193,6 +193,10 @@ func TestProtoCompatability(t *testing.T) { a: &pb.Validator{}, b: &upstreampb.Validator{}, }, + { + a: &pb.ValidatorParticipation{}, + b: &upstreampb.ValidatorParticipation{}, + }, } for _, tt := range tests { diff --git a/proto/eth/v1alpha1/archive.pb.go b/proto/eth/v1alpha1/archive.pb.go index b2b49ece90..146465133f 100755 --- a/proto/eth/v1alpha1/archive.pb.go +++ b/proto/eth/v1alpha1/archive.pb.go @@ -5,11 +5,10 @@ package eth import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/eth/v1alpha1/attestation.pb.go b/proto/eth/v1alpha1/attestation.pb.go index 223405f1eb..b1dd5518ad 100755 --- a/proto/eth/v1alpha1/attestation.pb.go +++ b/proto/eth/v1alpha1/attestation.pb.go @@ -5,12 +5,11 @@ package eth import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/eth/v1alpha1/beacon_block.pb.go b/proto/eth/v1alpha1/beacon_block.pb.go index fe053f245c..d3c2ce1895 100755 --- a/proto/eth/v1alpha1/beacon_block.pb.go +++ b/proto/eth/v1alpha1/beacon_block.pb.go @@ -5,11 +5,10 @@ package eth import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/eth/v1alpha1/beacon_chain.pb.go b/proto/eth/v1alpha1/beacon_chain.pb.go index a1c7a12a9b..00fc1a1355 100755 --- a/proto/eth/v1alpha1/beacon_chain.pb.go +++ b/proto/eth/v1alpha1/beacon_chain.pb.go @@ -5,16 +5,14 @@ package eth import ( context "context" - encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -694,12 +692,15 @@ func (m *ChainHead) GetPreviousJustifiedBlockRoot() []byte { } type GetValidatorBalancesRequest struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - PublicKeys [][]byte `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" ssz-size:"?,48"` - Indices []uint64 `protobuf:"varint,3,rep,packed,name=indices,proto3" json:"indices,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Types that are valid to be assigned to QueryFilter: + // *GetValidatorBalancesRequest_Epoch + // *GetValidatorBalancesRequest_Genesis + QueryFilter isGetValidatorBalancesRequest_QueryFilter `protobuf_oneof:"query_filter"` + PublicKeys [][]byte `protobuf:"bytes,3,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" ssz-size:"?,48"` + Indices []uint64 `protobuf:"varint,4,rep,packed,name=indices,proto3" json:"indices,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetValidatorBalancesRequest) Reset() { *m = GetValidatorBalancesRequest{} } @@ -735,13 +736,43 @@ func (m *GetValidatorBalancesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GetValidatorBalancesRequest proto.InternalMessageInfo -func (m *GetValidatorBalancesRequest) GetEpoch() uint64 { +type isGetValidatorBalancesRequest_QueryFilter interface { + isGetValidatorBalancesRequest_QueryFilter() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetValidatorBalancesRequest_Epoch struct { + Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` +} +type GetValidatorBalancesRequest_Genesis struct { + Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` +} + +func (*GetValidatorBalancesRequest_Epoch) isGetValidatorBalancesRequest_QueryFilter() {} +func (*GetValidatorBalancesRequest_Genesis) isGetValidatorBalancesRequest_QueryFilter() {} + +func (m *GetValidatorBalancesRequest) GetQueryFilter() isGetValidatorBalancesRequest_QueryFilter { if m != nil { - return m.Epoch + return m.QueryFilter + } + return nil +} + +func (m *GetValidatorBalancesRequest) GetEpoch() uint64 { + if x, ok := m.GetQueryFilter().(*GetValidatorBalancesRequest_Epoch); ok { + return x.Epoch } return 0 } +func (m *GetValidatorBalancesRequest) GetGenesis() bool { + if x, ok := m.GetQueryFilter().(*GetValidatorBalancesRequest_Genesis); ok { + return x.Genesis + } + return false +} + func (m *GetValidatorBalancesRequest) GetPublicKeys() [][]byte { if m != nil { return m.PublicKeys @@ -756,6 +787,74 @@ func (m *GetValidatorBalancesRequest) GetIndices() []uint64 { return nil } +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetValidatorBalancesRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _GetValidatorBalancesRequest_OneofMarshaler, _GetValidatorBalancesRequest_OneofUnmarshaler, _GetValidatorBalancesRequest_OneofSizer, []interface{}{ + (*GetValidatorBalancesRequest_Epoch)(nil), + (*GetValidatorBalancesRequest_Genesis)(nil), + } +} + +func _GetValidatorBalancesRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*GetValidatorBalancesRequest) + // query_filter + switch x := m.QueryFilter.(type) { + case *GetValidatorBalancesRequest_Epoch: + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Epoch)) + case *GetValidatorBalancesRequest_Genesis: + t := uint64(0) + if x.Genesis { + t = 1 + } + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("GetValidatorBalancesRequest.QueryFilter has unexpected type %T", x) + } + return nil +} + +func _GetValidatorBalancesRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*GetValidatorBalancesRequest) + switch tag { + case 1: // query_filter.epoch + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.QueryFilter = &GetValidatorBalancesRequest_Epoch{x} + return true, err + case 2: // query_filter.genesis + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.QueryFilter = &GetValidatorBalancesRequest_Genesis{x != 0} + return true, err + default: + return false, nil + } +} + +func _GetValidatorBalancesRequest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*GetValidatorBalancesRequest) + // query_filter + switch x := m.QueryFilter.(type) { + case *GetValidatorBalancesRequest_Epoch: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Epoch)) + case *GetValidatorBalancesRequest_Genesis: + n += 1 // tag and wire + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + type ValidatorBalances struct { Balances []*ValidatorBalances_Balance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1514,10 +1613,13 @@ func (m *ValidatorAssignments_CommitteeAssignment) GetPublicKey() []byte { } type GetValidatorParticipationRequest struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Types that are valid to be assigned to QueryFilter: + // *GetValidatorParticipationRequest_Epoch + // *GetValidatorParticipationRequest_Genesis + QueryFilter isGetValidatorParticipationRequest_QueryFilter `protobuf_oneof:"query_filter"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetValidatorParticipationRequest) Reset() { *m = GetValidatorParticipationRequest{} } @@ -1553,36 +1655,132 @@ func (m *GetValidatorParticipationRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GetValidatorParticipationRequest proto.InternalMessageInfo -func (m *GetValidatorParticipationRequest) GetEpoch() uint64 { +type isGetValidatorParticipationRequest_QueryFilter interface { + isGetValidatorParticipationRequest_QueryFilter() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetValidatorParticipationRequest_Epoch struct { + Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` +} +type GetValidatorParticipationRequest_Genesis struct { + Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` +} + +func (*GetValidatorParticipationRequest_Epoch) isGetValidatorParticipationRequest_QueryFilter() {} +func (*GetValidatorParticipationRequest_Genesis) isGetValidatorParticipationRequest_QueryFilter() {} + +func (m *GetValidatorParticipationRequest) GetQueryFilter() isGetValidatorParticipationRequest_QueryFilter { if m != nil { - return m.Epoch + return m.QueryFilter + } + return nil +} + +func (m *GetValidatorParticipationRequest) GetEpoch() uint64 { + if x, ok := m.GetQueryFilter().(*GetValidatorParticipationRequest_Epoch); ok { + return x.Epoch } return 0 } -type ValidatorParticipation struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Finalized bool `protobuf:"varint,2,opt,name=finalized,proto3" json:"finalized,omitempty"` - GlobalParticipationRate float32 `protobuf:"fixed32,3,opt,name=global_participation_rate,json=globalParticipationRate,proto3" json:"global_participation_rate,omitempty"` - VotedEther uint64 `protobuf:"varint,4,opt,name=voted_ether,json=votedEther,proto3" json:"voted_ether,omitempty"` - EligibleEther uint64 `protobuf:"varint,5,opt,name=eligible_ether,json=eligibleEther,proto3" json:"eligible_ether,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *GetValidatorParticipationRequest) GetGenesis() bool { + if x, ok := m.GetQueryFilter().(*GetValidatorParticipationRequest_Genesis); ok { + return x.Genesis + } + return false } -func (m *ValidatorParticipation) Reset() { *m = ValidatorParticipation{} } -func (m *ValidatorParticipation) String() string { return proto.CompactTextString(m) } -func (*ValidatorParticipation) ProtoMessage() {} -func (*ValidatorParticipation) Descriptor() ([]byte, []int) { +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetValidatorParticipationRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _GetValidatorParticipationRequest_OneofMarshaler, _GetValidatorParticipationRequest_OneofUnmarshaler, _GetValidatorParticipationRequest_OneofSizer, []interface{}{ + (*GetValidatorParticipationRequest_Epoch)(nil), + (*GetValidatorParticipationRequest_Genesis)(nil), + } +} + +func _GetValidatorParticipationRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*GetValidatorParticipationRequest) + // query_filter + switch x := m.QueryFilter.(type) { + case *GetValidatorParticipationRequest_Epoch: + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Epoch)) + case *GetValidatorParticipationRequest_Genesis: + t := uint64(0) + if x.Genesis { + t = 1 + } + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("GetValidatorParticipationRequest.QueryFilter has unexpected type %T", x) + } + return nil +} + +func _GetValidatorParticipationRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*GetValidatorParticipationRequest) + switch tag { + case 1: // query_filter.epoch + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.QueryFilter = &GetValidatorParticipationRequest_Epoch{x} + return true, err + case 2: // query_filter.genesis + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.QueryFilter = &GetValidatorParticipationRequest_Genesis{x != 0} + return true, err + default: + return false, nil + } +} + +func _GetValidatorParticipationRequest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*GetValidatorParticipationRequest) + // query_filter + switch x := m.QueryFilter.(type) { + case *GetValidatorParticipationRequest_Epoch: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Epoch)) + case *GetValidatorParticipationRequest_Genesis: + n += 1 // tag and wire + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type ValidatorParticipationResponse struct { + Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` + Finalized bool `protobuf:"varint,2,opt,name=finalized,proto3" json:"finalized,omitempty"` + Participation *ValidatorParticipation `protobuf:"bytes,3,opt,name=participation,proto3" json:"participation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ValidatorParticipationResponse) Reset() { *m = ValidatorParticipationResponse{} } +func (m *ValidatorParticipationResponse) String() string { return proto.CompactTextString(m) } +func (*ValidatorParticipationResponse) ProtoMessage() {} +func (*ValidatorParticipationResponse) Descriptor() ([]byte, []int) { return fileDescriptor_678c88b69c3c78d4, []int{15} } -func (m *ValidatorParticipation) XXX_Unmarshal(b []byte) error { +func (m *ValidatorParticipationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ValidatorParticipation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ValidatorParticipationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ValidatorParticipation.Marshal(b, m, deterministic) + return xxx_messageInfo_ValidatorParticipationResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -1592,51 +1790,37 @@ func (m *ValidatorParticipation) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *ValidatorParticipation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorParticipation.Merge(m, src) +func (m *ValidatorParticipationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorParticipationResponse.Merge(m, src) } -func (m *ValidatorParticipation) XXX_Size() int { +func (m *ValidatorParticipationResponse) XXX_Size() int { return m.Size() } -func (m *ValidatorParticipation) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorParticipation.DiscardUnknown(m) +func (m *ValidatorParticipationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorParticipationResponse.DiscardUnknown(m) } -var xxx_messageInfo_ValidatorParticipation proto.InternalMessageInfo +var xxx_messageInfo_ValidatorParticipationResponse proto.InternalMessageInfo -func (m *ValidatorParticipation) GetEpoch() uint64 { +func (m *ValidatorParticipationResponse) GetEpoch() uint64 { if m != nil { return m.Epoch } return 0 } -func (m *ValidatorParticipation) GetFinalized() bool { +func (m *ValidatorParticipationResponse) GetFinalized() bool { if m != nil { return m.Finalized } return false } -func (m *ValidatorParticipation) GetGlobalParticipationRate() float32 { +func (m *ValidatorParticipationResponse) GetParticipation() *ValidatorParticipation { if m != nil { - return m.GlobalParticipationRate + return m.Participation } - return 0 -} - -func (m *ValidatorParticipation) GetVotedEther() uint64 { - if m != nil { - return m.VotedEther - } - return 0 -} - -func (m *ValidatorParticipation) GetEligibleEther() uint64 { - if m != nil { - return m.EligibleEther - } - return 0 + return nil } type AttestationPoolResponse struct { @@ -1704,7 +1888,7 @@ func init() { proto.RegisterType((*ValidatorAssignments)(nil), "ethereum.eth.v1alpha1.ValidatorAssignments") proto.RegisterType((*ValidatorAssignments_CommitteeAssignment)(nil), "ethereum.eth.v1alpha1.ValidatorAssignments.CommitteeAssignment") proto.RegisterType((*GetValidatorParticipationRequest)(nil), "ethereum.eth.v1alpha1.GetValidatorParticipationRequest") - proto.RegisterType((*ValidatorParticipation)(nil), "ethereum.eth.v1alpha1.ValidatorParticipation") + proto.RegisterType((*ValidatorParticipationResponse)(nil), "ethereum.eth.v1alpha1.ValidatorParticipationResponse") proto.RegisterType((*AttestationPoolResponse)(nil), "ethereum.eth.v1alpha1.AttestationPoolResponse") } @@ -1713,109 +1897,108 @@ func init() { } var fileDescriptor_678c88b69c3c78d4 = []byte{ - // 1628 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1c, 0xc5, - 0x12, 0xcf, 0x78, 0xd7, 0x5f, 0xb5, 0xfe, 0x88, 0xdb, 0x5f, 0x9b, 0x71, 0x6c, 0x6f, 0xc6, 0xb1, - 0xdf, 0x46, 0x49, 0x76, 0x63, 0x27, 0x2f, 0x2f, 0x72, 0xf4, 0x94, 0x17, 0x5b, 0x79, 0x31, 0x10, - 0x21, 0x33, 0x89, 0x38, 0x70, 0x59, 0xf5, 0xce, 0xb6, 0x77, 0x3b, 0x9e, 0x9d, 0x9e, 0xcc, 0xf4, - 0x5a, 0xb1, 0x6f, 0x80, 0x84, 0xc4, 0x19, 0x09, 0xc4, 0x05, 0xb8, 0x22, 0xc4, 0x09, 0x89, 0x0b, - 0x17, 0x04, 0x17, 0x4e, 0x28, 0x12, 0x12, 0xc7, 0x08, 0x45, 0xfc, 0x05, 0xb9, 0x20, 0x6e, 0x68, - 0xba, 0x7b, 0x3e, 0x76, 0xbd, 0xb3, 0xbb, 0x48, 0x11, 0xb7, 0xe9, 0xea, 0xea, 0x5f, 0xfd, 0xba, - 0xaa, 0xba, 0xba, 0x7a, 0x60, 0xdd, 0xf5, 0x18, 0x67, 0x65, 0xc2, 0x1b, 0xe5, 0xa3, 0x4d, 0x6c, - 0xbb, 0x0d, 0xbc, 0x59, 0xae, 0x12, 0x6c, 0x31, 0xa7, 0x62, 0x35, 0x30, 0x75, 0x4a, 0x62, 0x1e, - 0xcd, 0x13, 0xde, 0x20, 0x1e, 0x69, 0x35, 0x4b, 0x84, 0x37, 0x4a, 0xa1, 0xa6, 0x7e, 0xb5, 0x4e, - 0x79, 0xa3, 0x55, 0x2d, 0x59, 0xac, 0x59, 0xae, 0xb3, 0x3a, 0x2b, 0x0b, 0xed, 0x6a, 0xeb, 0x40, - 0x8c, 0x24, 0x74, 0xf0, 0x25, 0x51, 0xf4, 0xf3, 0x75, 0xc6, 0xea, 0x36, 0x29, 0x63, 0x97, 0x96, - 0xb1, 0xe3, 0x30, 0x8e, 0x39, 0x65, 0x8e, 0xaf, 0x66, 0x97, 0xd4, 0x6c, 0x84, 0x41, 0x9a, 0x2e, - 0x3f, 0x56, 0x93, 0x17, 0xbb, 0xf0, 0xc4, 0x9c, 0x13, 0x5f, 0x62, 0x28, 0xad, 0x1e, 0xbb, 0xa9, - 0xda, 0xcc, 0x3a, 0x54, 0x6a, 0x46, 0x17, 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0x64, 0x8a, - 0xb9, 0x2d, 0xa3, 0xd4, 0x35, 0x8f, 0x4a, 0x09, 0x08, 0xb3, 0x6d, 0x1d, 0xda, 0x80, 0x69, 0x87, - 0x3c, 0xe5, 0x95, 0x04, 0xb1, 0x21, 0x41, 0x6c, 0x32, 0x10, 0xef, 0x87, 0xe4, 0x02, 0xee, 0x9c, - 0x71, 0x6c, 0xcb, 0x9d, 0x65, 0xc4, 0xce, 0xc6, 0x85, 0x24, 0xd8, 0x9a, 0xf1, 0xab, 0x06, 0x33, - 0x01, 0x57, 0x11, 0x99, 0x28, 0x8e, 0x73, 0x90, 0x6d, 0x0b, 0x9e, 0x18, 0x05, 0x52, 0xdf, 0x66, - 0x3c, 0x8a, 0x95, 0x18, 0xa1, 0x05, 0x18, 0x96, 0xae, 0xcf, 0x28, 0xb1, 0x1c, 0xa2, 0x4d, 0x98, - 0xa3, 0x8e, 0x65, 0xb7, 0x6a, 0xa4, 0xe2, 0x30, 0xc7, 0xc2, 0x0e, 0x73, 0xa8, 0x85, 0x6d, 0x11, - 0xa1, 0x31, 0x73, 0x56, 0xcd, 0xbd, 0x99, 0x98, 0x6a, 0x0f, 0xc2, 0x70, 0xcf, 0x20, 0x8c, 0xf4, - 0x0b, 0xc2, 0x27, 0x1a, 0xa0, 0xe4, 0xc6, 0x94, 0xfb, 0xb7, 0x61, 0x44, 0x24, 0x67, 0x3f, 0xc7, - 0xef, 0x88, 0xc3, 0x21, 0xf3, 0x55, 0xad, 0x78, 0x55, 0x2e, 0xff, 0x21, 0x03, 0xe3, 0xbb, 0x41, - 0x09, 0xd9, 0x23, 0xb8, 0x86, 0xae, 0x01, 0x74, 0x9e, 0x96, 0x9d, 0x99, 0x97, 0xcf, 0x57, 0x27, - 0x7d, 0xff, 0xe4, 0x6a, 0x00, 0xb0, 0x6d, 0x5c, 0xdf, 0x32, 0xcc, 0xf1, 0x6a, 0x74, 0x74, 0x96, - 0xc3, 0x15, 0x71, 0x30, 0xd4, 0xf4, 0x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 0x72, 0x2b, 0x41, 0xe3, 0x89, 0x30, 0xf3, 0xb5, 0xfa, 0xbd, 0xd1, 0xf5, 0x8e, - 0xbe, 0xd9, 0xe3, 0xe8, 0xf4, 0x68, 0x4b, 0xf4, 0xcb, 0x7f, 0xe3, 0xc2, 0x36, 0xae, 0x08, 0xa6, - 0x1b, 0xe8, 0x62, 0xba, 0xc3, 0x12, 0x94, 0xbe, 0xd1, 0xe0, 0x5c, 0xea, 0xa5, 0x85, 0xfe, 0x33, - 0x40, 0x84, 0xbb, 0x5d, 0x73, 0xfa, 0xd5, 0x7e, 0x8c, 0xdb, 0x56, 0xa5, 0x15, 0xaf, 0x04, 0xe7, - 0xb6, 0x8b, 0x6c, 0x67, 0xf7, 0xa7, 0x17, 0x2b, 0xda, 0xb3, 0x17, 0x2b, 0xda, 0x6f, 0x2f, 0x56, - 0xb4, 0x77, 0xfe, 0x9d, 0xf8, 0x9f, 0xe8, 0x7a, 0xc7, 0x7e, 0x13, 0x73, 0x6a, 0xd9, 0xb8, 0xea, - 0xcb, 0x51, 0xf9, 0xf4, 0x7f, 0xbb, 0xdb, 0x84, 0x37, 0xaa, 0x23, 0x42, 0x7e, 0xfd, 0xaf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xf0, 0x70, 0x21, 0xfc, 0xcd, 0x14, 0x00, 0x00, + // 1614 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x1b, 0xef, 0xc6, 0x76, 0x3e, 0x1e, 0xe7, 0xa3, 0x99, 0x24, 0xad, 0x5f, 0xa7, 0x49, 0xdc, 0x4d, + 0x93, 0xd7, 0x55, 0x5b, 0xbb, 0x49, 0x3f, 0xde, 0x57, 0xad, 0x5e, 0xf5, 0x6d, 0xa2, 0xd2, 0x00, + 0x15, 0x0a, 0x9b, 0x8a, 0x03, 0x17, 0x6b, 0xbc,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0x88, 0x82, 0xa1, 0xb6, 0xf7, 0xbc, 0x78, + 0xac, 0xc1, 0xf4, 0x3e, 0xb5, 0xb1, 0x45, 0x8f, 0x49, 0xc3, 0x67, 0x91, 0x81, 0x31, 0xa6, 0x42, + 0xaa, 0x64, 0xdb, 0x86, 0xf9, 0x88, 0x2d, 0x86, 0x20, 0x9b, 0x86, 0x00, 0x85, 0xec, 0x51, 0x15, + 0xaf, 0xc1, 0xf4, 0xa3, 0x0e, 0x17, 0x74, 0x9f, 0x06, 0xba, 0x72, 0xbe, 0xae, 0x90, 0x1a, 0xe8, + 0x8a, 0xd8, 0x62, 0xba, 0x46, 0x53, 0x75, 0x85, 0xec, 0x91, 0xae, 0x9b, 0x70, 0xd6, 0x71, 0xc9, + 0x21, 0x65, 0x1d, 0x5e, 0xeb, 0x51, 0x3a, 0x26, 0x95, 0x2e, 0x04, 0xdb, 0x6f, 0x74, 0x29, 0x7f, + 0x08, 0x4b, 0x09, 0xe7, 0x62, 0x28, 0xc6, 0xd3, 0x50, 0x14, 0x4f, 0x08, 0x0c, 0xd1, 0xe8, 0xdf, + 0x68, 0xb0, 0x78, 0x9f, 0x88, 0x77, 0x82, 0xe6, 0xb8, 0x85, 0x2d, 0x6c, 0x9b, 0x24, 0xac, 0xa0, + 0xb0, 0x2a, 0xb4, 0xee, 0xaa, 0x28, 0xc2, 0x58, 0x93, 0xd8, 0x84, 0x53, 0x2e, 0x23, 0x37, 0xbe, + 0x73, 0xca, 0x08, 0x08, 0xe8, 0x3a, 0xe4, 0x9d, 0x4e, 0xdd, 0xa2, 0x66, 0xed, 0x80, 0x1c, 0xf1, + 0x42, 0xa6, 0x94, 0x29, 0x4f, 0x6e, 0xcd, 0xbd, 0x78, 0xb6, 0x32, 0x13, 0xe1, 0xba, 0x73, 0xf9, + 0xfa, 0x7f, 0x75, 0x03, 0x7c, 0xbe, 0x37, 0xc9, 0x11, 0x47, 0x05, 0x18, 0xa3, 0x76, 0x83, 0x9a, + 0x84, 0x17,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xa4, 0x78, 0xe9, 0x25, 0xee, 0x6d, + 0xfd, 0xb2, 0x44, 0xba, 0x8e, 0x2e, 0xa4, 0x3b, 0x2c, 0x06, 0xe9, 0xa9, 0x06, 0xff, 0x4a, 0xbd, + 0xbb, 0xd0, 0x7f, 0x86, 0x88, 0x70, 0xd2, 0x6d, 0x57, 0xbc, 0xf1, 0x72, 0x77, 0xc7, 0x80, 0x26, + 0x16, 0xc3, 0xde, 0x75, 0xc9, 0x6c, 0x6d, 0xff, 0xf8, 0x7c, 0x59, 0xfb, 0xf9, 0xf9, 0xb2, 0xf6, + 0xdb, 0xf3, 0x65, 0xed, 0xdd, 0x1b, 0xb1, 0xdf, 0x95, 0x8e, 0x7b, 0xc4, 0xdb, 0x58, 0x50, 0xd3, + 0xc2, 0x75, 0xee, 0xaf, 0xaa, 0x27, 0x7f, 0xfa, 0xdd, 0x26, 0xa2, 0x55, 0x1f, 0x95, 0xf4, 0x6b, + 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x61, 0x89, 0xf1, 0xea, 0x2c, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1839,7 +2022,7 @@ type BeaconChainClient interface { GetValidatorActiveSetChanges(ctx context.Context, in *GetValidatorActiveSetChangesRequest, opts ...grpc.CallOption) (*ActiveSetChanges, error) GetValidatorQueue(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ValidatorQueue, error) ListValidatorAssignments(ctx context.Context, in *ListValidatorAssignmentsRequest, opts ...grpc.CallOption) (*ValidatorAssignments, error) - GetValidatorParticipation(ctx context.Context, in *GetValidatorParticipationRequest, opts ...grpc.CallOption) (*ValidatorParticipation, error) + GetValidatorParticipation(ctx context.Context, in *GetValidatorParticipationRequest, opts ...grpc.CallOption) (*ValidatorParticipationResponse, error) } type beaconChainClient struct { @@ -1931,8 +2114,8 @@ func (c *beaconChainClient) ListValidatorAssignments(ctx context.Context, in *Li return out, nil } -func (c *beaconChainClient) GetValidatorParticipation(ctx context.Context, in *GetValidatorParticipationRequest, opts ...grpc.CallOption) (*ValidatorParticipation, error) { - out := new(ValidatorParticipation) +func (c *beaconChainClient) GetValidatorParticipation(ctx context.Context, in *GetValidatorParticipationRequest, opts ...grpc.CallOption) (*ValidatorParticipationResponse, error) { + out := new(ValidatorParticipationResponse) err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/GetValidatorParticipation", in, out, opts...) if err != nil { return nil, err @@ -1951,7 +2134,7 @@ type BeaconChainServer interface { GetValidatorActiveSetChanges(context.Context, *GetValidatorActiveSetChangesRequest) (*ActiveSetChanges, error) GetValidatorQueue(context.Context, *types.Empty) (*ValidatorQueue, error) ListValidatorAssignments(context.Context, *ListValidatorAssignmentsRequest) (*ValidatorAssignments, error) - GetValidatorParticipation(context.Context, *GetValidatorParticipationRequest) (*ValidatorParticipation, error) + GetValidatorParticipation(context.Context, *GetValidatorParticipationRequest) (*ValidatorParticipationResponse, error) } func RegisterBeaconChainServer(s *grpc.Server, srv BeaconChainServer) { @@ -2511,35 +2694,37 @@ func (m *GetValidatorBalancesRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) + if m.QueryFilter != nil { + nn3, err := m.QueryFilter.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn3 } if len(m.PublicKeys) > 0 { for _, b := range m.PublicKeys { - dAtA[i] = 0x12 + dAtA[i] = 0x1a i++ i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) i += copy(dAtA[i:], b) } } if len(m.Indices) > 0 { - dAtA4 := make([]byte, len(m.Indices)*10) - var j3 int + dAtA5 := make([]byte, len(m.Indices)*10) + var j4 int for _, num := range m.Indices { for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j4++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA5[j4] = uint8(num) + j4++ } - dAtA[i] = 0x1a + dAtA[i] = 0x22 i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(j3)) - i += copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintBeaconChain(dAtA, i, uint64(j4)) + i += copy(dAtA[i:], dAtA5[:j4]) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -2547,6 +2732,25 @@ func (m *GetValidatorBalancesRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *GetValidatorBalancesRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) + return i, nil +} +func (m *GetValidatorBalancesRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x10 + i++ + if m.Genesis { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} func (m *ValidatorBalances) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2633,11 +2837,11 @@ func (m *GetValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.QueryFilter != nil { - nn5, err := m.QueryFilter.MarshalTo(dAtA[i:]) + nn6, err := m.QueryFilter.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn5 + i += nn6 } if m.PageSize != 0 { dAtA[i] = 0x18 @@ -2871,21 +3075,21 @@ func (m *ListValidatorAssignmentsRequest) MarshalTo(dAtA []byte) (int, error) { } } if len(m.Indices) > 0 { - dAtA7 := make([]byte, len(m.Indices)*10) - var j6 int + dAtA8 := make([]byte, len(m.Indices)*10) + var j7 int for _, num := range m.Indices { for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) + dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j6++ + j7++ } - dAtA7[j6] = uint8(num) - j6++ + dAtA8[j7] = uint8(num) + j7++ } dAtA[i] = 0x1a i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(j6)) - i += copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintBeaconChain(dAtA, i, uint64(j7)) + i += copy(dAtA[i:], dAtA8[:j7]) } if m.PageSize != 0 { dAtA[i] = 0x20 @@ -2969,21 +3173,21 @@ func (m *ValidatorAssignments_CommitteeAssignment) MarshalTo(dAtA []byte) (int, var l int _ = l if len(m.CrosslinkCommittees) > 0 { - dAtA9 := make([]byte, len(m.CrosslinkCommittees)*10) - var j8 int + dAtA10 := make([]byte, len(m.CrosslinkCommittees)*10) + var j9 int for _, num := range m.CrosslinkCommittees { for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j8++ + j9++ } - dAtA9[j8] = uint8(num) - j8++ + dAtA10[j9] = uint8(num) + j9++ } dAtA[i] = 0xa i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(j8)) - i += copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintBeaconChain(dAtA, i, uint64(j9)) + i += copy(dAtA[i:], dAtA10[:j9]) } if m.Shard != 0 { dAtA[i] = 0x10 @@ -3032,10 +3236,12 @@ func (m *GetValidatorParticipationRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) + if m.QueryFilter != nil { + nn11, err := m.QueryFilter.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn11 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -3043,7 +3249,26 @@ func (m *GetValidatorParticipationRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ValidatorParticipation) Marshal() (dAtA []byte, err error) { +func (m *GetValidatorParticipationRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) + return i, nil +} +func (m *GetValidatorParticipationRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x10 + i++ + if m.Genesis { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *ValidatorParticipationResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -3053,7 +3278,7 @@ func (m *ValidatorParticipation) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatorParticipation) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatorParticipationResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -3073,21 +3298,15 @@ func (m *ValidatorParticipation) MarshalTo(dAtA []byte) (int, error) { } i++ } - if m.GlobalParticipationRate != 0 { - dAtA[i] = 0x1d + if m.Participation != nil { + dAtA[i] = 0x1a i++ - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.GlobalParticipationRate)))) - i += 4 - } - if m.VotedEther != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.VotedEther)) - } - if m.EligibleEther != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.EligibleEther)) + i = encodeVarintBeaconChain(dAtA, i, uint64(m.Participation.Size())) + n12, err := m.Participation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -3364,8 +3583,8 @@ func (m *GetValidatorBalancesRequest) Size() (n int) { } var l int _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) + if m.QueryFilter != nil { + n += m.QueryFilter.Size() } if len(m.PublicKeys) > 0 { for _, b := range m.PublicKeys { @@ -3386,6 +3605,24 @@ func (m *GetValidatorBalancesRequest) Size() (n int) { return n } +func (m *GetValidatorBalancesRequest_Epoch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovBeaconChain(uint64(m.Epoch)) + return n +} +func (m *GetValidatorBalancesRequest_Genesis) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} func (m *ValidatorBalances) Size() (n int) { if m == nil { return 0 @@ -3670,8 +3907,8 @@ func (m *GetValidatorParticipationRequest) Size() (n int) { } var l int _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) + if m.QueryFilter != nil { + n += m.QueryFilter.Size() } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -3679,7 +3916,25 @@ func (m *GetValidatorParticipationRequest) Size() (n int) { return n } -func (m *ValidatorParticipation) Size() (n int) { +func (m *GetValidatorParticipationRequest_Epoch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovBeaconChain(uint64(m.Epoch)) + return n +} +func (m *GetValidatorParticipationRequest_Genesis) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *ValidatorParticipationResponse) Size() (n int) { if m == nil { return 0 } @@ -3691,14 +3946,9 @@ func (m *ValidatorParticipation) Size() (n int) { if m.Finalized { n += 2 } - if m.GlobalParticipationRate != 0 { - n += 5 - } - if m.VotedEther != 0 { - n += 1 + sovBeaconChain(uint64(m.VotedEther)) - } - if m.EligibleEther != 0 { - n += 1 + sovBeaconChain(uint64(m.EligibleEther)) + if m.Participation != nil { + l = m.Participation.Size() + n += 1 + l + sovBeaconChain(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -4756,7 +5006,7 @@ func (m *GetValidatorBalancesRequest) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) } - m.Epoch = 0 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowBeaconChain @@ -4766,12 +5016,34 @@ func (m *GetValidatorBalancesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } + m.QueryFilter = &GetValidatorBalancesRequest_Epoch{v} case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBeaconChain + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.QueryFilter = &GetValidatorBalancesRequest_Genesis{b} + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType) } @@ -4803,7 +5075,7 @@ func (m *GetValidatorBalancesRequest) Unmarshal(dAtA []byte) error { m.PublicKeys = append(m.PublicKeys, make([]byte, postIndex-iNdEx)) copy(m.PublicKeys[len(m.PublicKeys)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { @@ -6446,7 +6718,7 @@ func (m *GetValidatorParticipationRequest) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) } - m.Epoch = 0 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowBeaconChain @@ -6456,11 +6728,33 @@ func (m *GetValidatorParticipationRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } + m.QueryFilter = &GetValidatorParticipationRequest_Epoch{v} + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBeaconChain + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.QueryFilter = &GetValidatorParticipationRequest_Genesis{b} default: iNdEx = preIndex skippy, err := skipBeaconChain(dAtA[iNdEx:]) @@ -6486,7 +6780,7 @@ func (m *GetValidatorParticipationRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValidatorParticipation) Unmarshal(dAtA []byte) error { +func (m *ValidatorParticipationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6509,10 +6803,10 @@ func (m *ValidatorParticipation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ValidatorParticipation: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatorParticipationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorParticipation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatorParticipationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6555,54 +6849,41 @@ func (m *ValidatorParticipation) Unmarshal(dAtA []byte) error { } m.Finalized = bool(v != 0) case 3: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalParticipationRate", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Participation", wireType) } - var v uint32 - if (iNdEx + 4) > l { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBeaconChain + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBeaconChain + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBeaconChain + } + if postIndex > l { return io.ErrUnexpectedEOF } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.GlobalParticipationRate = float32(math.Float32frombits(v)) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotedEther", wireType) + if m.Participation == nil { + m.Participation = &ValidatorParticipation{} } - m.VotedEther = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotedEther |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EligibleEther", wireType) - } - m.EligibleEther = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EligibleEther |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Participation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipBeaconChain(dAtA[iNdEx:]) diff --git a/proto/eth/v1alpha1/beacon_chain.proto b/proto/eth/v1alpha1/beacon_chain.proto index 9065f95c68..b0920446fc 100644 --- a/proto/eth/v1alpha1/beacon_chain.proto +++ b/proto/eth/v1alpha1/beacon_chain.proto @@ -6,6 +6,7 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; +import "proto/eth/v1alpha1/archive.proto"; import "proto/eth/v1alpha1/attestation.proto"; import "proto/eth/v1alpha1/beacon_block.proto"; import "proto/eth/v1alpha1/validator.proto"; @@ -118,7 +119,7 @@ service BeaconChain { // // This method returns information about the global participation of // validator attestations. - rpc GetValidatorParticipation(GetValidatorParticipationRequest) returns (ValidatorParticipation) { + rpc GetValidatorParticipation(GetValidatorParticipationRequest) returns (ValidatorParticipationResponse) { option (google.api.http) = { get: "/eth/v1alpha1/validators/participation" }; @@ -238,15 +239,19 @@ message ChainHead { } message GetValidatorBalancesRequest { - // Retrieve validator balance at the given epoch. - uint64 epoch = 1; + oneof query_filter { + // Optional criteria to retrieve balances at a specific epoch. + uint64 epoch = 1; + // Optional criteria to retrieve the genesis list of balances. + bool genesis = 2; + } // Validator 48 byte BLS public keys to filter validators for the given // epoch. - repeated bytes public_keys = 2 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + repeated bytes public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; // Validator indices to filter validators for the given epoch. - repeated uint64 indices = 3; + repeated uint64 indices = 4; } message ValidatorBalances { @@ -398,26 +403,24 @@ message ValidatorAssignments { } message GetValidatorParticipationRequest { - // Epoch to request participation information. - uint64 epoch = 1; + oneof query_filter { + // Epoch to request participation information. + uint64 epoch = 1; + + // Whether or not to query for the genesis information. + bool genesis = 2; + } } -message ValidatorParticipation { +message ValidatorParticipationResponse { // Epoch which this message is applicable. uint64 epoch = 1; // Whether or not epoch has been finalized. bool finalized = 2; - // Percentage of validator participation in the given epoch. This field - // contains a value between 0 and 1. - float global_participation_rate = 3; - - // The total amount of ether, in gwei, that has been used in voting. - uint64 voted_ether = 4; - - // The total amount of ether, in gwei, that is eligible for voting. - uint64 eligible_ether = 5; + // The actual participation metrics. + ValidatorParticipation participation = 3; } message AttestationPoolResponse { diff --git a/proto/eth/v1alpha1/node.pb.go b/proto/eth/v1alpha1/node.pb.go index 647805e30f..2ba95ac9b4 100755 --- a/proto/eth/v1alpha1/node.pb.go +++ b/proto/eth/v1alpha1/node.pb.go @@ -6,13 +6,12 @@ package eth import ( context "context" fmt "fmt" - io "io" - math "math" - proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/eth/v1alpha1/slasher.pb.go b/proto/eth/v1alpha1/slasher.pb.go index e5c5d821ea..b3c643713d 100755 --- a/proto/eth/v1alpha1/slasher.pb.go +++ b/proto/eth/v1alpha1/slasher.pb.go @@ -6,11 +6,10 @@ package eth import ( context "context" fmt "fmt" - math "math" - proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/eth/v1alpha1/validator.pb.go b/proto/eth/v1alpha1/validator.pb.go index 1ed6f5045d..160093ed7a 100755 --- a/proto/eth/v1alpha1/validator.pb.go +++ b/proto/eth/v1alpha1/validator.pb.go @@ -5,15 +5,15 @@ package eth import ( context "context" + encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -421,6 +421,69 @@ func (m *Validator) GetWithdrawableEpoch() uint64 { return 0 } +type ValidatorParticipation struct { + GlobalParticipationRate float32 `protobuf:"fixed32,1,opt,name=global_participation_rate,json=globalParticipationRate,proto3" json:"global_participation_rate,omitempty"` + VotedEther uint64 `protobuf:"varint,2,opt,name=voted_ether,json=votedEther,proto3" json:"voted_ether,omitempty"` + EligibleEther uint64 `protobuf:"varint,3,opt,name=eligible_ether,json=eligibleEther,proto3" json:"eligible_ether,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ValidatorParticipation) Reset() { *m = ValidatorParticipation{} } +func (m *ValidatorParticipation) String() string { return proto.CompactTextString(m) } +func (*ValidatorParticipation) ProtoMessage() {} +func (*ValidatorParticipation) Descriptor() ([]byte, []int) { + return fileDescriptor_86a2b3961d336368, []int{5} +} +func (m *ValidatorParticipation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorParticipation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorParticipation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorParticipation) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorParticipation.Merge(m, src) +} +func (m *ValidatorParticipation) XXX_Size() int { + return m.Size() +} +func (m *ValidatorParticipation) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorParticipation.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorParticipation proto.InternalMessageInfo + +func (m *ValidatorParticipation) GetGlobalParticipationRate() float32 { + if m != nil { + return m.GlobalParticipationRate + } + return 0 +} + +func (m *ValidatorParticipation) GetVotedEther() uint64 { + if m != nil { + return m.VotedEther + } + return 0 +} + +func (m *ValidatorParticipation) GetEligibleEther() uint64 { + if m != nil { + return m.EligibleEther + } + return 0 +} + func init() { proto.RegisterType((*DutiesRequest)(nil), "ethereum.eth.v1alpha1.DutiesRequest") proto.RegisterType((*DutiesResponse)(nil), "ethereum.eth.v1alpha1.DutiesResponse") @@ -428,66 +491,72 @@ func init() { proto.RegisterType((*BlockRequest)(nil), "ethereum.eth.v1alpha1.BlockRequest") proto.RegisterType((*AttestationDataRequest)(nil), "ethereum.eth.v1alpha1.AttestationDataRequest") proto.RegisterType((*Validator)(nil), "ethereum.eth.v1alpha1.Validator") + proto.RegisterType((*ValidatorParticipation)(nil), "ethereum.eth.v1alpha1.ValidatorParticipation") } func init() { proto.RegisterFile("proto/eth/v1alpha1/validator.proto", fileDescriptor_86a2b3961d336368) } var fileDescriptor_86a2b3961d336368 = []byte{ - // 863 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0x97, 0x37, 0x7f, 0x9a, 0xbc, 0x6e, 0x28, 0x99, 0xa4, 0xd1, 0x6a, 0x69, 0x93, 0xd5, 0x34, - 0xa9, 0x02, 0x65, 0x6d, 0x9a, 0x16, 0x84, 0xca, 0x01, 0xd8, 0x34, 0x0a, 0x12, 0x12, 0xa0, 0xad, - 0xc4, 0xa1, 0x1c, 0xac, 0xb1, 0xfd, 0x76, 0x3d, 0xca, 0xac, 0xc7, 0xf5, 0xcc, 0xa6, 0x6c, 0x24, - 0x24, 0xc4, 0x57, 0xe0, 0x00, 0x07, 0x2e, 0x7c, 0x13, 0x8e, 0x1c, 0x91, 0xb8, 0x47, 0x28, 0xe2, - 0x13, 0xe4, 0x13, 0x20, 0xcf, 0xd8, 0xb1, 0x43, 0x77, 0x95, 0xbd, 0x79, 0xde, 0xfb, 0xcd, 0xef, - 0xfd, 0xe6, 0xcd, 0xfc, 0x9e, 0x81, 0xa6, 0x99, 0xd4, 0xd2, 0x43, 0x1d, 0x7b, 0xa7, 0x8f, 0x99, - 0x48, 0x63, 0xf6, 0xd8, 0x3b, 0x65, 0x82, 0x47, 0x4c, 0xcb, 0xcc, 0x35, 0x49, 0x72, 0x17, 0x75, - 0x8c, 0x19, 0x8e, 0x47, 0x2e, 0xea, 0xd8, 0x2d, 0x61, 0xed, 0xee, 0x90, 0xeb, 0x78, 0x1c, 0xb8, - 0xa1, 0x1c, 0x79, 0x43, 0x39, 0x94, 0x9e, 0x41, 0x07, 0xe3, 0x81, 0x59, 0x59, 0xde, 0xfc, 0xcb, - 0xb2, 0xb4, 0xef, 0x0d, 0xa5, 0x1c, 0x0a, 0xf4, 0x58, 0xca, 0x3d, 0x96, 0x24, 0x52, 0x33, 0xcd, - 0x65, 0xa2, 0x8a, 0xec, 0x3b, 0x45, 0xf6, 0x8a, 0x03, 0x47, 0xa9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0x92, 0xe4, 0x15, 0x34, - 0xad, 0x2d, 0xd1, 0xd6, 0x9f, 0x83, 0xba, 0xbd, 0xe5, 0xda, 0xe1, 0xec, 0x96, 0xc3, 0xd9, 0x3d, - 0xca, 0x87, 0x73, 0x59, 0x92, 0xde, 0x50, 0xf2, 0x57, 0x07, 0xc8, 0x31, 0xea, 0xff, 0x39, 0x94, - 0x74, 0x67, 0x54, 0x9e, 0xee, 0xe4, 0xf6, 0xc3, 0xf9, 0xe0, 0xf4, 0x91, 0x11, 0xb5, 0x47, 0x1e, - 0xcc, 0x12, 0x55, 0x9b, 0x64, 0xe4, 0x07, 0x20, 0x45, 0x37, 0x6a, 0x34, 0x33, 0x7b, 0x52, 0xc3, - 0xcc, 0xec, 0x49, 0x51, 0x9e, 0xce, 0x53, 0xbe, 0x77, 0xf8, 0xe7, 0xc5, 0xb6, 0xf3, 0xd7, 0xc5, - 0xb6, 0xf3, 0xcf, 0xc5, 0xb6, 0xf3, 0xf2, 0xc3, 0xda, 0xff, 0x34, 0xcd, 0x26, 0x6a, 0xc4, 0x34, - 0x0f, 0x05, 0x0b, 0x94, 0x5d, 0x79, 0x6f, 0xfe, 0xdd, 0x3e, 0x41, 0x1d, 0x07, 0xcb, 0x26, 0xfe, - 0xe4, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0x0f, 0xd1, 0x2d, 0xca, 0x07, 0x00, 0x00, + // 935 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xb5, 0x4e, 0xd2, 0x26, 0x13, 0xa7, 0x25, 0x93, 0x34, 0x18, 0xd3, 0x26, 0xd6, 0x36, + 0xae, 0x02, 0xc5, 0xbb, 0x34, 0x2d, 0x08, 0x85, 0x03, 0xe0, 0x34, 0x0a, 0x12, 0x12, 0x54, 0x5b, + 0x89, 0x43, 0x39, 0xac, 0x66, 0x77, 0x9f, 0xbd, 0xa3, 0x8c, 0x3d, 0xdb, 0x9d, 0xb1, 0x8b, 0x23, + 0x21, 0x21, 0xbe, 0x02, 0x07, 0x38, 0xf4, 0xc2, 0x37, 0xe1, 0xc8, 0x11, 0x89, 0x7b, 0x84, 0x22, + 0x3e, 0x41, 0x3e, 0x01, 0xda, 0x37, 0xbb, 0xde, 0x35, 0xd8, 0x6a, 0x6e, 0x3b, 0xef, 0xfd, 0xe6, + 0xbd, 0xff, 0xbe, 0x79, 0xf3, 0x86, 0xd8, 0x49, 0x2a, 0xb5, 0x74, 0x41, 0xc7, 0xee, 0xf8, 0x11, + 0x13, 0x49, 0xcc, 0x1e, 0xb9, 0x63, 0x26, 0x78, 0xc4, 0xb4, 0x4c, 0x1d, 0x74, 0xd2, 0x3b, 0xa0, + 0x63, 0x48, 0x61, 0x34, 0x70, 0x40, 0xc7, 0x4e, 0x81, 0x35, 0x3b, 0x7d, 0xae, 0xe3, 0x51, 0xe0, + 0x84, 0x72, 0xe0, 0xf6, 0x65, 0x5f, 0xba, 0x48, 0x07, 0xa3, 0x1e, 0xae, 0x4c, 0xdc, 0xec, 0xcb, + 0x44, 0x69, 0xde, 0xed, 0x4b, 0xd9, 0x17, 0xe0, 0xb2, 0x84, 0xbb, 0x6c, 0x38, 0x94, 0x9a, 0x69, + 0x2e, 0x87, 0x2a, 0xf7, 0xbe, 0x9b, 0x7b, 0xa7, 0x31, 0x60, 0x90, 0xe8, 0x49, 0xee, 0x6c, 0xcf, + 0x11, 0x19, 0x00, 0x0b, 0xe5, 0xd0, 0x0f, 0x84, 0x0c, 0xcf, 0x72, 0x6c, 0x7f, 0x0e, 0xc6, 0xb4, + 0x06, 0x65, 0x52, 0x19, 0xca, 0xfe, 0x8e, 0x6c, 0x3c, 0x1d, 0x69, 0x0e, 0xca, 0x83, 0x97, 0x23, + 0x50, 0x9a, 0x6e, 0x93, 0x15, 0x48, 0x64, 0x18, 0x37, 0xac, 0x96, 0x75, 0xb0, 0xec, 0x99, 0x05, + 0x7d, 0x42, 0xd6, 0x93, 0x51, 0x20, 0x78, 0xe8, 0x9f, 0xc1, 0x44, 0x35, 0x6a, 0xad, 0xa5, 0x83, + 0x7a, 0x77, 0xeb, 0xea, 0x62, 0xef, 0xb6, 0x52, 0xe7, 0x1d, 0xc5, 0xcf, 0xe1, 0xc8, 0xfe, 0xec, + 0x83, 0x27, 0x9f, 0xd8, 0x1e, 0x31, 0xdc, 0x57, 0x30, 0x51, 0xf6, 0x2f, 0x35, 0x72, 0xab, 0x88, + 0xae, 0x12, 0x39, 0x54, 0x40, 0xbb, 0xe4, 0x46, 0x84, 0x96, 0x86, 0xd5, 0x5a, 0x3a, 0x58, 0x3f, + 0x7c, 0xdf, 0x99, 0x5b, 0x4e, 0x67, 0x76, 0x5b, 0xb6, 0x9c, 0x78, 0xf9, 0xce, 0xe6, 0xef, 0x16, + 0x59, 0xce, 0x0c, 0xf4, 0x43, 0x42, 0x4a, 0x55, 0x28, 0xb8, 0xde, 0xdd, 0xbc, 0xba, 0xd8, 0xdb, + 0x28, 0x45, 0x65, 0x92, 0xd6, 0xa6, 0x92, 0xe8, 0x7b, 0xe4, 0xad, 0x4a, 0x0d, 0x7c, 0x25, 0xa4, + 0x6e, 0xd4, 0xf0, 0x47, 0x6f, 0x57, 0xec, 0xcf, 0x85, 0xd4, 0xf4, 0x21, 0xd9, 0x9c, 0x41, 0x63, + 0x96, 0x46, 0x8d, 0x25, 0x64, 0xab, 0x31, 0x9e, 0x67, 0x76, 0xea, 0x90, 0x2d, 0xac, 0xbd, 0x9f, + 0xa4, 0x32, 0x91, 0x8a, 0x09, 0x13, 0x7a, 0x19, 0xf1, 0x4d, 0x74, 0x3d, 0xcb, 0x3d, 0x59, 0x70, + 0xfb, 0x05, 0xa9, 0x77, 0x33, 0x63, 0x51, 0x75, 0x4a, 0x96, 0x71, 0x83, 0x29, 0x3a, 0x7e, 0xd3, + 0x8f, 0xc9, 0x46, 0xca,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0xab, 0xdc, 0xb4, 0x17, 0x41, 0xf8, 0x7f, 0x88, 0xda, 0x6d, 0x4c, 0xbe, 0x47, 0xef, 0x2d, + 0x4a, 0x8e, 0x13, 0x83, 0xbe, 0x24, 0x75, 0x33, 0x35, 0xc0, 0xe4, 0xbf, 0x46, 0xe8, 0xe6, 0x8e, + 0x63, 0xde, 0x0e, 0xa7, 0x78, 0x3b, 0x9c, 0x93, 0xec, 0xed, 0x28, 0x52, 0xda, 0x6f, 0x48, 0xf9, + 0xab, 0x45, 0xe8, 0x29, 0xe8, 0xff, 0x0c, 0x10, 0xda, 0x59, 0x90, 0x79, 0xfe, 0xa0, 0x69, 0x3e, + 0xb8, 0x1e, 0x6e, 0x3f, 0x44, 0x51, 0x6d, 0x7a, 0x7f, 0x91, 0xa8, 0xca, 0xa0, 0xa5, 0x3f, 0x10, + 0x9a, 0x57, 0xa3, 0x12, 0x66, 0x61, 0x4d, 0x2a, 0xcc, 0xc2, 0x9a, 0xe4, 0xe9, 0xed, 0xeb, 0xa4, + 0xef, 0x1e, 0xff, 0x71, 0xb9, 0x6b, 0xfd, 0x79, 0xb9, 0x6b, 0xfd, 0x7d, 0xb9, 0x6b, 0xbd, 0xf8, + 0xa8, 0xf2, 0xdc, 0x27, 0xe9, 0x44, 0x0d, 0x98, 0xe6, 0xa1, 0x60, 0x81, 0x32, 0x2b, 0xf7, 0xff, + 0x8f, 0xef, 0xa7, 0xa0, 0xe3, 0xe0, 0x06, 0xda, 0x1f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3a, + 0xed, 0xda, 0x36, 0x69, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -940,6 +1009,43 @@ func (m *Validator) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ValidatorParticipation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorParticipation) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.GlobalParticipationRate != 0 { + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.GlobalParticipationRate)))) + i += 4 + } + if m.VotedEther != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintValidator(dAtA, i, uint64(m.VotedEther)) + } + if m.EligibleEther != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintValidator(dAtA, i, uint64(m.EligibleEther)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -1092,6 +1198,27 @@ func (m *Validator) Size() (n int) { return n } +func (m *ValidatorParticipation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GlobalParticipationRate != 0 { + n += 5 + } + if m.VotedEther != 0 { + n += 1 + sovValidator(uint64(m.VotedEther)) + } + if m.EligibleEther != 0 { + n += 1 + sovValidator(uint64(m.EligibleEther)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func sovValidator(x uint64) (n int) { for { n++ @@ -1913,6 +2040,109 @@ func (m *Validator) Unmarshal(dAtA []byte) error { } return nil } +func (m *ValidatorParticipation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorParticipation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorParticipation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalParticipationRate", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.GlobalParticipationRate = float32(math.Float32frombits(v)) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VotedEther", wireType) + } + m.VotedEther = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VotedEther |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EligibleEther", wireType) + } + m.EligibleEther = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EligibleEther |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipValidator(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/proto/eth/v1alpha1/validator.proto b/proto/eth/v1alpha1/validator.proto index 070345a9f2..8498cfea55 100644 --- a/proto/eth/v1alpha1/validator.proto +++ b/proto/eth/v1alpha1/validator.proto @@ -145,3 +145,17 @@ message Validator { // may be zero if the validator has not exited. uint64 withdrawable_epoch = 8; } + +// ValidatorParticipation stores participation metrics during a given epoch. +message ValidatorParticipation { + // Percentage of validator participation in the given epoch. This field + // contains a value between 0 and 1. + float global_participation_rate = 1; + + // The total amount of ether, in gwei, that has been used in voting. + uint64 voted_ether = 2; + + // The total amount of ether, in gwei, that is eligible for voting. + uint64 eligible_ether = 3; +} + diff --git a/proto/sharding/p2p/v1/messages.pb.go b/proto/sharding/p2p/v1/messages.pb.go index 61228b93de..ba268c5f4b 100644 --- a/proto/sharding/p2p/v1/messages.pb.go +++ b/proto/sharding/p2p/v1/messages.pb.go @@ -5,10 +5,9 @@ package ethereum_sharding_p2p_v1 import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" io "io" math "math" - - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/tools/forkchecker/forkchecker.go b/tools/forkchecker/forkchecker.go index 302d880d83..f5d96e050f 100644 --- a/tools/forkchecker/forkchecker.go +++ b/tools/forkchecker/forkchecker.go @@ -95,7 +95,7 @@ func compareHeads(clients map[string]pb.BeaconChainClient) { if err != nil { log.Fatal(err) } - logParticipation(endpt1, p) + logParticipation(endpt1, p.Participation) } for endpt2, client := range clients { @@ -113,7 +113,7 @@ func compareHeads(clients map[string]pb.BeaconChainClient) { if err != nil { log.Fatal(err) } - logParticipation(endpt2, p) + logParticipation(endpt2, p.Participation) } } } @@ -134,8 +134,6 @@ func logHead(endpt string, head *pb.ChainHead) { func logParticipation(endpt string, p *pb.ValidatorParticipation) { log.WithFields( logrus.Fields{ - "Finalized": p.Finalized, - "Epoch": p.Epoch, "VotedEther": p.VotedEther, "TotalEther": p.EligibleEther, "ParticipationRate": p.GlobalParticipationRate,