V2 Prysm Proto Definitions (#9062)

* begin v2 prysm protos

* define

* v2 protos build

* add in generated files

* imports

* do not modify v1alpha1

* revert imports

* use alias pattern

* attempt alias

* attempt new fastssz

* edit

* versioning all works

* edit protos

* edit terms

* edit to reflect proto versioning

* fix more build issues

* beacon chain builds

* beacon chain and shared packages build

* begin helping validator client build

* define protos

* gaz

* build

* tidy check

* gazelle

* revert
This commit is contained in:
Raul Jordan
2021-06-23 11:27:06 -05:00
committed by GitHub
parent b4a0e4375a
commit 719a5fca02
104 changed files with 4964 additions and 4467 deletions

View File

@@ -24,14 +24,14 @@ func TestSyncCommitteeCache_CanUpdateAndRetrieve(t *testing.T) {
currentSyncCommittee: convertToCommittee([][]byte{{1}, {2}, {3}, {2}, {2}}),
nextSyncCommittee: convertToCommittee([][]byte{}),
currentSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {0},
[48]byte{2}: {1, 3, 4},
[48]byte{3}: {2},
{1}: {0},
{2}: {1, 3, 4},
{3}: {2},
},
nextSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {},
[48]byte{2}: {},
[48]byte{3}: {},
{1}: {},
{2}: {},
{3}: {},
},
},
{
@@ -39,14 +39,14 @@ func TestSyncCommitteeCache_CanUpdateAndRetrieve(t *testing.T) {
currentSyncCommittee: convertToCommittee([][]byte{}),
nextSyncCommittee: convertToCommittee([][]byte{{1}, {2}, {3}, {2}, {2}}),
currentSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {},
[48]byte{2}: {},
[48]byte{3}: {},
{1}: {},
{2}: {},
{3}: {},
},
nextSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {0},
[48]byte{2}: {1, 3, 4},
[48]byte{3}: {2},
{1}: {0},
{2}: {1, 3, 4},
{3}: {2},
},
},
{
@@ -54,15 +54,15 @@ func TestSyncCommitteeCache_CanUpdateAndRetrieve(t *testing.T) {
currentSyncCommittee: convertToCommittee([][]byte{{1}, {2}, {3}, {2}, {2}}),
nextSyncCommittee: convertToCommittee([][]byte{{7}, {6}, {5}, {4}, {7}}),
currentSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {0},
[48]byte{2}: {1, 3, 4},
[48]byte{3}: {2},
{1}: {0},
{2}: {1, 3, 4},
{3}: {2},
},
nextSyncMap: map[[48]byte][]uint64{
[48]byte{7}: {0, 4},
[48]byte{6}: {1},
[48]byte{5}: {2},
[48]byte{4}: {3},
{7}: {0, 4},
{6}: {1},
{5}: {2},
{4}: {3},
},
},
{
@@ -70,14 +70,14 @@ func TestSyncCommitteeCache_CanUpdateAndRetrieve(t *testing.T) {
currentSyncCommittee: convertToCommittee([][]byte{{1}, {2}, {3}, {2}, {2}}),
nextSyncCommittee: convertToCommittee([][]byte{{2}, {1}, {3}, {2}, {1}}),
currentSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {0},
[48]byte{2}: {1, 3, 4},
[48]byte{3}: {2},
{1}: {0},
{2}: {1, 3, 4},
{3}: {2},
},
nextSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {1, 4},
[48]byte{2}: {0, 3},
[48]byte{3}: {2},
{1}: {1, 4},
{2}: {0, 3},
{3}: {2},
},
},
{
@@ -85,10 +85,10 @@ func TestSyncCommitteeCache_CanUpdateAndRetrieve(t *testing.T) {
currentSyncCommittee: convertToCommittee([][]byte{{100}, {100}, {100}, {100}}),
nextSyncCommittee: convertToCommittee([][]byte{{100}, {100}, {100}, {100}}),
currentSyncMap: map[[48]byte][]uint64{
[48]byte{100}: {0, 1, 2, 3},
{100}: {0, 1, 2, 3},
},
nextSyncMap: map[[48]byte][]uint64{
[48]byte{100}: {0, 1, 2, 3},
{100}: {0, 1, 2, 3},
},
},
{
@@ -96,10 +96,10 @@ func TestSyncCommitteeCache_CanUpdateAndRetrieve(t *testing.T) {
currentSyncCommittee: convertToCommittee([][]byte{{100}, {100}, {100}, {100}}),
nextSyncCommittee: convertToCommittee([][]byte{{100}, {100}, {100}, {100}}),
currentSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {},
{1}: {},
},
nextSyncMap: map[[48]byte][]uint64{
[48]byte{1}: {},
{1}: {},
},
},
}

View File

@@ -35,6 +35,7 @@ go_library(
"//beacon-chain/state/stateV0:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/attestationutil:go_default_library",
"//shared/bls:go_default_library",
"//shared/bytesutil:go_default_library",
@@ -76,6 +77,7 @@ go_test(
"//beacon-chain/state/state-altair:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/attestationutil:go_default_library",
"//shared/bls:go_default_library",
"//shared/bytesutil:go_default_library",

View File

@@ -12,6 +12,7 @@ import (
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/attestationutil"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/interfaces"
@@ -30,8 +31,8 @@ func TestProcessAttestations_InclusionDelayFailure(t *testing.T) {
}),
}
b := testutil.NewBeaconBlockAltair()
b.Block = &ethpb.BeaconBlockAltair{
Body: &ethpb.BeaconBlockBodyAltair{
b.Block = &prysmv2.BeaconBlock{
Body: &prysmv2.BeaconBlockBody{
Attestations: attestations,
},
}
@@ -54,8 +55,8 @@ func TestProcessAttestations_NeitherCurrentNorPrevEpoch(t *testing.T) {
Target: &ethpb.Checkpoint{Epoch: 0}}})
b := testutil.NewBeaconBlockAltair()
b.Block = &ethpb.BeaconBlockAltair{
Body: &ethpb.BeaconBlockBodyAltair{
b.Block = &prysmv2.BeaconBlock{
Body: &prysmv2.BeaconBlockBody{
Attestations: []*ethpb.Attestation{att},
},
}
@@ -87,8 +88,8 @@ func TestProcessAttestations_CurrentEpochFFGDataMismatches(t *testing.T) {
},
}
b := testutil.NewBeaconBlockAltair()
b.Block = &ethpb.BeaconBlockAltair{
Body: &ethpb.BeaconBlockBodyAltair{
b.Block = &prysmv2.BeaconBlock{
Body: &prysmv2.BeaconBlockBody{
Attestations: attestations,
},
}
@@ -123,8 +124,8 @@ func TestProcessAttestations_PrevEpochFFGDataMismatches(t *testing.T) {
},
}
b := testutil.NewBeaconBlockAltair()
b.Block = &ethpb.BeaconBlockAltair{
Body: &ethpb.BeaconBlockBodyAltair{
b.Block = &prysmv2.BeaconBlock{
Body: &prysmv2.BeaconBlockBody{
Attestations: attestations,
},
}
@@ -157,8 +158,8 @@ func TestProcessAttestations_InvalidAggregationBitsLength(t *testing.T) {
}
b := testutil.NewBeaconBlockAltair()
b.Block = &ethpb.BeaconBlockAltair{
Body: &ethpb.BeaconBlockBodyAltair{
b.Block = &prysmv2.BeaconBlock{
Body: &prysmv2.BeaconBlockBody{
Attestations: []*ethpb.Attestation{att},
},
}
@@ -309,7 +310,7 @@ func TestValidatorFlag_AddHas(t *testing.T) {
func TestFuzzProcessAttestationsNoVerify_10000(t *testing.T) {
fuzzer := fuzz.NewWithSeed(0)
state := &pb.BeaconStateAltair{}
b := &ethpb.SignedBeaconBlockAltair{}
b := &prysmv2.SignedBeaconBlock{}
ctx := context.Background()
for i := 0; i < 10000; i++ {
fuzzer.Fuzz(state)

View File

@@ -7,7 +7,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
p2pType "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/params"
@@ -41,7 +41,7 @@ import (
// increase_balance(state, get_beacon_proposer_index(state), proposer_reward)
// else:
// decrease_balance(state, participant_index, participant_reward)
func ProcessSyncAggregate(state iface.BeaconStateAltair, sync *ethpb.SyncAggregate) (iface.BeaconStateAltair, error) {
func ProcessSyncAggregate(state iface.BeaconStateAltair, sync *prysmv2.SyncAggregate) (iface.BeaconStateAltair, error) {
keyToIndexMap := make(map[[48]byte]types.ValidatorIndex)
for i := 0; i < state.NumValidators(); i++ {
keyToIndexMap[state.PubkeyAtIndex(types.ValidatorIndex(i))] = types.ValidatorIndex(i)

View File

@@ -8,7 +8,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/altair"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
p2pType "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil"
@@ -41,7 +41,7 @@ func TestProcessSyncCommittee_OK(t *testing.T) {
sigs[i] = sig
}
aggregatedSig := bls.AggregateSignatures(sigs).Marshal()
syncAggregate := &ethpb.SyncAggregate{
syncAggregate := &prysmv2.SyncAggregate{
SyncCommitteeBits: syncBits,
SyncCommitteeSignature: aggregatedSig,
}

View File

@@ -11,6 +11,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateV0"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/params"
)
@@ -134,14 +135,14 @@ func OptimizedGenesisBeaconState(genesisTime uint64, preState iface.BeaconStateA
Eth1DepositIndex: preState.Eth1DepositIndex(),
}
bodyRoot, err := (&ethpb.BeaconBlockBodyAltair{
bodyRoot, err := (&prysmv2.BeaconBlockBody{
RandaoReveal: make([]byte, 96),
Eth1Data: &ethpb.Eth1Data{
DepositRoot: make([]byte, 32),
BlockHash: make([]byte, 32),
},
Graffiti: make([]byte, 32),
SyncAggregate: &ethpb.SyncAggregate{
SyncAggregate: &prysmv2.SyncAggregate{
SyncCommitteeBits: make([]byte, len(bitfield.NewBitvector512())),
SyncCommitteeSignature: make([]byte, 96),
},

View File

@@ -9,7 +9,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/hashutil"
@@ -19,7 +19,7 @@ import (
// ValidateNilSyncContribution validates that the signed contribution
// is not nil.
func ValidateNilSyncContribution(s *ethpb.SignedContributionAndProof) error {
func ValidateNilSyncContribution(s *prysmv2.SignedContributionAndProof) error {
if s == nil {
return errors.New("signed message can't be nil")
}
@@ -320,7 +320,7 @@ func SyncCommitteeSigningRoot(st iface.BeaconState, slot types.Slot, comIdx type
// VerifySyncSelectionData verifies that the provided sync contribution has a valid
// selection proof.
func VerifySyncSelectionData(st iface.BeaconState, m *ethpb.ContributionAndProof) error {
func VerifySyncSelectionData(st iface.BeaconState, m *prysmv2.ContributionAndProof) error {
selectionData := &pb.SyncAggregatorSelectionData{Slot: m.Contribution.Slot, SubcommitteeIndex: uint64(m.Contribution.SubcommitteeIndex)}
return helpers.ComputeDomainVerifySigningRoot(st, m.AggregatorIndex, helpers.SlotToEpoch(m.Contribution.Slot), selectionData, params.BeaconConfig().DomainSyncCommitteeSelectionProof, m.SelectionProof)
}

View File

@@ -10,6 +10,7 @@ import (
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil"
@@ -312,7 +313,7 @@ func TestSyncCommitteePeriod(t *testing.T) {
func TestValidateNilSyncContribution(t *testing.T) {
tests := []struct {
name string
s *ethpb.SignedContributionAndProof
s *prysmv2.SignedContributionAndProof
wantErr bool
}{
{
@@ -322,27 +323,27 @@ func TestValidateNilSyncContribution(t *testing.T) {
},
{
name: "nil message",
s: &ethpb.SignedContributionAndProof{},
s: &prysmv2.SignedContributionAndProof{},
wantErr: true,
},
{
name: "nil contribution",
s: &ethpb.SignedContributionAndProof{Message: &ethpb.ContributionAndProof{}},
s: &prysmv2.SignedContributionAndProof{Message: &prysmv2.ContributionAndProof{}},
wantErr: true,
},
{
name: "nil bitfield",
s: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
Contribution: &ethpb.SyncCommitteeContribution{},
s: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
Contribution: &prysmv2.SyncCommitteeContribution{},
}},
wantErr: true,
},
{
name: "non nil sync contribution",
s: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
Contribution: &ethpb.SyncCommitteeContribution{
s: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
Contribution: &prysmv2.SyncCommitteeContribution{
AggregationBits: []byte{},
},
}},

View File

@@ -10,6 +10,7 @@ go_library(
visibility = ["//beacon-chain:__subpackages__"],
deps = [
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/event:go_default_library",
],
)

View File

@@ -5,6 +5,7 @@ package operation
import (
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
)
const (
@@ -48,10 +49,10 @@ type ExitReceivedData struct {
// SyncCommReceivedData is the data sent with SyncCommMessageReceived events.
type SyncCommReceivedData struct {
Message *ethpb.SyncCommitteeMessage
Message *prysmv2.SyncCommitteeMessage
}
// SyncContributionReceivedData is the data sent with SyncContributionReceived events.
type SyncContributionReceivedData struct {
Contribution *ethpb.ContributionAndProof
Contribution *prysmv2.ContributionAndProof
}

View File

@@ -85,6 +85,7 @@ go_test(
"//beacon-chain/state/stateV0:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/attestationutil:go_default_library",
"//shared/benchutil:go_default_library",
"//shared/bls:go_default_library",

View File

@@ -11,6 +11,7 @@ import (
p2pType "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/copyutil"
@@ -83,7 +84,7 @@ func TestExecuteAltairStateTransitionNoVerify_FullProcess(t *testing.T) {
syncSigs[i] = sig
}
aggregatedSig := bls.AggregateSignatures(syncSigs).Marshal()
syncAggregate := &ethpb.SyncAggregate{
syncAggregate := &prysmv2.SyncAggregate{
SyncCommitteeBits: syncBits,
SyncCommitteeSignature: aggregatedSig,
}
@@ -167,7 +168,7 @@ func TestExecuteAltairStateTransitionNoVerifySignature_CouldNotVerifyStateRoot(t
syncSigs[i] = sig
}
aggregatedSig := bls.AggregateSignatures(syncSigs).Marshal()
syncAggregate := &ethpb.SyncAggregate{
syncAggregate := &prysmv2.SyncAggregate{
SyncCommitteeBits: syncBits,
SyncCommitteeSignature: aggregatedSig,
}
@@ -198,7 +199,7 @@ func TestExecuteStateTransitionNoVerifyAnySig_PassesProcessingConditions(t *test
}
func createFullAltairBlockWithOperations(t *testing.T) (iface.BeaconStateAltair,
*ethpb.SignedBeaconBlockAltair) {
*prysmv2.SignedBeaconBlock) {
beaconState, privKeys := testutil.DeterministicGenesisStateAltair(t, 32)
sCom, err := altair.NextSyncCommittee(beaconState)
assert.NoError(t, err)

View File

@@ -45,6 +45,7 @@ go_library(
"//proto/beacon/db:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/bytesutil:go_default_library",
"//shared/fileutil:go_default_library",
"//shared/interfaces:go_default_library",

View File

@@ -11,6 +11,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/interfaces/version"
@@ -594,7 +595,7 @@ func unmarshalBlock(ctx context.Context, enc []byte) (interfaces.SignedBeaconBlo
switch {
case hasAltairKey(enc):
// Marshal block bytes to altair beacon block.
rawBlock := &ethpb.SignedBeaconBlockAltair{}
rawBlock := &prysmv2.SignedBeaconBlock{}
err := rawBlock.UnmarshalSSZ(enc[len(altairKey):])
if err != nil {
return nil, err

View File

@@ -13,7 +13,7 @@ go_library(
importpath = "github.com/prysmaticlabs/prysm/beacon-chain/operations/synccommittee",
visibility = ["//beacon-chain:__subpackages__"],
deps = [
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/copyutil:go_default_library",
"//shared/queue:go_default_library",
"@com_github_pkg_errors//:go_default_library",
@@ -29,7 +29,7 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/testutil/require:go_default_library",
],
)

View File

@@ -5,7 +5,7 @@ import (
"github.com/pkg/errors"
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/copyutil"
"github.com/prysmaticlabs/prysm/shared/queue"
)
@@ -16,7 +16,7 @@ const syncCommitteeMaxQueueSize = 4
// SaveSyncCommitteeContribution saves a sync committee contribution in to a priority queue.
// The priority queue is capped at syncCommitteeMaxQueueSize contributions.
func (s *Store) SaveSyncCommitteeContribution(cont *ethpb.SyncCommitteeContribution) error {
func (s *Store) SaveSyncCommitteeContribution(cont *prysmv2.SyncCommitteeContribution) error {
if cont == nil {
return nilContributionErr
}
@@ -43,7 +43,7 @@ func (s *Store) SaveSyncCommitteeContribution(cont *ethpb.SyncCommitteeContribut
// Contribution does not exist. Insert new.
if err := s.contributionCache.Push(&queue.Item{
Key: syncCommitteeKey(cont.Slot),
Value: []*ethpb.SyncCommitteeContribution{copied},
Value: []*prysmv2.SyncCommitteeContribution{copied},
Priority: int64(cont.Slot),
}); err != nil {
return err
@@ -61,7 +61,7 @@ func (s *Store) SaveSyncCommitteeContribution(cont *ethpb.SyncCommitteeContribut
// SyncCommitteeContributions returns sync committee contributions by slot from the priority queue.
// Upon retrieval, the contribution is removed from the queue.
func (s *Store) SyncCommitteeContributions(slot types.Slot) ([]*ethpb.SyncCommitteeContribution, error) {
func (s *Store) SyncCommitteeContributions(slot types.Slot) ([]*prysmv2.SyncCommitteeContribution, error) {
s.contributionLock.Lock()
defer s.contributionLock.Unlock()
@@ -73,9 +73,9 @@ func (s *Store) SyncCommitteeContributions(slot types.Slot) ([]*ethpb.SyncCommit
return nil, nil
}
contributions, ok := item.Value.([]*ethpb.SyncCommitteeContribution)
contributions, ok := item.Value.([]*prysmv2.SyncCommitteeContribution)
if !ok {
return nil, errors.New("not typed []ethpb.SyncCommitteeContribution")
return nil, errors.New("not typed []prysmv2.SyncCommitteeContribution")
}
return contributions, nil

View File

@@ -3,7 +3,7 @@ package synccommittee
import (
"testing"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
)
@@ -15,7 +15,7 @@ func TestSyncCommitteeContributionCache_Nil(t *testing.T) {
func TestSyncCommitteeContributionCache_RoundTrip(t *testing.T) {
store := NewStore()
conts := []*eth.SyncCommitteeContribution{
conts := []*prysmv2.SyncCommitteeContribution{
{Slot: 1, SubcommitteeIndex: 0, Signature: []byte{'a'}},
{Slot: 1, SubcommitteeIndex: 1, Signature: []byte{'b'}},
{Slot: 2, SubcommitteeIndex: 0, Signature: []byte{'c'}},
@@ -36,22 +36,22 @@ func TestSyncCommitteeContributionCache_RoundTrip(t *testing.T) {
conts, err := store.SyncCommitteeContributions(1)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeContribution(nil), conts)
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeContribution(nil), conts)
conts, err = store.SyncCommitteeContributions(2)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeContribution(nil), conts)
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeContribution(nil), conts)
conts, err = store.SyncCommitteeContributions(3)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeContribution{
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeContribution{
{Slot: 3, SubcommitteeIndex: 0, Signature: []byte{'e'}},
{Slot: 3, SubcommitteeIndex: 1, Signature: []byte{'f'}},
}, conts)
conts, err = store.SyncCommitteeContributions(6)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeContribution{
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeContribution{
{Slot: 6, SubcommitteeIndex: 0, Signature: []byte{'k'}},
{Slot: 6, SubcommitteeIndex: 1, Signature: []byte{'l'}},
}, conts)

View File

@@ -3,14 +3,14 @@ package synccommittee
import (
"github.com/pkg/errors"
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/copyutil"
"github.com/prysmaticlabs/prysm/shared/queue"
)
// SaveSyncCommitteeMessage saves a sync committee message in to a priority queue.
// The priority queue capped at syncCommitteeMaxQueueSize contributions.
func (s *Store) SaveSyncCommitteeMessage(msg *ethpb.SyncCommitteeMessage) error {
func (s *Store) SaveSyncCommitteeMessage(msg *prysmv2.SyncCommitteeMessage) error {
if msg == nil {
return nilMessageErr
}
@@ -26,7 +26,7 @@ func (s *Store) SaveSyncCommitteeMessage(msg *ethpb.SyncCommitteeMessage) error
copied := copyutil.CopySyncCommitteeMessage(msg)
// Messages exist in the queue. Append instead of insert new.
if item != nil {
messages, ok := item.Value.([]*ethpb.SyncCommitteeMessage)
messages, ok := item.Value.([]*prysmv2.SyncCommitteeMessage)
if !ok {
return errors.New("not typed []ethpb.SyncCommitteeMessage")
}
@@ -42,7 +42,7 @@ func (s *Store) SaveSyncCommitteeMessage(msg *ethpb.SyncCommitteeMessage) error
// Message does not exist. Insert new.
if err := s.messageCache.Push(&queue.Item{
Key: syncCommitteeKey(msg.Slot),
Value: []*ethpb.SyncCommitteeMessage{copied},
Value: []*prysmv2.SyncCommitteeMessage{copied},
Priority: int64(msg.Slot),
}); err != nil {
return err
@@ -60,7 +60,7 @@ func (s *Store) SaveSyncCommitteeMessage(msg *ethpb.SyncCommitteeMessage) error
// SyncCommitteeMessages returns sync committee messages by slot from the priority queue.
// Upon retrieval, the message is removed from the queue.
func (s *Store) SyncCommitteeMessages(slot types.Slot) ([]*ethpb.SyncCommitteeMessage, error) {
func (s *Store) SyncCommitteeMessages(slot types.Slot) ([]*prysmv2.SyncCommitteeMessage, error) {
s.messageLock.Lock()
defer s.messageLock.Unlock()
@@ -72,9 +72,9 @@ func (s *Store) SyncCommitteeMessages(slot types.Slot) ([]*ethpb.SyncCommitteeMe
return nil, nil
}
messages, ok := item.Value.([]*ethpb.SyncCommitteeMessage)
messages, ok := item.Value.([]*prysmv2.SyncCommitteeMessage)
if !ok {
return nil, errors.New("not typed []ethpb.SyncCommitteeMessage")
return nil, errors.New("not typed []prysmv2.SyncCommitteeMessage")
}
return messages, nil

View File

@@ -3,7 +3,7 @@ package synccommittee
import (
"testing"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
)
@@ -15,7 +15,7 @@ func TestSyncCommitteeSignatureCache_Nil(t *testing.T) {
func TestSyncCommitteeSignatureCache_RoundTrip(t *testing.T) {
store := NewStore()
msgs := []*eth.SyncCommitteeMessage{
msgs := []*prysmv2.SyncCommitteeMessage{
{Slot: 1, ValidatorIndex: 0, Signature: []byte{'a'}},
{Slot: 1, ValidatorIndex: 1, Signature: []byte{'b'}},
{Slot: 2, ValidatorIndex: 0, Signature: []byte{'c'}},
@@ -36,22 +36,22 @@ func TestSyncCommitteeSignatureCache_RoundTrip(t *testing.T) {
msgs, err := store.SyncCommitteeMessages(1)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeMessage(nil), msgs)
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeMessage(nil), msgs)
msgs, err = store.SyncCommitteeMessages(2)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeMessage(nil), msgs)
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeMessage(nil), msgs)
msgs, err = store.SyncCommitteeMessages(3)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeMessage{
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeMessage{
{Slot: 3, ValidatorIndex: 0, Signature: []byte{'e'}},
{Slot: 3, ValidatorIndex: 1, Signature: []byte{'f'}},
}, msgs)
msgs, err = store.SyncCommitteeMessages(6)
require.NoError(t, err)
require.DeepSSZEqual(t, []*eth.SyncCommitteeMessage{
require.DeepSSZEqual(t, []*prysmv2.SyncCommitteeMessage{
{Slot: 6, ValidatorIndex: 0, Signature: []byte{'k'}},
{Slot: 6, ValidatorIndex: 1, Signature: []byte{'l'}},
}, msgs)

View File

@@ -2,7 +2,7 @@ package synccommittee
import (
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
)
var _ = Pool(&Store{})
@@ -13,12 +13,12 @@ var _ = Pool(&Store{})
// sync aggregators.
type Pool interface {
// Methods for Sync Contributions.
SaveSyncCommitteeContribution(contr *ethpb.SyncCommitteeContribution) error
SyncCommitteeContributions(slot types.Slot) ([]*ethpb.SyncCommitteeContribution, error)
SaveSyncCommitteeContribution(contr *prysmv2.SyncCommitteeContribution) error
SyncCommitteeContributions(slot types.Slot) ([]*prysmv2.SyncCommitteeContribution, error)
// Methods for Sync Committee Messages.
SaveSyncCommitteeMessage(sig *ethpb.SyncCommitteeMessage) error
SyncCommitteeMessages(slot types.Slot) ([]*ethpb.SyncCommitteeMessage, error)
SaveSyncCommitteeMessage(sig *prysmv2.SyncCommitteeMessage) error
SyncCommitteeMessages(slot types.Slot) ([]*prysmv2.SyncCommitteeMessage, error)
}
// NewPool returns the sync committee store fulfilling the pool interface.

View File

@@ -53,6 +53,7 @@ go_library(
"//proto/beacon/p2p/v1:go_default_library",
"//proto/beacon/rpc/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared:go_default_library",
"//shared/featureconfig:go_default_library",
"//shared/fileutil:go_default_library",

View File

@@ -4,6 +4,7 @@ import (
"reflect"
pb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"google.golang.org/protobuf/proto"
)
@@ -16,8 +17,8 @@ var GossipTopicMappings = map[string]proto.Message{
ProposerSlashingSubnetTopicFormat: &pb.ProposerSlashing{},
AttesterSlashingSubnetTopicFormat: &pb.AttesterSlashing{},
AggregateAndProofSubnetTopicFormat: &pb.SignedAggregateAttestationAndProof{},
SyncContributionAndProofSubnetTopicFormat: &pb.SignedContributionAndProof{},
SyncCommitteeSubnetTopicFormat: &pb.SyncCommitteeMessage{},
SyncContributionAndProofSubnetTopicFormat: &prysmv2.SignedContributionAndProof{},
SyncCommitteeSubnetTopicFormat: &prysmv2.SyncCommitteeMessage{},
}
// GossipTypeMapping is the inverse of GossipTopicMappings so that an arbitrary protobuf message

View File

@@ -19,6 +19,7 @@ go_library(
deps = [
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/bytesutil:go_default_library",
"//shared/interfaces:go_default_library",
"//shared/params:go_default_library",

View File

@@ -3,6 +3,7 @@ package types
import (
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/params"
@@ -39,7 +40,7 @@ func InitializeDataMaps() {
return interfaces.WrappedPhase0SignedBeaconBlock(&eth.SignedBeaconBlock{})
},
bytesutil.ToBytes4(params.BeaconConfig().AltairForkVersion): func() interfaces.SignedBeaconBlock {
return interfaces.WrappedAltairSignedBeaconBlock(&eth.SignedBeaconBlockAltair{})
return interfaces.WrappedAltairSignedBeaconBlock(&prysmv2.SignedBeaconBlock{})
},
}

View File

@@ -45,6 +45,7 @@ go_library(
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/aggregation:go_default_library",
"//shared/aggregation/attestations:go_default_library",
"//shared/bls:go_default_library",
@@ -119,6 +120,7 @@ go_test(
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/aggregation/attestations:go_default_library",
"//shared/attestationutil:go_default_library",
"//shared/bls:go_default_library",

View File

@@ -22,6 +22,7 @@ import (
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
attaggregation "github.com/prysmaticlabs/prysm/shared/aggregation/attestations"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/featureconfig"
@@ -110,7 +111,7 @@ func (vs *Server) GetBlock(ctx context.Context, req *ethpb.BlockRequest) (*ethpb
// GetBlockV2 is called by a proposer during its assigned slot to request a block to sign
// by passing in the slot and the signed randao reveal of the slot. This is used by a validator
// after the altair fork epoch has been encountered.
func (vs *Server) GetBlockV2(ctx context.Context, req *ethpb.BlockRequest) (*ethpb.BeaconBlockAltair, error) {
func (vs *Server) GetBlockV2(ctx context.Context, req *ethpb.BlockRequest) (*prysmv2.BeaconBlock, error) {
ctx, span := trace.StartSpan(ctx, "ProposerServer.GetBlockV2")
defer span.End()
span.AddAttributes(trace.Int64Attribute("slot", int64(req.Slot)))
@@ -125,7 +126,7 @@ func (vs *Server) GetBlockV2(ctx context.Context, req *ethpb.BlockRequest) (*eth
// Ugly hack to allow this to compile both for mainnet
// and minimal configs.
mockAgg := &ethpb.SyncAggregate{SyncCommitteeBits: []byte{}}
mockAgg := &prysmv2.SyncAggregate{SyncCommitteeBits: []byte{}}
var bVector []byte
if mockAgg.SyncCommitteeBits.Len() == 512 {
bVector = bitfield.NewBitvector512()
@@ -133,12 +134,12 @@ func (vs *Server) GetBlockV2(ctx context.Context, req *ethpb.BlockRequest) (*eth
bVector = bitfield.NewBitvector32()
}
infiniteSignature := [96]byte{0xC0}
blk := &ethpb.BeaconBlockAltair{
blk := &prysmv2.BeaconBlock{
Slot: req.Slot,
ParentRoot: blkData.parentRoot,
StateRoot: stateRoot,
ProposerIndex: blkData.proposerIdx,
Body: &ethpb.BeaconBlockBodyAltair{
Body: &prysmv2.BeaconBlockBody{
Eth1Data: blkData.eth1Data,
Deposits: blkData.deposits,
Attestations: blkData.attestations,
@@ -148,16 +149,16 @@ func (vs *Server) GetBlockV2(ctx context.Context, req *ethpb.BlockRequest) (*eth
VoluntaryExits: blkData.voluntaryExits,
Graffiti: blkData.graffiti[:],
// TODO: Add in actual aggregates
SyncAggregate: &ethpb.SyncAggregate{
SyncAggregate: &prysmv2.SyncAggregate{
SyncCommitteeBits: bVector,
SyncCommitteeSignature: infiniteSignature[:],
},
},
}
// Compute state root with the newly constructed block.
stateRoot, err = vs.computeStateRoot(ctx, interfaces.WrappedAltairSignedBeaconBlock(&ethpb.SignedBeaconBlockAltair{Block: blk, Signature: make([]byte, 96)}))
stateRoot, err = vs.computeStateRoot(ctx, interfaces.WrappedAltairSignedBeaconBlock(&prysmv2.SignedBeaconBlock{Block: blk, Signature: make([]byte, 96)}))
if err != nil {
interop.WriteBlockToDisk(interfaces.WrappedAltairSignedBeaconBlock(&ethpb.SignedBeaconBlockAltair{Block: blk}), true /*failed*/)
interop.WriteBlockToDisk(interfaces.WrappedAltairSignedBeaconBlock(&prysmv2.SignedBeaconBlock{Block: blk}), true /*failed*/)
return nil, status.Errorf(codes.Internal, "Could not compute state root: %v", err)
}
blk.StateRoot = stateRoot
@@ -244,7 +245,7 @@ func (vs *Server) ProposeBlock(ctx context.Context, rBlk *ethpb.SignedBeaconBloc
// ProposeBlockV2 is called by a proposer during its assigned slot to create a block in an attempt
// to get it processed by the beacon node as the canonical head.
func (vs *Server) ProposeBlockV2(ctx context.Context, rBlk *ethpb.SignedBeaconBlockAltair) (*ethpb.ProposeResponse, error) {
func (vs *Server) ProposeBlockV2(ctx context.Context, rBlk *prysmv2.SignedBeaconBlock) (*ethpb.ProposeResponse, error) {
blk := interfaces.WrappedAltairSignedBeaconBlock(rBlk)
return vs.proposeBlock(ctx, blk)
}

View File

@@ -23,6 +23,7 @@ import (
dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db"
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
attaggregation "github.com/prysmaticlabs/prysm/shared/aggregation/attestations"
"github.com/prysmaticlabs/prysm/shared/attestationutil"
"github.com/prysmaticlabs/prysm/shared/bls"
@@ -130,16 +131,16 @@ func TestProposer_GetBlockV2_OK(t *testing.T) {
require.NoError(t, err, "Could not hash genesis state")
genesis := b.NewGenesisBlock(stateRoot[:])
genAltair := &ethpb.SignedBeaconBlockAltair{
Block: &ethpb.BeaconBlockAltair{
genAltair := &prysmv2.SignedBeaconBlock{
Block: &prysmv2.BeaconBlock{
Slot: genesis.Block.Slot,
ParentRoot: genesis.Block.ParentRoot,
StateRoot: genesis.Block.StateRoot,
Body: &ethpb.BeaconBlockBodyAltair{
Body: &prysmv2.BeaconBlockBody{
RandaoReveal: genesis.Block.Body.RandaoReveal,
Graffiti: genesis.Block.Body.Graffiti,
Eth1Data: genesis.Block.Body.Eth1Data,
SyncAggregate: &ethpb.SyncAggregate{SyncCommitteeBits: bitfield.NewBitvector512(), SyncCommitteeSignature: make([]byte, 96)},
SyncAggregate: &prysmv2.SyncAggregate{SyncCommitteeBits: bitfield.NewBitvector512(), SyncCommitteeSignature: make([]byte, 96)},
},
},
Signature: genesis.Signature,

View File

@@ -14,7 +14,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/state"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/params"
@@ -25,20 +25,22 @@ import (
)
// GetSyncMessageBlockRoot retrieves the sync committee block root of the beacon chain.
func (vs *Server) GetSyncMessageBlockRoot(ctx context.Context, _ *emptypb.Empty) (*ethpb.SyncMessageBlockRootResponse, error) {
func (vs *Server) GetSyncMessageBlockRoot(
ctx context.Context, _ *emptypb.Empty,
) (*prysmv2.SyncMessageBlockRootResponse, error) {
r, err := vs.HeadFetcher.HeadRoot(ctx)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not retrieve head root: %v", err)
}
return &ethpb.SyncMessageBlockRootResponse{
return &prysmv2.SyncMessageBlockRootResponse{
Root: r,
}, nil
}
// SubmitSyncMessage submits the sync committee message to the network.
// It also saves the sync committee message into the pending pool for block inclusion.
func (vs *Server) SubmitSyncMessage(ctx context.Context, msg *ethpb.SyncCommitteeMessage) (*emptypb.Empty, error) {
func (vs *Server) SubmitSyncMessage(ctx context.Context, msg *prysmv2.SyncCommitteeMessage) (*emptypb.Empty, error) {
errs, ctx := errgroup.WithContext(ctx)
// Broadcasting and saving message into the pool in parallel. As one fail should not affect another.
@@ -55,20 +57,22 @@ func (vs *Server) SubmitSyncMessage(ctx context.Context, msg *ethpb.SyncCommitte
return nil, err
}
// GetSyncSubcommitteeIndex is called by a sync committee participant to get its subcommittee index for sync message aggregation duty.
func (vs *Server) GetSyncSubcommitteeIndex(ctx context.Context, req *ethpb.SyncSubcommitteeIndexRequest) (*ethpb.SyncSubcommitteeIndexRespond, error) {
// GetSyncSubcommitteeIndex is called by a sync committee participant to get
// its subcommittee index for sync message aggregation duty.
func (vs *Server) GetSyncSubcommitteeIndex(
ctx context.Context, req *prysmv2.SyncSubcommitteeIndexRequest,
) (*prysmv2.SyncSubcommitteeIndexResponse, error) {
indices, err := vs.syncSubcommitteeIndex(ctx, bytesutil.ToBytes48(req.PublicKey), req.Slot)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not get sync subcommittee index: %v", err)
}
return &ethpb.SyncSubcommitteeIndexRespond{
Indices: indices,
}, nil
return indices, nil
}
// syncSubcommitteeIndex returns a list of subcommittee index of a validator and slot for sync message aggregation duty.
func (vs *Server) syncSubcommitteeIndex(ctx context.Context, pubkey [48]byte, slot types.Slot) ([]uint64, error) {
func (vs *Server) syncSubcommitteeIndex(
ctx context.Context, pubkey [48]byte, slot types.Slot,
) (*prysmv2.SyncSubcommitteeIndexResponse, error) {
var headState iface.BeaconState
var err error
// If there's already a head state exists with the request slot, we don't need to process slots.
@@ -102,7 +106,9 @@ func (vs *Server) syncSubcommitteeIndex(ctx context.Context, pubkey [48]byte, sl
if err != nil {
return nil, err
}
return indices, nil
return &prysmv2.SyncSubcommitteeIndexResponse{
Indices: indices,
}, nil
// At sync committee period boundary, validator should sample the next epoch sync committee.
case altair.SyncCommitteePeriod(nextSlotEpoch) == altair.SyncCommitteePeriod(currentEpoch)+1:
committee, err := headState.NextSyncCommittee()
@@ -113,15 +119,20 @@ func (vs *Server) syncSubcommitteeIndex(ctx context.Context, pubkey [48]byte, sl
if err != nil {
return nil, err
}
return indices, nil
return &prysmv2.SyncSubcommitteeIndexResponse{
Indices: indices,
}, nil
default:
// Impossible condition.
return nil, errors.New("could get calculate sync subcommittee based on the period")
}
}
// GetSyncCommitteeContribution is called by a sync committee aggregator to retrieve sync committee contribution object.
func (vs *Server) GetSyncCommitteeContribution(ctx context.Context, req *ethpb.SyncCommitteeContributionRequest) (*ethpb.SyncCommitteeContribution, error) {
// GetSyncCommitteeContribution is called by a sync committee aggregator
// to retrieve sync committee contribution object.
func (vs *Server) GetSyncCommitteeContribution(
ctx context.Context, req *prysmv2.SyncCommitteeContributionRequest,
) (*prysmv2.SyncCommitteeContribution, error) {
msgs, err := vs.SyncCommitteePool.SyncCommitteeMessages(req.Slot)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not get sync subcommittee messages: %v", err)
@@ -160,17 +171,21 @@ func (vs *Server) GetSyncCommitteeContribution(ctx context.Context, req *ethpb.S
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not get validator at index: %v", err)
}
indices, err := vs.syncSubcommitteeIndex(ctx, v.PublicKey(), slot)
idxResp, err := vs.syncSubcommitteeIndex(ctx, v.PublicKey(), slot)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not get sync subcommittee index: %v", err)
}
for _, index := range indices {
for _, index := range idxResp.Indices {
subnetIndex := index / subCommitteeSize
if subnetIndex == req.SubnetId {
bits.SetBitAt(index%subCommitteeSize, true)
sig, err := bls.SignatureFromBytes(msg.Signature)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not get bls signature from bytes: %v", err)
return nil, status.Errorf(
codes.Internal,
"Could not get bls signature from bytes: %v",
err,
)
}
sigs = append(sigs, sig)
}
@@ -178,7 +193,7 @@ func (vs *Server) GetSyncCommitteeContribution(ctx context.Context, req *ethpb.S
}
}
aggregatedSig := bls.AggregateSignatures(sigs)
contribution := &ethpb.SyncCommitteeContribution{
contribution := &prysmv2.SyncCommitteeContribution{
Slot: headState.Slot(),
BlockRoot: headRoot,
SubcommitteeIndex: req.SubnetId,
@@ -189,8 +204,11 @@ func (vs *Server) GetSyncCommitteeContribution(ctx context.Context, req *ethpb.S
return contribution, nil
}
// SubmitSignedContributionAndProof is called by a sync committee aggregator to submit signed contribution and proof object.
func (vs *Server) SubmitSignedContributionAndProof(ctx context.Context, s *ethpb.SignedContributionAndProof) (*emptypb.Empty, error) {
// SubmitSignedContributionAndProof is called by a sync committee aggregator
// to submit signed contribution and proof object.
func (vs *Server) SubmitSignedContributionAndProof(
ctx context.Context, s *prysmv2.SignedContributionAndProof,
) (*emptypb.Empty, error) {
errs, ctx := errgroup.WithContext(ctx)
// Broadcasting and saving contribution into the pool in parallel. As one fail should not affect another.

View File

@@ -11,7 +11,7 @@ import (
mockp2p "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing"
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil"
@@ -34,7 +34,7 @@ func TestSubmitSyncMessage_OK(t *testing.T) {
SyncCommitteePool: synccommittee.NewStore(),
P2P: &mockp2p.MockBroadcaster{},
}
msg := &ethpb.SyncCommitteeMessage{
msg := &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 2,
}
@@ -42,7 +42,7 @@ func TestSubmitSyncMessage_OK(t *testing.T) {
require.NoError(t, err)
savedMsgs, err := server.SyncCommitteePool.SyncCommitteeMessages(1)
require.NoError(t, err)
require.DeepEqual(t, []*ethpb.SyncCommitteeMessage{msg}, savedMsgs)
require.DeepEqual(t, []*prysmv2.SyncCommitteeMessage{msg}, savedMsgs)
}
func TestGetSyncSubcommitteeIndex_Ok(t *testing.T) {
@@ -79,7 +79,7 @@ func TestGetSyncSubcommitteeIndex_Ok(t *testing.T) {
require.NoError(t, err)
// Request slot 0, should get the index 0 for validator 0.
res, err := server.GetSyncSubcommitteeIndex(context.Background(), &ethpb.SyncSubcommitteeIndexRequest{
res, err := server.GetSyncSubcommitteeIndex(context.Background(), &prysmv2.SyncSubcommitteeIndexRequest{
PublicKey: v.PublicKey, Slot: types.Slot(0),
})
require.NoError(t, err)
@@ -87,7 +87,7 @@ func TestGetSyncSubcommitteeIndex_Ok(t *testing.T) {
// Request at period boundary, should get index 1 for validator 0 due to the shuffle.
periodBoundary := types.Slot(params.BeaconConfig().EpochsPerSyncCommitteePeriod)*params.BeaconConfig().SlotsPerEpoch - 1
res, err = server.GetSyncSubcommitteeIndex(context.Background(), &ethpb.SyncSubcommitteeIndexRequest{
res, err = server.GetSyncSubcommitteeIndex(context.Background(), &prysmv2.SyncSubcommitteeIndexRequest{
PublicKey: v.PublicKey, Slot: periodBoundary,
})
require.NoError(t, err)
@@ -99,9 +99,9 @@ func TestSubmitSignedContributionAndProof_OK(t *testing.T) {
SyncCommitteePool: synccommittee.NewStore(),
P2P: &mockp2p.MockBroadcaster{},
}
contribution := &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
Contribution: &ethpb.SyncCommitteeContribution{
contribution := &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 2,
},
@@ -111,7 +111,7 @@ func TestSubmitSignedContributionAndProof_OK(t *testing.T) {
require.NoError(t, err)
savedMsgs, err := server.SyncCommitteePool.SyncCommitteeContributions(1)
require.NoError(t, err)
require.DeepEqual(t, []*ethpb.SyncCommitteeContribution{contribution.Message.Contribution}, savedMsgs)
require.DeepEqual(t, []*prysmv2.SyncCommitteeContribution{contribution.Message.Contribution}, savedMsgs)
}
func TestSyncCommitteeHeadStateCache_RoundTrip(t *testing.T) {

View File

@@ -74,6 +74,7 @@ go_library(
"//cmd/beacon-chain/flags:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared:go_default_library",
"//shared/abool:go_default_library",
"//shared/bls:go_default_library",
@@ -174,6 +175,7 @@ go_test(
"//cmd/beacon-chain/flags:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/abool:go_default_library",
"//shared/attestationutil:go_default_library",
"//shared/bls:go_default_library",

View File

@@ -8,6 +8,7 @@ import (
mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -72,7 +73,7 @@ func TestExtractBlockDataType(t *testing.T) {
digest: altairDigest[:],
chain: &mock.ChainService{ValidatorsRoot: [32]byte{}},
},
want: interfaces.WrappedAltairSignedBeaconBlock(&eth.SignedBeaconBlockAltair{}),
want: interfaces.WrappedAltairSignedBeaconBlock(&prysmv2.SignedBeaconBlock{}),
wantErr: false,
},
}

View File

@@ -5,12 +5,12 @@ import (
"fmt"
"github.com/pkg/errors"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"google.golang.org/protobuf/proto"
)
func (s *Service) syncCommitteeSubscriber(_ context.Context, msg proto.Message) error {
m, ok := msg.(*eth.SyncCommitteeMessage)
m, ok := msg.(*prysmv2.SyncCommitteeMessage)
if !ok {
return fmt.Errorf("message was not type *eth.SyncCommitteeMessage, type=%T", msg)
}

View File

@@ -5,14 +5,14 @@ import (
"errors"
"fmt"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"google.golang.org/protobuf/proto"
)
// syncContributionAndProofSubscriber forwards the incoming validated sync contributions and proof to the
// contribution pool for processing.
func (s *Service) syncContributionAndProofSubscriber(_ context.Context, msg proto.Message) error {
a, ok := msg.(*ethpb.SignedContributionAndProof)
a, ok := msg.(*prysmv2.SignedContributionAndProof)
if !ok {
return fmt.Errorf("message was not type *eth.SignedAggregateAttestationAndProof, type=%T", msg)
}

View File

@@ -16,7 +16,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
p2ptypes "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/params"
@@ -42,7 +42,7 @@ func (s *Service) validateSyncCommittee(ctx context.Context, pid peer.ID, msg *p
// Override topic for decoding.
originalTopic := msg.Topic
format := p2p.GossipTypeMapping[reflect.TypeOf(&eth.SyncCommitteeMessage{})]
format := p2p.GossipTypeMapping[reflect.TypeOf(&prysmv2.SyncCommitteeMessage{})]
msg.Topic = &format
m, err := s.decodePubsubMessage(msg)
@@ -54,7 +54,7 @@ func (s *Service) validateSyncCommittee(ctx context.Context, pid peer.ID, msg *p
// Restore topic.
msg.Topic = originalTopic
comMsg, ok := m.(*eth.SyncCommitteeMessage)
comMsg, ok := m.(*prysmv2.SyncCommitteeMessage)
if !ok {
return pubsub.ValidationReject
}

View File

@@ -20,7 +20,7 @@ import (
p2ptypes "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
)
@@ -39,13 +39,13 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
type args struct {
ctx context.Context
pid peer.ID
msg *ethpb.SyncCommitteeMessage
msg *prysmv2.SyncCommitteeMessage
topic string
}
tests := []struct {
name string
svc *Service
setupSvc func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string)
setupSvc func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string)
args args
want pubsub.ValidationResult
}{
@@ -58,7 +58,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
msg.BlockRoot = headRoot[:]
s.cfg.DB = db
@@ -69,7 +69,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: "junk",
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -86,7 +86,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -96,7 +96,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: fmt.Sprintf(defaultTopic, fakeDigest, 0),
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 10,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -113,7 +113,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -125,7 +125,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -142,7 +142,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -159,7 +159,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -176,7 +176,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -207,7 +207,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -224,7 +224,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -250,7 +250,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -267,7 +267,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -298,7 +298,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -315,7 +315,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SyncCommitteeMessage, topic string) (*Service, string) {
setupSvc: func(s *Service, msg *prysmv2.SyncCommitteeMessage, topic string) (*Service, string) {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -352,7 +352,7 @@ func TestService_ValidateSyncCommittee(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SyncCommitteeMessage{
msg: &prysmv2.SyncCommitteeMessage{
Slot: 1,
ValidatorIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],

View File

@@ -13,7 +13,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
p2ptypes "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/interfaces/version"
@@ -44,7 +44,7 @@ func (s *Service) validateSyncContributionAndProof(ctx context.Context, pid peer
traceutil.AnnotateError(span, err)
return pubsub.ValidationReject
}
m, ok := raw.(*ethpb.SignedContributionAndProof)
m, ok := raw.(*prysmv2.SignedContributionAndProof)
if !ok {
return pubsub.ValidationReject
}

View File

@@ -25,7 +25,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing"
p2ppb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/interfaces"
@@ -49,13 +49,13 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
type args struct {
ctx context.Context
pid peer.ID
msg *ethpb.SignedContributionAndProof
msg *prysmv2.SignedContributionAndProof
topic string
}
tests := []struct {
name string
svc *Service
setupSvc func(s *Service, msg *ethpb.SignedContributionAndProof) *Service
setupSvc func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service
args args
want pubsub.ValidationResult
}{
@@ -68,7 +68,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
msg.Message.Contribution.BlockRoot = headRoot[:]
s.cfg.DB = db
@@ -79,10 +79,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: "junk",
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -104,7 +104,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -114,10 +114,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 30,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -139,7 +139,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -152,10 +152,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -177,7 +177,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -195,10 +195,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -220,7 +220,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
assert.NoError(t, s.initCaches())
@@ -252,10 +252,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -277,7 +277,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
msg.Message.Contribution.BlockRoot = headRoot[:]
@@ -310,10 +310,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -335,7 +335,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
msg.Message.Contribution.BlockRoot = headRoot[:]
@@ -376,10 +376,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -401,7 +401,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
s.cfg.DB = db
msg.Message.Contribution.BlockRoot = headRoot[:]
@@ -452,10 +452,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -477,7 +477,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
msg.Message.Contribution.BlockRoot = headRoot[:]
s.cfg.DB = db
@@ -524,10 +524,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],
@@ -549,7 +549,7 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
StateNotifier: chainService.StateNotifier(),
OperationNotifier: chainService.OperationNotifier(),
}),
setupSvc: func(s *Service, msg *ethpb.SignedContributionAndProof) *Service {
setupSvc: func(s *Service, msg *prysmv2.SignedContributionAndProof) *Service {
s.cfg.StateGen = stategen.New(db)
msg.Message.Contribution.BlockRoot = headRoot[:]
s.cfg.DB = db
@@ -609,10 +609,10 @@ func TestService_ValidateSyncContributionAndProof(t *testing.T) {
ctx: context.Background(),
pid: "random",
topic: defaultTopic,
msg: &ethpb.SignedContributionAndProof{
Message: &ethpb.ContributionAndProof{
msg: &prysmv2.SignedContributionAndProof{
Message: &prysmv2.ContributionAndProof{
AggregatorIndex: 1,
Contribution: &ethpb.SyncCommitteeContribution{
Contribution: &prysmv2.SyncCommitteeContribution{
Slot: 1,
SubcommitteeIndex: 1,
BlockRoot: params.BeaconConfig().ZeroHash[:],

View File

@@ -815,8 +815,9 @@ def prysm_deps():
name = "com_github_ferranbt_fastssz",
importpath = "github.com/ferranbt/fastssz",
nofuzz = True,
sum = "h1:zhTRgKvm7CQxlGwJ7KfqT1AYDr2Q/caS6qrC7fwEtxU=",
version = "v0.0.0-20210526181520-7df50c8568f8",
replace = "github.com/rauljordan/fastssz",
sum = "h1:CoD/RaM9s8qfHA7jAqntW3jv+z9zPBXaxCaCByrKOmg=",
version = "v0.0.0-20210622230010-a131010e198f",
)
go_repository(
@@ -1792,6 +1793,13 @@ def prysm_deps():
sum = "h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=",
version = "v1.11.7",
)
go_repository(
name = "com_github_klauspost_cpuid",
importpath = "github.com/klauspost/cpuid",
sum = "h1:CCtW0xUnWGVINKvE/WWOYKdsPV6mawAtvQuSl8guwQs=",
version = "v1.2.3",
)
go_repository(
name = "com_github_klauspost_cpuid_v2",
importpath = "github.com/klauspost/cpuid/v2",
@@ -2301,6 +2309,13 @@ def prysm_deps():
sum = "h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=",
version = "v0.0.0-20190213212951-d06e56a500db",
)
go_repository(
name = "com_github_mitchellh_copystructure",
importpath = "github.com/mitchellh/copystructure",
sum = "h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=",
version = "v1.2.0",
)
go_repository(
name = "com_github_mitchellh_go_homedir",
importpath = "github.com/mitchellh/go-homedir",
@@ -2333,6 +2348,12 @@ def prysm_deps():
version = "v1.4.1",
)
go_repository(
name = "com_github_mitchellh_reflectwalk",
importpath = "github.com/mitchellh/reflectwalk",
sum = "h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=",
version = "v1.0.2",
)
go_repository(
name = "com_github_modern_go_concurrent",
importpath = "github.com/modern-go/concurrent",
@@ -2768,8 +2789,8 @@ def prysm_deps():
go_repository(
name = "com_github_prysmaticlabs_protoc_gen_go_cast",
importpath = "github.com/prysmaticlabs/protoc-gen-go-cast",
sum = "h1:o79JO4UMwfc1hYbRO0fGkYD9mpLvN9pif7ez8jMLZiM=",
version = "v0.0.0-20210505221644-3b823fdaca7f",
sum = "h1:k7CCMwN7VooQ7GhfySnaVyI4/9+QbhJTdasoC6VOZOI=",
version = "v0.0.0-20210504233148-1e141af6a0a1",
)
go_repository(
@@ -3871,16 +3892,3 @@ def prysm_deps():
sum = "h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM=",
version = "v1.16.0",
)
go_repository(
name = "com_github_mitchellh_copystructure",
importpath = "github.com/mitchellh/copystructure",
sum = "h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=",
version = "v1.2.0",
)
go_repository(
name = "com_github_mitchellh_reflectwalk",
importpath = "github.com/mitchellh/reflectwalk",
sum = "h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=",
version = "v1.0.2",
)

2
go.mod
View File

@@ -134,3 +134,5 @@ replace github.com/json-iterator/go => github.com/prestonvanloon/go v1.1.7-0.201
// See https://github.com/prysmaticlabs/grpc-gateway/issues/2
replace github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/prysmaticlabs/grpc-gateway/v2 v2.3.1-0.20210604200058-f148bcf3f503
replace github.com/ferranbt/fastssz => github.com/rauljordan/fastssz v0.0.0-20210622230010-a131010e198f

5
go.sum
View File

@@ -250,9 +250,6 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/ferranbt/fastssz v0.0.0-20210120143747-11b9eff30ea9/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM=
github.com/ferranbt/fastssz v0.0.0-20210526181520-7df50c8568f8 h1:zhTRgKvm7CQxlGwJ7KfqT1AYDr2Q/caS6qrC7fwEtxU=
github.com/ferranbt/fastssz v0.0.0-20210526181520-7df50c8568f8/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as=
@@ -1080,6 +1077,8 @@ github.com/prysmaticlabs/prombbolt v0.0.0-20210126082820-9b7adba6db7c h1:9PHRCuO
github.com/prysmaticlabs/prombbolt v0.0.0-20210126082820-9b7adba6db7c/go.mod h1:ZRws458tYHS/Zs936OQ6oCrL+Ict5O4Xpwve1UQ6C9M=
github.com/prysmaticlabs/protoc-gen-go-cast v0.0.0-20210504233148-1e141af6a0a1 h1:k7CCMwN7VooQ7GhfySnaVyI4/9+QbhJTdasoC6VOZOI=
github.com/prysmaticlabs/protoc-gen-go-cast v0.0.0-20210504233148-1e141af6a0a1/go.mod h1:au9l1XcWNEKixIlSRzEe54fYGhyELWgJJIxKu8W75Mc=
github.com/rauljordan/fastssz v0.0.0-20210622230010-a131010e198f h1:CoD/RaM9s8qfHA7jAqntW3jv+z9zPBXaxCaCByrKOmg=
github.com/rauljordan/fastssz v0.0.0-20210622230010-a131010e198f/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc=

View File

@@ -10,9 +10,9 @@ import (
reflect "reflect"
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
)
const (
@@ -28,7 +28,7 @@ const _ = proto.ProtoPackageIsVersion4
var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50000,
Name: "ethereum.eth.ext.cast_type",
@@ -36,7 +36,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{
Filename: "proto/eth/ext/options.proto",
},
{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50001,
Name: "ethereum.eth.ext.ssz_size",
@@ -44,7 +44,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{
Filename: "proto/eth/ext/options.proto",
},
{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50002,
Name: "ethereum.eth.ext.ssz_max",
@@ -52,7 +52,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{
Filename: "proto/eth/ext/options.proto",
},
{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50003,
Name: "ethereum.eth.ext.spec_name",
@@ -61,7 +61,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{
},
}
// Extension fields to descriptor.FieldOptions.
// Extension fields to descriptorpb.FieldOptions.
var (
// optional string cast_type = 50000;
E_CastType = &file_proto_eth_ext_options_proto_extTypes[0]
@@ -108,7 +108,7 @@ var file_proto_eth_ext_options_proto_rawDesc = []byte{
}
var file_proto_eth_ext_options_proto_goTypes = []interface{}{
(*descriptor.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
(*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
}
var file_proto_eth_ext_options_proto_depIdxs = []int32{
0, // 0: ethereum.eth.ext.cast_type:extendee -> google.protobuf.FieldOptions

View File

@@ -1,5 +1,5 @@
// Code generated by fastssz. DO NOT EDIT.
// Hash: 28c1d0c4de772ed8f3489d6bd0c97ac4b6921765a322766ee88b620cccf8ed1e
// Hash: d88bf8c7704ca0134277d0433309d72a5ca08f331f5390137c627b6bd1f5711b
package v1
import (

View File

@@ -24,10 +24,8 @@ proto_library(
"attestation.proto",
"beacon_block.proto",
"beacon_chain.proto",
"sync_committee.proto",
"node.proto",
"validator.proto",
":ssz_proto_files",
# ":generated_swagger_proto",
],
visibility = ["//visibility:public"],
@@ -57,8 +55,6 @@ ssz_gen_marshal(
"AttestationData",
"AttesterSlashing",
"BeaconBlock",
"BeaconBlockAltair",
"BeaconBlockBodyAltair",
"BeaconBlockHeader",
"Checkpoint",
"Deposit",
@@ -67,13 +63,10 @@ ssz_gen_marshal(
"ProposerSlashing",
"SignedAggregateAttestationAndProof",
"SignedBeaconBlock",
"SignedBeaconBlockAltair",
"SignedBeaconBlockHeader",
"SignedVoluntaryExit",
"Validator",
"VoluntaryExit",
"SyncCommitteeMessage",
"SyncCommitteeContribution",
"ContributionAndProof",
"SignedContributionAndProof",
],
@@ -154,18 +147,6 @@ go_library(
], # keep
)
ssz_proto_files(
name = "ssz_proto_files",
srcs = [
"beacon_block_altair.proto",
],
config = select({
"//conditions:default": "mainnet",
"//proto:ssz_mainnet": "mainnet",
"//proto:ssz_minimal": "minimal",
}),
)
#protoc_gen_openapiv2(
# name = "swagger",
# json_names_for_fields = True,

View File

@@ -1,559 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1alpha1/beacon_block_altair.proto
package eth
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type SignedBeaconBlockAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Block *BeaconBlockAltair `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SignedBeaconBlockAltair) Reset() {
*x = SignedBeaconBlockAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignedBeaconBlockAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignedBeaconBlockAltair) ProtoMessage() {}
func (x *SignedBeaconBlockAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignedBeaconBlockAltair.ProtoReflect.Descriptor instead.
func (*SignedBeaconBlockAltair) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{0}
}
func (x *SignedBeaconBlockAltair) GetBlock() *BeaconBlockAltair {
if x != nil {
return x.Block
}
return nil
}
func (x *SignedBeaconBlockAltair) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type BeaconBlockAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
ProposerIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,2,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
ParentRoot []byte `protobuf:"bytes,3,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"`
StateRoot []byte `protobuf:"bytes,4,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"`
Body *BeaconBlockBodyAltair `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
}
func (x *BeaconBlockAltair) Reset() {
*x = BeaconBlockAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconBlockAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconBlockAltair) ProtoMessage() {}
func (x *BeaconBlockAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BeaconBlockAltair.ProtoReflect.Descriptor instead.
func (*BeaconBlockAltair) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{1}
}
func (x *BeaconBlockAltair) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *BeaconBlockAltair) GetProposerIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.ProposerIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *BeaconBlockAltair) GetParentRoot() []byte {
if x != nil {
return x.ParentRoot
}
return nil
}
func (x *BeaconBlockAltair) GetStateRoot() []byte {
if x != nil {
return x.StateRoot
}
return nil
}
func (x *BeaconBlockAltair) GetBody() *BeaconBlockBodyAltair {
if x != nil {
return x.Body
}
return nil
}
type BeaconBlockBodyAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RandaoReveal []byte `protobuf:"bytes,1,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty" ssz-size:"96"`
Eth1Data *Eth1Data `protobuf:"bytes,2,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"`
Graffiti []byte `protobuf:"bytes,3,opt,name=graffiti,proto3" json:"graffiti,omitempty" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `protobuf:"bytes,4,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `protobuf:"bytes,5,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty" ssz-max:"2"`
Attestations []*Attestation `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty" ssz-max:"128"`
Deposits []*Deposit `protobuf:"bytes,7,rep,name=deposits,proto3" json:"deposits,omitempty" ssz-max:"16"`
VoluntaryExits []*SignedVoluntaryExit `protobuf:"bytes,8,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty" ssz-max:"16"`
SyncAggregate *SyncAggregate `protobuf:"bytes,9,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"`
}
func (x *BeaconBlockBodyAltair) Reset() {
*x = BeaconBlockBodyAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconBlockBodyAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconBlockBodyAltair) ProtoMessage() {}
func (x *BeaconBlockBodyAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BeaconBlockBodyAltair.ProtoReflect.Descriptor instead.
func (*BeaconBlockBodyAltair) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{2}
}
func (x *BeaconBlockBodyAltair) GetRandaoReveal() []byte {
if x != nil {
return x.RandaoReveal
}
return nil
}
func (x *BeaconBlockBodyAltair) GetEth1Data() *Eth1Data {
if x != nil {
return x.Eth1Data
}
return nil
}
func (x *BeaconBlockBodyAltair) GetGraffiti() []byte {
if x != nil {
return x.Graffiti
}
return nil
}
func (x *BeaconBlockBodyAltair) GetProposerSlashings() []*ProposerSlashing {
if x != nil {
return x.ProposerSlashings
}
return nil
}
func (x *BeaconBlockBodyAltair) GetAttesterSlashings() []*AttesterSlashing {
if x != nil {
return x.AttesterSlashings
}
return nil
}
func (x *BeaconBlockBodyAltair) GetAttestations() []*Attestation {
if x != nil {
return x.Attestations
}
return nil
}
func (x *BeaconBlockBodyAltair) GetDeposits() []*Deposit {
if x != nil {
return x.Deposits
}
return nil
}
func (x *BeaconBlockBodyAltair) GetVoluntaryExits() []*SignedVoluntaryExit {
if x != nil {
return x.VoluntaryExits
}
return nil
}
func (x *BeaconBlockBodyAltair) GetSyncAggregate() *SyncAggregate {
if x != nil {
return x.SyncAggregate
}
return nil
}
type SyncAggregate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SyncCommitteeBits github_com_prysmaticlabs_go_bitfield.Bitvector512 `protobuf:"bytes,1,opt,name=sync_committee_bits,json=syncCommitteeBits,proto3" json:"sync_committee_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector512" ssz-size:"64"`
SyncCommitteeSignature []byte `protobuf:"bytes,2,opt,name=sync_committee_signature,json=syncCommitteeSignature,proto3" json:"sync_committee_signature,omitempty" ssz-size:"96"`
}
func (x *SyncAggregate) Reset() {
*x = SyncAggregate{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncAggregate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncAggregate) ProtoMessage() {}
func (x *SyncAggregate) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncAggregate.ProtoReflect.Descriptor instead.
func (*SyncAggregate) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{3}
}
func (x *SyncAggregate) GetSyncCommitteeBits() github_com_prysmaticlabs_go_bitfield.Bitvector512 {
if x != nil {
return x.SyncCommitteeBits
}
return github_com_prysmaticlabs_go_bitfield.Bitvector512(nil)
}
func (x *SyncAggregate) GetSyncCommitteeSignature() []byte {
if x != nil {
return x.SyncCommitteeSignature
}
return nil
}
var File_proto_eth_v1alpha1_beacon_block_altair_proto protoreflect.FileDescriptor
var file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDesc = []byte{
0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68,
0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61,
0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x7f, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65,
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74,
0x61, 0x69, 0x72, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a,
0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x22, 0xc6, 0x02, 0x0a, 0x11, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61,
0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c,
0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70,
0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65,
0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e,
0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5,
0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74,
0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74,
0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65,
0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74,
0x61, 0x69, 0x72, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xa4, 0x05, 0x0a, 0x15, 0x42, 0x65,
0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74,
0x61, 0x69, 0x72, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65,
0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02,
0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c,
0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31,
0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22,
0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69,
0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52,
0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e,
0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11,
0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18,
0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70,
0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65,
0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74,
0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f,
0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18,
0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78,
0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72,
0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74,
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65,
0x22, 0xbe, 0x01, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,
0x74, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42,
0x3b, 0x8a, 0xb5, 0x18, 0x02, 0x36, 0x34, 0x82, 0xb5, 0x18, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c,
0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e,
0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x35, 0x31, 0x32, 0x52, 0x11, 0x73, 0x79,
0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x42, 0x69, 0x74, 0x73, 0x12,
0x40, 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65,
0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x16, 0x73, 0x79, 0x6e, 0x63, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x42, 0x9c, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42,
0x16, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61,
0x69, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c,
0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74, 0x68,
0xaa, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e,
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescOnce sync.Once
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData = file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDesc
)
func file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP() []byte {
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescOnce.Do(func() {
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData)
})
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData
}
var file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_eth_v1alpha1_beacon_block_altair_proto_goTypes = []interface{}{
(*SignedBeaconBlockAltair)(nil), // 0: ethereum.eth.v1alpha1.SignedBeaconBlockAltair
(*BeaconBlockAltair)(nil), // 1: ethereum.eth.v1alpha1.BeaconBlockAltair
(*BeaconBlockBodyAltair)(nil), // 2: ethereum.eth.v1alpha1.BeaconBlockBodyAltair
(*SyncAggregate)(nil), // 3: ethereum.eth.v1alpha1.SyncAggregate
(*Eth1Data)(nil), // 4: ethereum.eth.v1alpha1.Eth1Data
(*ProposerSlashing)(nil), // 5: ethereum.eth.v1alpha1.ProposerSlashing
(*AttesterSlashing)(nil), // 6: ethereum.eth.v1alpha1.AttesterSlashing
(*Attestation)(nil), // 7: ethereum.eth.v1alpha1.Attestation
(*Deposit)(nil), // 8: ethereum.eth.v1alpha1.Deposit
(*SignedVoluntaryExit)(nil), // 9: ethereum.eth.v1alpha1.SignedVoluntaryExit
}
var file_proto_eth_v1alpha1_beacon_block_altair_proto_depIdxs = []int32{
1, // 0: ethereum.eth.v1alpha1.SignedBeaconBlockAltair.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockAltair
2, // 1: ethereum.eth.v1alpha1.BeaconBlockAltair.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyAltair
4, // 2: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data
5, // 3: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing
6, // 4: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing
7, // 5: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attestations:type_name -> ethereum.eth.v1alpha1.Attestation
8, // 6: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.deposits:type_name -> ethereum.eth.v1alpha1.Deposit
9, // 7: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit
3, // 8: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_proto_eth_v1alpha1_beacon_block_altair_proto_init() }
func file_proto_eth_v1alpha1_beacon_block_altair_proto_init() {
if File_proto_eth_v1alpha1_beacon_block_altair_proto != nil {
return
}
file_proto_eth_v1alpha1_attestation_proto_init()
file_proto_eth_v1alpha1_beacon_block_proto_init()
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignedBeaconBlockAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconBlockAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconBlockBodyAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncAggregate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1alpha1_beacon_block_altair_proto_goTypes,
DependencyIndexes: file_proto_eth_v1alpha1_beacon_block_altair_proto_depIdxs,
MessageInfos: file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes,
}.Build()
File_proto_eth_v1alpha1_beacon_block_altair_proto = out.File
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDesc = nil
file_proto_eth_v1alpha1_beacon_block_altair_proto_goTypes = nil
file_proto_eth_v1alpha1_beacon_block_altair_proto_depIdxs = nil
}

1186
proto/eth/v1alpha1/generated.ssz.go Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -326,42 +326,6 @@ func local_request_BeaconNodeValidator_GetBlock_0(ctx context.Context, marshaler
}
var (
filter_BeaconNodeValidator_GetBlockV2_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_BeaconNodeValidator_GetBlockV2_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq BlockRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidator_GetBlockV2_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetBlockV2(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_GetBlockV2_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq BlockRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidator_GetBlockV2_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetBlockV2(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidator_ProposeBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedBeaconBlock
var metadata runtime.ServerMetadata
@@ -396,40 +360,6 @@ func local_request_BeaconNodeValidator_ProposeBlock_0(ctx context.Context, marsh
}
func request_BeaconNodeValidator_ProposeBlockV2_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedBeaconBlockAltair
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ProposeBlockV2(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_ProposeBlockV2_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedBeaconBlockAltair
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ProposeBlockV2(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconNodeValidator_GetAttestationData_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
@@ -568,74 +498,6 @@ func local_request_BeaconNodeValidator_SubmitSignedAggregateSelectionProof_0(ctx
}
func request_BeaconNodeValidator_GetSyncCommitteeContribution_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeContributionRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetSyncCommitteeContribution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_GetSyncCommitteeContribution_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeContributionRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetSyncCommitteeContribution(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidator_SubmitSignedContributionAndProof_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedContributionAndProof
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SubmitSignedContributionAndProof(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_SubmitSignedContributionAndProof_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedContributionAndProof
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SubmitSignedContributionAndProof(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidator_ProposeExit_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedVoluntaryExit
var metadata runtime.ServerMetadata
@@ -704,94 +566,6 @@ func local_request_BeaconNodeValidator_SubscribeCommitteeSubnets_0(ctx context.C
}
var (
filter_BeaconNodeValidator_GetSyncSubcommitteeIndex_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_BeaconNodeValidator_GetSyncSubcommitteeIndex_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncSubcommitteeIndexRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidator_GetSyncSubcommitteeIndex_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetSyncSubcommitteeIndex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_GetSyncSubcommitteeIndex_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncSubcommitteeIndexRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidator_GetSyncSubcommitteeIndex_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetSyncSubcommitteeIndex(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidator_GetSyncMessageBlockRoot_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetSyncMessageBlockRoot(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_GetSyncMessageBlockRoot_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetSyncMessageBlockRoot(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidator_SubmitSyncMessage_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeMessage
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SubmitSyncMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_SubmitSyncMessage_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeMessage
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SubmitSyncMessage(ctx, &protoReq)
return msg, metadata, err
}
// RegisterBeaconNodeValidatorHandlerServer registers the http handlers for service BeaconNodeValidator to "mux".
// UnaryRPC :call BeaconNodeValidatorServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -957,29 +731,6 @@ func RegisterBeaconNodeValidatorHandlerServer(ctx context.Context, mux *runtime.
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetBlockV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetBlockV2")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_GetBlockV2_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetBlockV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_ProposeBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1003,29 +754,6 @@ func RegisterBeaconNodeValidatorHandlerServer(ctx context.Context, mux *runtime.
})
mux.Handle("POST", pattern_BeaconNodeValidator_ProposeBlockV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/ProposeBlockV2")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_ProposeBlockV2_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_ProposeBlockV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1118,52 +846,6 @@ func RegisterBeaconNodeValidatorHandlerServer(ctx context.Context, mux *runtime.
})
mux.Handle("POST", pattern_BeaconNodeValidator_GetSyncCommitteeContribution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetSyncCommitteeContribution")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_GetSyncCommitteeContribution_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetSyncCommitteeContribution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_SubmitSignedContributionAndProof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedContributionAndProof")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_SubmitSignedContributionAndProof_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_SubmitSignedContributionAndProof_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_ProposeExit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1210,75 +892,6 @@ func RegisterBeaconNodeValidatorHandlerServer(ctx context.Context, mux *runtime.
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetSyncSubcommitteeIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetSyncSubcommitteeIndex")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_GetSyncSubcommitteeIndex_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetSyncSubcommitteeIndex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetSyncMessageBlockRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetSyncMessageBlockRoot")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_GetSyncMessageBlockRoot_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetSyncMessageBlockRoot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_SubmitSyncMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSyncMessage")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_SubmitSyncMessage_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_SubmitSyncMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -1500,26 +1113,6 @@ func RegisterBeaconNodeValidatorHandlerClient(ctx context.Context, mux *runtime.
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetBlockV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetBlockV2")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_GetBlockV2_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetBlockV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_ProposeBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1540,26 +1133,6 @@ func RegisterBeaconNodeValidatorHandlerClient(ctx context.Context, mux *runtime.
})
mux.Handle("POST", pattern_BeaconNodeValidator_ProposeBlockV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/ProposeBlockV2")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_ProposeBlockV2_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_ProposeBlockV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1640,46 +1213,6 @@ func RegisterBeaconNodeValidatorHandlerClient(ctx context.Context, mux *runtime.
})
mux.Handle("POST", pattern_BeaconNodeValidator_GetSyncCommitteeContribution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetSyncCommitteeContribution")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_GetSyncCommitteeContribution_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetSyncCommitteeContribution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_SubmitSignedContributionAndProof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedContributionAndProof")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_SubmitSignedContributionAndProof_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_SubmitSignedContributionAndProof_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_ProposeExit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1720,66 +1253,6 @@ func RegisterBeaconNodeValidatorHandlerClient(ctx context.Context, mux *runtime.
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetSyncSubcommitteeIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetSyncSubcommitteeIndex")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_GetSyncSubcommitteeIndex_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetSyncSubcommitteeIndex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetSyncMessageBlockRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetSyncMessageBlockRoot")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_GetSyncMessageBlockRoot_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_GetSyncMessageBlockRoot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidator_SubmitSyncMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSyncMessage")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_SubmitSyncMessage_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_SubmitSyncMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -1802,12 +1275,8 @@ var (
pattern_BeaconNodeValidator_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "block"}, ""))
pattern_BeaconNodeValidator_GetBlockV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "blockV2"}, ""))
pattern_BeaconNodeValidator_ProposeBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "block"}, ""))
pattern_BeaconNodeValidator_ProposeBlockV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "blockV2"}, ""))
pattern_BeaconNodeValidator_GetAttestationData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "attestation"}, ""))
pattern_BeaconNodeValidator_ProposeAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "attestation"}, ""))
@@ -1816,19 +1285,9 @@ var (
pattern_BeaconNodeValidator_SubmitSignedAggregateSelectionProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "aggregate"}, ""))
pattern_BeaconNodeValidator_GetSyncCommitteeContribution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "contribution_and_proof"}, ""))
pattern_BeaconNodeValidator_SubmitSignedContributionAndProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "signed_contribution_and_proof"}, ""))
pattern_BeaconNodeValidator_ProposeExit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "exit"}, ""))
pattern_BeaconNodeValidator_SubscribeCommitteeSubnets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"eth", "v1alpha1", "validator", "subnet", "subscribe"}, ""))
pattern_BeaconNodeValidator_GetSyncSubcommitteeIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"eth", "v1alpha1", "sync_subcommittee_index"}, ""))
pattern_BeaconNodeValidator_GetSyncMessageBlockRoot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "sync_message_block_root"}, ""))
pattern_BeaconNodeValidator_SubmitSyncMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "sync_message"}, ""))
)
var (
@@ -1850,12 +1309,8 @@ var (
forward_BeaconNodeValidator_GetBlock_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_GetBlockV2_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_ProposeBlock_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_ProposeBlockV2_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_GetAttestationData_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_ProposeAttestation_0 = runtime.ForwardResponseMessage
@@ -1864,17 +1319,7 @@ var (
forward_BeaconNodeValidator_SubmitSignedAggregateSelectionProof_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_GetSyncCommitteeContribution_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_SubmitSignedContributionAndProof_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_ProposeExit_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_SubscribeCommitteeSubnets_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_GetSyncSubcommitteeIndex_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_GetSyncMessageBlockRoot_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_SubmitSyncMessage_0 = runtime.ForwardResponseMessage
)

View File

@@ -20,9 +20,7 @@ import "google/protobuf/empty.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/beacon_block.proto";
import "proto/eth/v1alpha1/beacon_block_altair.proto";
import "proto/eth/v1alpha1/attestation.proto";
import "proto/eth/v1alpha1/sync_committee.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
@@ -147,17 +145,6 @@ service BeaconNodeValidator {
};
}
// Retrieves the latest valid beacon block to be proposed on the beacon chain.
//
// The server returns a new beacon block, without proposer signature, that can be
// proposed on the beacon chain. The block should be filled with all the necessary
// data for proposer to sign. This block is versioned from Altair onwards.
rpc GetBlockV2(BlockRequest) returns (BeaconBlockAltair) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/blockV2"
};
}
// Sends the newly signed beacon block to beacon node.
//
// The validator sends the newly signed beacon block to the beacon node so the beacon block can
@@ -170,18 +157,6 @@ service BeaconNodeValidator {
};
}
// Sends the newly signed beacon block to beacon node.
//
// The validator sends the newly signed beacon block to the beacon node so the beacon block can
// be included in the beacon chain. The beacon node is expected to validate and process the
// beacon block into its state. This block is versioned from Altair onwards.
rpc ProposeBlockV2(SignedBeaconBlockAltair) returns (ProposeResponse) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/blockV2"
body: "*"
};
}
// Retrieves the latest valid attestation data to be attested on the beacon chain.
//
// The server returns the latest valid data which represents the correct vote
@@ -223,24 +198,6 @@ service BeaconNodeValidator {
};
}
// Retrieve sync committee contribution to the beacon node to aggregate all matching sync committee messages with the same slot and root.
// the beacon node responses with a sync committee contribution object for the validator to sign over.
rpc GetSyncCommitteeContribution(SyncCommitteeContributionRequest) returns (SyncCommitteeContribution) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/contribution_and_proof"
body: "*"
};
}
// Submit a signed sync committee contribution and proof object, the beacon node will broadcast the
// signed contribution and proof object.
rpc SubmitSignedContributionAndProof(SignedContributionAndProof) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/signed_contribution_and_proof"
body: "*"
};
}
// Propose to leave the list of active validators.
//
// The beacon node is expected to validate the request and make it available for inclusion in
@@ -263,32 +220,6 @@ service BeaconNodeValidator {
body: "*"
};
}
// Retrieves the sync subcommittee index of a given validator.
//
// The server returns the sync subcommittee index given the validator public key,
// if the validator does not exist in the sync committee then an error would be returned.
// The subcommittee index is used for the aggregation of sync committee message.
rpc GetSyncSubcommitteeIndex(SyncSubcommitteeIndexRequest) returns (SyncSubcommitteeIndexRespond) {
option (google.api.http) = {
get: "/eth/v1alpha1/sync_subcommittee_index"
};
}
// Retrieves a sync committee message block root to be signed over as part of sync committee duty.
rpc GetSyncMessageBlockRoot(google.protobuf.Empty) returns (SyncMessageBlockRootResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/sync_message_block_root"
};
}
// Submits a sync committee message to be broadcasted over network. This is part of sync committee duty.
rpc SubmitSyncMessage(SyncCommitteeMessage) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/sync_message"
body: "*"
};
}
}
message DomainRequest {
@@ -622,35 +553,3 @@ message ValidatorInfo {
// Only valid for states ACTIVE, EXITING, SLASHING.
uint64 effective_balance = 7;
}
// SyncSubcommitteeIndexRequest requests sync subcommittee index given the validator public key.
message SyncSubcommitteeIndexRequest {
// The validator's public key.
bytes public_key = 1 [(ethereum.eth.ext.ssz_size) = "48"];
// The slot of validator's assignment.
uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
// SyncSubcommitteeIndexRespond responds index of the sync subcommittee of a given validator.
message SyncSubcommitteeIndexRespond {
// The subcommittee index itself.
// If the total validator count is not sufficient, there could be more than one index.
repeated uint64 indices = 1;
}
// SyncMessageBlockRootResponse for beacon chain validator to retrieve and
// to sign over the block root as part of sync committee duty to facilitate light client.
message SyncMessageBlockRootResponse {
// The block root of the head block.
bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
message SyncCommitteeContributionRequest {
// Slot for which the aggregation request applies.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// 48 byte public key of the validator.
bytes public_key = 2 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
// Subnet ID of where this contribution and proof should be broadcast to.
uint64 subnet_id = 3;
}

153
proto/prysm/v2/BUILD.bazel Normal file
View File

@@ -0,0 +1,153 @@
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
##############################################################################
# Go
##############################################################################
# gazelle:ignore
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("//proto:ssz_proto_library.bzl", "ssz_proto_files")
load("//tools:ssz.bzl", "SSZ_DEPS", "ssz_gen_marshal")
##############################################################################
# OpenAPI (Swagger) V2
##############################################################################
load("@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2:defs.bzl", "protoc_gen_openapiv2")
proto_library(
name = "proto",
srcs = [
":ssz_proto_files",
"sync_committee.proto",
"validator.proto",
],
visibility = ["//visibility:public"],
deps = [
"//proto/eth/ext:proto",
"//proto/eth/v1alpha1:proto",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:descriptor_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:timestamp_proto",
"@go_googleapis//google/api:annotations_proto",
],
)
##############################################################################
# Go
##############################################################################
ssz_gen_marshal(
name = "ssz_generated_files",
go_proto = ":go_proto",
includes = [
"@com_github_prysmaticlabs_eth2_types//:go_default_library",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
],
objs = [
"BeaconBlockAltair",
"BeaconBlockBodyAltair",
"SignedBeaconBlockAltair",
"SyncAggregate",
"SyncCommitteeMessage",
"SyncCommitteeContribution",
"ContributionAndProof",
"SignedContributionAndProof",
],
)
go_proto_library(
name = "go_proto",
compilers = [
"@com_github_prysmaticlabs_protoc_gen_go_cast//:go_cast_grpc",
],
importpath = "github.com/prysmaticlabs/prysm/proto/prysm/v2",
proto = ":proto",
visibility = ["//visibility:public"],
deps = [
"//proto/eth/ext:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
"@com_github_golang_protobuf//proto:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
"@com_github_prysmaticlabs_eth2_types//:go_default_library",
"@go_googleapis//google/api:annotations_go_proto",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
],
)
go_proto_library(
name = "go_grpc_gateway_library",
compilers = [
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-grpc-gateway:go_gen_grpc_gateway",
],
embed = [":go_proto"],
importpath = "github.com/prysmaticlabs/prysm/proto/prysm/v2",
protos = [":proto"],
visibility = ["//visibility:private"],
deps = [
"//proto/eth/ext:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
"@go_googleapis//google/api:annotations_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
],
)
go_library(
name = "go_default_library",
srcs = [
"aliases.go",
":ssz_generated_files", # keep
],
embed = [
":go_grpc_gateway_library",
],
importpath = "github.com/prysmaticlabs/prysm/proto/prysm/v2",
visibility = ["//visibility:public"],
deps = SSZ_DEPS + [
"//proto/eth/ext:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//runtime:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//utilities:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//grpclog:go_default_library",
"@org_golang_google_grpc//metadata:go_default_library",
"@org_golang_google_grpc//status:go_default_library",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
"@com_github_golang_protobuf//proto:go_default_library",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library", # keep
"@go_googleapis//google/api:annotations_go_proto",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
], # keep
)
ssz_proto_files(
name = "ssz_proto_files",
srcs = [
"beacon_block.proto",
],
config = select({
"//conditions:default": "mainnet",
"//proto:ssz_mainnet": "mainnet",
"//proto:ssz_minimal": "minimal",
}),
)

View File

@@ -0,0 +1,5 @@
package v2
type BeaconBlock = BeaconBlockAltair
type BeaconBlockBody = BeaconBlockBodyAltair
type SignedBeaconBlock = SignedBeaconBlockAltair

555
proto/prysm/v2/beacon_block.pb.go generated Executable file
View File

@@ -0,0 +1,555 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/prysm/v2/beacon_block.proto
package v2
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type SignedBeaconBlockAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Block *BeaconBlockAltair `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SignedBeaconBlockAltair) Reset() {
*x = SignedBeaconBlockAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignedBeaconBlockAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignedBeaconBlockAltair) ProtoMessage() {}
func (x *SignedBeaconBlockAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignedBeaconBlockAltair.ProtoReflect.Descriptor instead.
func (*SignedBeaconBlockAltair) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_beacon_block_proto_rawDescGZIP(), []int{0}
}
func (x *SignedBeaconBlockAltair) GetBlock() *BeaconBlockAltair {
if x != nil {
return x.Block
}
return nil
}
func (x *SignedBeaconBlockAltair) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type BeaconBlockAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
ProposerIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,2,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
ParentRoot []byte `protobuf:"bytes,3,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"`
StateRoot []byte `protobuf:"bytes,4,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"`
Body *BeaconBlockBodyAltair `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
}
func (x *BeaconBlockAltair) Reset() {
*x = BeaconBlockAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconBlockAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconBlockAltair) ProtoMessage() {}
func (x *BeaconBlockAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BeaconBlockAltair.ProtoReflect.Descriptor instead.
func (*BeaconBlockAltair) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_beacon_block_proto_rawDescGZIP(), []int{1}
}
func (x *BeaconBlockAltair) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *BeaconBlockAltair) GetProposerIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.ProposerIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *BeaconBlockAltair) GetParentRoot() []byte {
if x != nil {
return x.ParentRoot
}
return nil
}
func (x *BeaconBlockAltair) GetStateRoot() []byte {
if x != nil {
return x.StateRoot
}
return nil
}
func (x *BeaconBlockAltair) GetBody() *BeaconBlockBodyAltair {
if x != nil {
return x.Body
}
return nil
}
type BeaconBlockBodyAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RandaoReveal []byte `protobuf:"bytes,1,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty" ssz-size:"96"`
Eth1Data *v1alpha1.Eth1Data `protobuf:"bytes,2,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"`
Graffiti []byte `protobuf:"bytes,3,opt,name=graffiti,proto3" json:"graffiti,omitempty" ssz-size:"32"`
ProposerSlashings []*v1alpha1.ProposerSlashing `protobuf:"bytes,4,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty" ssz-max:"16"`
AttesterSlashings []*v1alpha1.AttesterSlashing `protobuf:"bytes,5,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty" ssz-max:"2"`
Attestations []*v1alpha1.Attestation `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty" ssz-max:"128"`
Deposits []*v1alpha1.Deposit `protobuf:"bytes,7,rep,name=deposits,proto3" json:"deposits,omitempty" ssz-max:"16"`
VoluntaryExits []*v1alpha1.SignedVoluntaryExit `protobuf:"bytes,8,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty" ssz-max:"16"`
SyncAggregate *SyncAggregate `protobuf:"bytes,9,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"`
}
func (x *BeaconBlockBodyAltair) Reset() {
*x = BeaconBlockBodyAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconBlockBodyAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconBlockBodyAltair) ProtoMessage() {}
func (x *BeaconBlockBodyAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BeaconBlockBodyAltair.ProtoReflect.Descriptor instead.
func (*BeaconBlockBodyAltair) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_beacon_block_proto_rawDescGZIP(), []int{2}
}
func (x *BeaconBlockBodyAltair) GetRandaoReveal() []byte {
if x != nil {
return x.RandaoReveal
}
return nil
}
func (x *BeaconBlockBodyAltair) GetEth1Data() *v1alpha1.Eth1Data {
if x != nil {
return x.Eth1Data
}
return nil
}
func (x *BeaconBlockBodyAltair) GetGraffiti() []byte {
if x != nil {
return x.Graffiti
}
return nil
}
func (x *BeaconBlockBodyAltair) GetProposerSlashings() []*v1alpha1.ProposerSlashing {
if x != nil {
return x.ProposerSlashings
}
return nil
}
func (x *BeaconBlockBodyAltair) GetAttesterSlashings() []*v1alpha1.AttesterSlashing {
if x != nil {
return x.AttesterSlashings
}
return nil
}
func (x *BeaconBlockBodyAltair) GetAttestations() []*v1alpha1.Attestation {
if x != nil {
return x.Attestations
}
return nil
}
func (x *BeaconBlockBodyAltair) GetDeposits() []*v1alpha1.Deposit {
if x != nil {
return x.Deposits
}
return nil
}
func (x *BeaconBlockBodyAltair) GetVoluntaryExits() []*v1alpha1.SignedVoluntaryExit {
if x != nil {
return x.VoluntaryExits
}
return nil
}
func (x *BeaconBlockBodyAltair) GetSyncAggregate() *SyncAggregate {
if x != nil {
return x.SyncAggregate
}
return nil
}
type SyncAggregate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SyncCommitteeBits github_com_prysmaticlabs_go_bitfield.Bitvector512 `protobuf:"bytes,1,opt,name=sync_committee_bits,json=syncCommitteeBits,proto3" json:"sync_committee_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector512" ssz-size:"64"`
SyncCommitteeSignature []byte `protobuf:"bytes,2,opt,name=sync_committee_signature,json=syncCommitteeSignature,proto3" json:"sync_committee_signature,omitempty" ssz-size:"96"`
}
func (x *SyncAggregate) Reset() {
*x = SyncAggregate{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncAggregate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncAggregate) ProtoMessage() {}
func (x *SyncAggregate) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_beacon_block_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncAggregate.ProtoReflect.Descriptor instead.
func (*SyncAggregate) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_beacon_block_proto_rawDescGZIP(), []int{3}
}
func (x *SyncAggregate) GetSyncCommitteeBits() github_com_prysmaticlabs_go_bitfield.Bitvector512 {
if x != nil {
return x.SyncCommitteeBits
}
return github_com_prysmaticlabs_go_bitfield.Bitvector512(nil)
}
func (x *SyncAggregate) GetSyncCommitteeSignature() []byte {
if x != nil {
return x.SyncCommitteeSignature
}
return nil
}
var File_proto_prysm_v2_beacon_block_proto protoreflect.FileDescriptor
var file_proto_prysm_v2_beacon_block_proto_rawDesc = []byte{
0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32,
0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72,
0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74,
0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x7b, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x42,
0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72,
0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02,
0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc2, 0x02,
0x0a, 0x11, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74,
0x61, 0x69, 0x72, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f,
0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52,
0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65,
0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82,
0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72,
0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32,
0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72,
0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33,
0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a,
0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65,
0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72,
0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x04, 0x62, 0x6f,
0x64, 0x79, 0x22, 0xa0, 0x05, 0x0a, 0x15, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x2b, 0x0a, 0x0d,
0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e,
0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68,
0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65,
0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66,
0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33,
0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70,
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61,
0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65,
0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74,
0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64,
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92,
0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12,
0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69,
0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79,
0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f,
0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0e,
0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67,
0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72,
0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67,
0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x5f,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x42, 0x3b, 0x8a, 0xb5, 0x18, 0x02, 0x36, 0x34, 0x82, 0xb5, 0x18, 0x31,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d,
0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x35, 0x31,
0x32, 0x52, 0x11, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65,
0x42, 0x69, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x16,
0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x69, 0x67,
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x85, 0x01, 0x0a, 0x15, 0x6f, 0x72, 0x67, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32,
0x42, 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70,
0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d,
0x2f, 0x76, 0x32, 0x3b, 0x76, 0x32, 0xaa, 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
0x6d, 0x2e, 0x50, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x11, 0x45, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x50, 0x72, 0x79, 0x73, 0x6d, 0x5c, 0x76, 0x32, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_prysm_v2_beacon_block_proto_rawDescOnce sync.Once
file_proto_prysm_v2_beacon_block_proto_rawDescData = file_proto_prysm_v2_beacon_block_proto_rawDesc
)
func file_proto_prysm_v2_beacon_block_proto_rawDescGZIP() []byte {
file_proto_prysm_v2_beacon_block_proto_rawDescOnce.Do(func() {
file_proto_prysm_v2_beacon_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_prysm_v2_beacon_block_proto_rawDescData)
})
return file_proto_prysm_v2_beacon_block_proto_rawDescData
}
var file_proto_prysm_v2_beacon_block_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_prysm_v2_beacon_block_proto_goTypes = []interface{}{
(*SignedBeaconBlockAltair)(nil), // 0: ethereum.prysm.v2.SignedBeaconBlockAltair
(*BeaconBlockAltair)(nil), // 1: ethereum.prysm.v2.BeaconBlockAltair
(*BeaconBlockBodyAltair)(nil), // 2: ethereum.prysm.v2.BeaconBlockBodyAltair
(*SyncAggregate)(nil), // 3: ethereum.prysm.v2.SyncAggregate
(*v1alpha1.Eth1Data)(nil), // 4: ethereum.eth.v1alpha1.Eth1Data
(*v1alpha1.ProposerSlashing)(nil), // 5: ethereum.eth.v1alpha1.ProposerSlashing
(*v1alpha1.AttesterSlashing)(nil), // 6: ethereum.eth.v1alpha1.AttesterSlashing
(*v1alpha1.Attestation)(nil), // 7: ethereum.eth.v1alpha1.Attestation
(*v1alpha1.Deposit)(nil), // 8: ethereum.eth.v1alpha1.Deposit
(*v1alpha1.SignedVoluntaryExit)(nil), // 9: ethereum.eth.v1alpha1.SignedVoluntaryExit
}
var file_proto_prysm_v2_beacon_block_proto_depIdxs = []int32{
1, // 0: ethereum.prysm.v2.SignedBeaconBlockAltair.block:type_name -> ethereum.prysm.v2.BeaconBlockAltair
2, // 1: ethereum.prysm.v2.BeaconBlockAltair.body:type_name -> ethereum.prysm.v2.BeaconBlockBodyAltair
4, // 2: ethereum.prysm.v2.BeaconBlockBodyAltair.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data
5, // 3: ethereum.prysm.v2.BeaconBlockBodyAltair.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing
6, // 4: ethereum.prysm.v2.BeaconBlockBodyAltair.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing
7, // 5: ethereum.prysm.v2.BeaconBlockBodyAltair.attestations:type_name -> ethereum.eth.v1alpha1.Attestation
8, // 6: ethereum.prysm.v2.BeaconBlockBodyAltair.deposits:type_name -> ethereum.eth.v1alpha1.Deposit
9, // 7: ethereum.prysm.v2.BeaconBlockBodyAltair.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit
3, // 8: ethereum.prysm.v2.BeaconBlockBodyAltair.sync_aggregate:type_name -> ethereum.prysm.v2.SyncAggregate
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_proto_prysm_v2_beacon_block_proto_init() }
func file_proto_prysm_v2_beacon_block_proto_init() {
if File_proto_prysm_v2_beacon_block_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_prysm_v2_beacon_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignedBeaconBlockAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_prysm_v2_beacon_block_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconBlockAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_prysm_v2_beacon_block_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconBlockBodyAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_prysm_v2_beacon_block_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncAggregate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_prysm_v2_beacon_block_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_prysm_v2_beacon_block_proto_goTypes,
DependencyIndexes: file_proto_prysm_v2_beacon_block_proto_depIdxs,
MessageInfos: file_proto_prysm_v2_beacon_block_proto_msgTypes,
}.Build()
File_proto_prysm_v2_beacon_block_proto = out.File
file_proto_prysm_v2_beacon_block_proto_rawDesc = nil
file_proto_prysm_v2_beacon_block_proto_goTypes = nil
file_proto_prysm_v2_beacon_block_proto_depIdxs = nil
}

View File

@@ -13,20 +13,21 @@
// limitations under the License.
syntax = "proto3";
package ethereum.eth.v1alpha1;
package ethereum.prysm.v2;
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/attestation.proto";
import "proto/eth/v1alpha1/beacon_block.proto";
import "proto/eth/v1alpha1/attestation.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option csharp_namespace = "Ethereum.Prysm.V2";
option go_package = "github.com/prysmaticlabs/prysm/proto/prysm/v2;v2";
option java_multiple_files = true;
option java_outer_classname = "BeaconBlockAltairProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
option java_outer_classname = "BeaconBlockProto";
option java_package = "org.ethereum.prysm.v2";
option php_namespace = "Ethereum\\Prysm\\v2";
// The signed version of a Altair(HF1) beacon block.
// The signed version of a (HF1) beacon block.
message SignedBeaconBlockAltair {
// The unsigned beacon block itself.
BeaconBlockAltair block = 1;
@@ -35,7 +36,7 @@ message SignedBeaconBlockAltair {
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// The unsigned version of a Altair(HF1) beacon block.. The message does not contain a validator signature.
// The unsigned version of a (HF1) beacon block. The message does not contain a validator signature.
message BeaconBlockAltair {
// Beacon chain slot that this block represents.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
@@ -49,18 +50,18 @@ message BeaconBlockAltair {
// 32 byte root of the resulting state after processing this block.
bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// The Altair beacon block body.
// The beacon block body.
BeaconBlockBodyAltair body = 5;
}
// The block body of an Altair(HF1) beacon block.
// The new addition for Altair is SyncAggregate for light client support.
// The block body of an (HF1) beacon block.
// The new addition for is SyncAggregate for light client support.
message BeaconBlockBodyAltair {
// The validators RANDAO reveal 96 byte value.
bytes randao_reveal = 1 [(ethereum.eth.ext.ssz_size) = "96"];
// A reference to the Ethereum 1.x chain.
Eth1Data eth1_data = 2;
ethereum.eth.v1alpha1.Eth1Data eth1_data = 2;
// 32 byte field of arbitrary data. This field may contain any data and
// is not used for anything other than a fun message.
@@ -70,21 +71,21 @@ message BeaconBlockBodyAltair {
// Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block
// At most MAX_PROPOSER_SLASHINGS.
repeated ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"];
repeated ethereum.eth.v1alpha1.ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_ATTESTER_SLASHINGS.
repeated AttesterSlashing attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"];
repeated ethereum.eth.v1alpha1.AttesterSlashing attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"];
// At most MAX_ATTESTATIONS.
repeated Attestation attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"];
repeated ethereum.eth.v1alpha1.Attestation attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"];
// At most MAX_DEPOSITS.
repeated Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"];
repeated ethereum.eth.v1alpha1.Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_VOLUNTARY_EXITS.
repeated SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"];
repeated ethereum.eth.v1alpha1.SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"];
// Sync aggregate object to track sync committee votes for light client support. [New in Altair]
// Sync aggregate object to track sync committee votes for light client support. [New in ]
SyncAggregate sync_aggregate = 9;
}

1193
proto/prysm/v2/generated.ssz.go Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -2,9 +2,9 @@
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1alpha1/sync_committee.proto
// source: proto/prysm/v2/sync_committee.proto
package eth
package v2
import (
reflect "reflect"
@@ -43,7 +43,7 @@ type SyncCommitteeMessage struct {
func (x *SyncCommitteeMessage) Reset() {
*x = SyncCommitteeMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[0]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -56,7 +56,7 @@ func (x *SyncCommitteeMessage) String() string {
func (*SyncCommitteeMessage) ProtoMessage() {}
func (x *SyncCommitteeMessage) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[0]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -69,7 +69,7 @@ func (x *SyncCommitteeMessage) ProtoReflect() protoreflect.Message {
// Deprecated: Use SyncCommitteeMessage.ProtoReflect.Descriptor instead.
func (*SyncCommitteeMessage) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{0}
return file_proto_prysm_v2_sync_committee_proto_rawDescGZIP(), []int{0}
}
func (x *SyncCommitteeMessage) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
@@ -115,7 +115,7 @@ type SyncCommitteeContribution struct {
func (x *SyncCommitteeContribution) Reset() {
*x = SyncCommitteeContribution{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[1]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -128,7 +128,7 @@ func (x *SyncCommitteeContribution) String() string {
func (*SyncCommitteeContribution) ProtoMessage() {}
func (x *SyncCommitteeContribution) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[1]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -141,7 +141,7 @@ func (x *SyncCommitteeContribution) ProtoReflect() protoreflect.Message {
// Deprecated: Use SyncCommitteeContribution.ProtoReflect.Descriptor instead.
func (*SyncCommitteeContribution) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{1}
return file_proto_prysm_v2_sync_committee_proto_rawDescGZIP(), []int{1}
}
func (x *SyncCommitteeContribution) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
@@ -192,7 +192,7 @@ type ContributionAndProof struct {
func (x *ContributionAndProof) Reset() {
*x = ContributionAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[2]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -205,7 +205,7 @@ func (x *ContributionAndProof) String() string {
func (*ContributionAndProof) ProtoMessage() {}
func (x *ContributionAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[2]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -218,7 +218,7 @@ func (x *ContributionAndProof) ProtoReflect() protoreflect.Message {
// Deprecated: Use ContributionAndProof.ProtoReflect.Descriptor instead.
func (*ContributionAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{2}
return file_proto_prysm_v2_sync_committee_proto_rawDescGZIP(), []int{2}
}
func (x *ContributionAndProof) GetAggregatorIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
@@ -254,7 +254,7 @@ type SignedContributionAndProof struct {
func (x *SignedContributionAndProof) Reset() {
*x = SignedContributionAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[3]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -267,7 +267,7 @@ func (x *SignedContributionAndProof) String() string {
func (*SignedContributionAndProof) ProtoMessage() {}
func (x *SignedContributionAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[3]
mi := &file_proto_prysm_v2_sync_committee_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -280,7 +280,7 @@ func (x *SignedContributionAndProof) ProtoReflect() protoreflect.Message {
// Deprecated: Use SignedContributionAndProof.ProtoReflect.Descriptor instead.
func (*SignedContributionAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{3}
return file_proto_prysm_v2_sync_committee_proto_rawDescGZIP(), []int{3}
}
func (x *SignedContributionAndProof) GetMessage() *ContributionAndProof {
@@ -297,111 +297,109 @@ func (x *SignedContributionAndProof) GetSignature() []byte {
return nil
}
var File_proto_eth_v1alpha1_sync_committee_proto protoreflect.FileDescriptor
var File_proto_prysm_v2_sync_committee_proto protoreflect.FileDescriptor
var file_proto_eth_v1alpha1_sync_committee_proto_rawDesc = []byte{
0x0a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f,
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x02,
0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
var file_proto_prysm_v2_sync_committee_proto_rawDesc = []byte{
0x0a, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32,
0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x02, 0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x40,
0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5,
0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79,
0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d,
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74,
0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04,
0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65,
0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18,
0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc1,
0x02, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65,
0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04,
0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d,
0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x25,
0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28,
0x04, 0x52, 0x11, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x12, 0x66, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3b,
0x8a, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x82, 0xb5, 0x18, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61,
0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c,
0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5,
0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12,
0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64,
0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74,
0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67,
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73,
0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74,
0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02,
0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2d, 0x0a,
0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x75, 0x62, 0x63, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x66, 0x0a, 0x10,
0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3b, 0x8a, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x82, 0xb5,
0x18, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79,
0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69,
0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72,
0x31, 0x32, 0x38, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x42, 0x69, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52,
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x80, 0x02, 0x0a, 0x14, 0x43,
0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72,
0x6f, 0x6f, 0x66, 0x12, 0x61, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f,
0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82,
0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72,
0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32,
0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f,
0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74,
0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x0f,
0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0e, 0x73,
0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x89, 0x01,
0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x45, 0x0a, 0x07,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42,
0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x31, 0x32, 0x38, 0x52, 0x0f, 0x61, 0x67, 0x67,
0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x09,
0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42,
0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
0x72, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x61, 0x0a, 0x10, 0x61,
0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c,
0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0f, 0x61,
0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x50,
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72,
0x6f, 0x6f, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39,
0x36, 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f,
0x66, 0x22, 0x85, 0x01, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74,
0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66,
0x12, 0x41, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79,
0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09,
0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x98, 0x01, 0x0a, 0x19, 0x6f, 0x72,
0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61,
0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x45, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x87, 0x01, 0x0a, 0x15, 0x6f, 0x72,
0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d,
0x2e, 0x76, 0x32, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74,
0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c,
0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x3b, 0x76, 0x32, 0xaa, 0x02, 0x11, 0x45, 0x74,
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x50, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x56, 0x32, 0xca,
0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x50, 0x72, 0x79, 0x73, 0x6d,
0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_eth_v1alpha1_sync_committee_proto_rawDescOnce sync.Once
file_proto_eth_v1alpha1_sync_committee_proto_rawDescData = file_proto_eth_v1alpha1_sync_committee_proto_rawDesc
file_proto_prysm_v2_sync_committee_proto_rawDescOnce sync.Once
file_proto_prysm_v2_sync_committee_proto_rawDescData = file_proto_prysm_v2_sync_committee_proto_rawDesc
)
func file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP() []byte {
file_proto_eth_v1alpha1_sync_committee_proto_rawDescOnce.Do(func() {
file_proto_eth_v1alpha1_sync_committee_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1alpha1_sync_committee_proto_rawDescData)
func file_proto_prysm_v2_sync_committee_proto_rawDescGZIP() []byte {
file_proto_prysm_v2_sync_committee_proto_rawDescOnce.Do(func() {
file_proto_prysm_v2_sync_committee_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_prysm_v2_sync_committee_proto_rawDescData)
})
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescData
return file_proto_prysm_v2_sync_committee_proto_rawDescData
}
var file_proto_eth_v1alpha1_sync_committee_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_eth_v1alpha1_sync_committee_proto_goTypes = []interface{}{
(*SyncCommitteeMessage)(nil), // 0: ethereum.eth.v1alpha1.SyncCommitteeMessage
(*SyncCommitteeContribution)(nil), // 1: ethereum.eth.v1alpha1.SyncCommitteeContribution
(*ContributionAndProof)(nil), // 2: ethereum.eth.v1alpha1.ContributionAndProof
(*SignedContributionAndProof)(nil), // 3: ethereum.eth.v1alpha1.SignedContributionAndProof
var file_proto_prysm_v2_sync_committee_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_prysm_v2_sync_committee_proto_goTypes = []interface{}{
(*SyncCommitteeMessage)(nil), // 0: ethereum.prysm.v2.SyncCommitteeMessage
(*SyncCommitteeContribution)(nil), // 1: ethereum.prysm.v2.SyncCommitteeContribution
(*ContributionAndProof)(nil), // 2: ethereum.prysm.v2.ContributionAndProof
(*SignedContributionAndProof)(nil), // 3: ethereum.prysm.v2.SignedContributionAndProof
}
var file_proto_eth_v1alpha1_sync_committee_proto_depIdxs = []int32{
1, // 0: ethereum.eth.v1alpha1.ContributionAndProof.contribution:type_name -> ethereum.eth.v1alpha1.SyncCommitteeContribution
2, // 1: ethereum.eth.v1alpha1.SignedContributionAndProof.message:type_name -> ethereum.eth.v1alpha1.ContributionAndProof
var file_proto_prysm_v2_sync_committee_proto_depIdxs = []int32{
1, // 0: ethereum.prysm.v2.ContributionAndProof.contribution:type_name -> ethereum.prysm.v2.SyncCommitteeContribution
2, // 1: ethereum.prysm.v2.SignedContributionAndProof.message:type_name -> ethereum.prysm.v2.ContributionAndProof
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@@ -409,13 +407,13 @@ var file_proto_eth_v1alpha1_sync_committee_proto_depIdxs = []int32{
0, // [0:2] is the sub-list for field type_name
}
func init() { file_proto_eth_v1alpha1_sync_committee_proto_init() }
func file_proto_eth_v1alpha1_sync_committee_proto_init() {
if File_proto_eth_v1alpha1_sync_committee_proto != nil {
func init() { file_proto_prysm_v2_sync_committee_proto_init() }
func file_proto_prysm_v2_sync_committee_proto_init() {
if File_proto_prysm_v2_sync_committee_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_proto_prysm_v2_sync_committee_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncCommitteeMessage); i {
case 0:
return &v.state
@@ -427,7 +425,7 @@ func file_proto_eth_v1alpha1_sync_committee_proto_init() {
return nil
}
}
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_proto_prysm_v2_sync_committee_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncCommitteeContribution); i {
case 0:
return &v.state
@@ -439,7 +437,7 @@ func file_proto_eth_v1alpha1_sync_committee_proto_init() {
return nil
}
}
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_proto_prysm_v2_sync_committee_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContributionAndProof); i {
case 0:
return &v.state
@@ -451,7 +449,7 @@ func file_proto_eth_v1alpha1_sync_committee_proto_init() {
return nil
}
}
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_proto_prysm_v2_sync_committee_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignedContributionAndProof); i {
case 0:
return &v.state
@@ -468,18 +466,18 @@ func file_proto_eth_v1alpha1_sync_committee_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_eth_v1alpha1_sync_committee_proto_rawDesc,
RawDescriptor: file_proto_prysm_v2_sync_committee_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1alpha1_sync_committee_proto_goTypes,
DependencyIndexes: file_proto_eth_v1alpha1_sync_committee_proto_depIdxs,
MessageInfos: file_proto_eth_v1alpha1_sync_committee_proto_msgTypes,
GoTypes: file_proto_prysm_v2_sync_committee_proto_goTypes,
DependencyIndexes: file_proto_prysm_v2_sync_committee_proto_depIdxs,
MessageInfos: file_proto_prysm_v2_sync_committee_proto_msgTypes,
}.Build()
File_proto_eth_v1alpha1_sync_committee_proto = out.File
file_proto_eth_v1alpha1_sync_committee_proto_rawDesc = nil
file_proto_eth_v1alpha1_sync_committee_proto_goTypes = nil
file_proto_eth_v1alpha1_sync_committee_proto_depIdxs = nil
File_proto_prysm_v2_sync_committee_proto = out.File
file_proto_prysm_v2_sync_committee_proto_rawDesc = nil
file_proto_prysm_v2_sync_committee_proto_goTypes = nil
file_proto_prysm_v2_sync_committee_proto_depIdxs = nil
}

View File

@@ -13,16 +13,16 @@
// limitations under the License.
syntax = "proto3";
package ethereum.eth.v1alpha1;
package ethereum.prysm.v2;
import "proto/eth/ext/options.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option csharp_namespace = "Ethereum.Prysm.V2";
option go_package = "github.com/prysmaticlabs/prysm/proto/prysm/v2;v2";
option java_multiple_files = true;
option java_outer_classname = "SyncCommitteeProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
option java_package = "org.ethereum.prysm.v2";
option php_namespace = "Ethereum\\Prysm\\v2";
// Sync committee object to support light client.
message SyncCommitteeMessage {

796
proto/prysm/v2/validator.pb.go generated Executable file
View File

@@ -0,0 +1,796 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/prysm/v2/validator.proto
package v2
import (
context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type SyncMessageBlockRootResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Root []byte `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty" ssz-size:"32"`
}
func (x *SyncMessageBlockRootResponse) Reset() {
*x = SyncMessageBlockRootResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncMessageBlockRootResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncMessageBlockRootResponse) ProtoMessage() {}
func (x *SyncMessageBlockRootResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncMessageBlockRootResponse.ProtoReflect.Descriptor instead.
func (*SyncMessageBlockRootResponse) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_validator_proto_rawDescGZIP(), []int{0}
}
func (x *SyncMessageBlockRootResponse) GetRoot() []byte {
if x != nil {
return x.Root
}
return nil
}
type SyncSubcommitteeIndexRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" ssz-size:"48"`
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
}
func (x *SyncSubcommitteeIndexRequest) Reset() {
*x = SyncSubcommitteeIndexRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncSubcommitteeIndexRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncSubcommitteeIndexRequest) ProtoMessage() {}
func (x *SyncSubcommitteeIndexRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncSubcommitteeIndexRequest.ProtoReflect.Descriptor instead.
func (*SyncSubcommitteeIndexRequest) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_validator_proto_rawDescGZIP(), []int{1}
}
func (x *SyncSubcommitteeIndexRequest) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
func (x *SyncSubcommitteeIndexRequest) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
type SyncCommitteeContributionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" spec-name:"pubkey" ssz-size:"48"`
SubnetId uint64 `protobuf:"varint,3,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"`
}
func (x *SyncCommitteeContributionRequest) Reset() {
*x = SyncCommitteeContributionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncCommitteeContributionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncCommitteeContributionRequest) ProtoMessage() {}
func (x *SyncCommitteeContributionRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncCommitteeContributionRequest.ProtoReflect.Descriptor instead.
func (*SyncCommitteeContributionRequest) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_validator_proto_rawDescGZIP(), []int{2}
}
func (x *SyncCommitteeContributionRequest) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *SyncCommitteeContributionRequest) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
func (x *SyncCommitteeContributionRequest) GetSubnetId() uint64 {
if x != nil {
return x.SubnetId
}
return 0
}
type SyncSubcommitteeIndexResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Indices []uint64 `protobuf:"varint,1,rep,packed,name=indices,proto3" json:"indices,omitempty"`
}
func (x *SyncSubcommitteeIndexResponse) Reset() {
*x = SyncSubcommitteeIndexResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncSubcommitteeIndexResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncSubcommitteeIndexResponse) ProtoMessage() {}
func (x *SyncSubcommitteeIndexResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_prysm_v2_validator_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncSubcommitteeIndexResponse.ProtoReflect.Descriptor instead.
func (*SyncSubcommitteeIndexResponse) Descriptor() ([]byte, []int) {
return file_proto_prysm_v2_validator_proto_rawDescGZIP(), []int{3}
}
func (x *SyncSubcommitteeIndexResponse) GetIndices() []uint64 {
if x != nil {
return x.Indices
}
return nil
}
var File_proto_prysm_v2_validator_proto protoreflect.FileDescriptor
var file_proto_prysm_v2_validator_proto_rawDesc = []byte{
0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32,
0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x11, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d,
0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f,
0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f,
0x76, 0x32, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x1c, 0x53, 0x79, 0x6e, 0x63, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x04, 0x72,
0x6f, 0x6f, 0x74, 0x22, 0x87, 0x01, 0x0a, 0x1c, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38,
0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x04, 0x73,
0x6c, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61,
0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70,
0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0xb2, 0x01,
0x0a, 0x20, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43,
0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65,
0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04,
0x73, 0x6c, 0x6f, 0x74, 0x12, 0x2f, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38,
0x9a, 0xb5, 0x18, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c,
0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74,
0x49, 0x64, 0x22, 0x39, 0x0a, 0x1d, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x32, 0xd1, 0x08,
0x0a, 0x19, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x7b, 0x0a, 0x08, 0x47,
0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32,
0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61,
0x69, 0x72, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x65, 0x74, 0x68,
0x2f, 0x76, 0x32, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x88, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f,
0x70, 0x6f, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65,
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69,
0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41,
0x6c, 0x74, 0x61, 0x69, 0x72, 0x1a, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72,
0x6f, 0x70, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32,
0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
0x3a, 0x01, 0x2a, 0x12, 0x97, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d,
0x12, 0x2b, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x81, 0x01,
0x0a, 0x11, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70,
0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x74, 0x65, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x70,
0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x01,
0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2f,
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e,
0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d,
0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x70, 0x72, 0x79, 0x73,
0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0xb8, 0x01, 0x0a,
0x1c, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65,
0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76,
0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43,
0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72,
0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d,
0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70,
0x72, 0x6f, 0x6f, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xa7, 0x01, 0x0a, 0x20, 0x53, 0x75, 0x62, 0x6d,
0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x2d, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32,
0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x31, 0x2f, 0x70, 0x72,
0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x3a, 0x01,
0x2a, 0x42, 0x83, 0x01, 0x0a, 0x15, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61,
0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x3b, 0x76, 0x32, 0xaa,
0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x50, 0x72, 0x79, 0x73, 0x6d,
0x2e, 0x56, 0x32, 0xca, 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x50,
0x72, 0x79, 0x73, 0x6d, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_prysm_v2_validator_proto_rawDescOnce sync.Once
file_proto_prysm_v2_validator_proto_rawDescData = file_proto_prysm_v2_validator_proto_rawDesc
)
func file_proto_prysm_v2_validator_proto_rawDescGZIP() []byte {
file_proto_prysm_v2_validator_proto_rawDescOnce.Do(func() {
file_proto_prysm_v2_validator_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_prysm_v2_validator_proto_rawDescData)
})
return file_proto_prysm_v2_validator_proto_rawDescData
}
var file_proto_prysm_v2_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_prysm_v2_validator_proto_goTypes = []interface{}{
(*SyncMessageBlockRootResponse)(nil), // 0: ethereum.prysm.v2.SyncMessageBlockRootResponse
(*SyncSubcommitteeIndexRequest)(nil), // 1: ethereum.prysm.v2.SyncSubcommitteeIndexRequest
(*SyncCommitteeContributionRequest)(nil), // 2: ethereum.prysm.v2.SyncCommitteeContributionRequest
(*SyncSubcommitteeIndexResponse)(nil), // 3: ethereum.prysm.v2.SyncSubcommitteeIndexResponse
(*v1alpha1.BlockRequest)(nil), // 4: ethereum.eth.v1alpha1.BlockRequest
(*SignedBeaconBlockAltair)(nil), // 5: ethereum.prysm.v2.SignedBeaconBlockAltair
(*empty.Empty)(nil), // 6: google.protobuf.Empty
(*SyncCommitteeMessage)(nil), // 7: ethereum.prysm.v2.SyncCommitteeMessage
(*SignedContributionAndProof)(nil), // 8: ethereum.prysm.v2.SignedContributionAndProof
(*BeaconBlockAltair)(nil), // 9: ethereum.prysm.v2.BeaconBlockAltair
(*v1alpha1.ProposeResponse)(nil), // 10: ethereum.eth.v1alpha1.ProposeResponse
(*SyncCommitteeContribution)(nil), // 11: ethereum.prysm.v2.SyncCommitteeContribution
}
var file_proto_prysm_v2_validator_proto_depIdxs = []int32{
4, // 0: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetBlock:input_type -> ethereum.eth.v1alpha1.BlockRequest
5, // 1: ethereum.prysm.v2.BeaconNodeValidatorAltair.ProposeBlock:input_type -> ethereum.prysm.v2.SignedBeaconBlockAltair
6, // 2: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetSyncMessageBlockRoot:input_type -> google.protobuf.Empty
7, // 3: ethereum.prysm.v2.BeaconNodeValidatorAltair.SubmitSyncMessage:input_type -> ethereum.prysm.v2.SyncCommitteeMessage
1, // 4: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetSyncSubcommitteeIndex:input_type -> ethereum.prysm.v2.SyncSubcommitteeIndexRequest
2, // 5: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetSyncCommitteeContribution:input_type -> ethereum.prysm.v2.SyncCommitteeContributionRequest
8, // 6: ethereum.prysm.v2.BeaconNodeValidatorAltair.SubmitSignedContributionAndProof:input_type -> ethereum.prysm.v2.SignedContributionAndProof
9, // 7: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetBlock:output_type -> ethereum.prysm.v2.BeaconBlockAltair
10, // 8: ethereum.prysm.v2.BeaconNodeValidatorAltair.ProposeBlock:output_type -> ethereum.eth.v1alpha1.ProposeResponse
0, // 9: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetSyncMessageBlockRoot:output_type -> ethereum.prysm.v2.SyncMessageBlockRootResponse
6, // 10: ethereum.prysm.v2.BeaconNodeValidatorAltair.SubmitSyncMessage:output_type -> google.protobuf.Empty
3, // 11: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetSyncSubcommitteeIndex:output_type -> ethereum.prysm.v2.SyncSubcommitteeIndexResponse
11, // 12: ethereum.prysm.v2.BeaconNodeValidatorAltair.GetSyncCommitteeContribution:output_type -> ethereum.prysm.v2.SyncCommitteeContribution
6, // 13: ethereum.prysm.v2.BeaconNodeValidatorAltair.SubmitSignedContributionAndProof:output_type -> google.protobuf.Empty
7, // [7:14] is the sub-list for method output_type
0, // [0:7] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_proto_prysm_v2_validator_proto_init() }
func file_proto_prysm_v2_validator_proto_init() {
if File_proto_prysm_v2_validator_proto != nil {
return
}
file_proto_prysm_v2_beacon_block_proto_init()
file_proto_prysm_v2_sync_committee_proto_init()
if !protoimpl.UnsafeEnabled {
file_proto_prysm_v2_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncMessageBlockRootResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_prysm_v2_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncSubcommitteeIndexRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_prysm_v2_validator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncCommitteeContributionRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_prysm_v2_validator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncSubcommitteeIndexResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_prysm_v2_validator_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_prysm_v2_validator_proto_goTypes,
DependencyIndexes: file_proto_prysm_v2_validator_proto_depIdxs,
MessageInfos: file_proto_prysm_v2_validator_proto_msgTypes,
}.Build()
File_proto_prysm_v2_validator_proto = out.File
file_proto_prysm_v2_validator_proto_rawDesc = nil
file_proto_prysm_v2_validator_proto_goTypes = nil
file_proto_prysm_v2_validator_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// BeaconNodeValidatorAltairClient is the client API for BeaconNodeValidatorAltair service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BeaconNodeValidatorAltairClient interface {
GetBlock(ctx context.Context, in *v1alpha1.BlockRequest, opts ...grpc.CallOption) (*BeaconBlockAltair, error)
ProposeBlock(ctx context.Context, in *SignedBeaconBlockAltair, opts ...grpc.CallOption) (*v1alpha1.ProposeResponse, error)
GetSyncMessageBlockRoot(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SyncMessageBlockRootResponse, error)
SubmitSyncMessage(ctx context.Context, in *SyncCommitteeMessage, opts ...grpc.CallOption) (*empty.Empty, error)
GetSyncSubcommitteeIndex(ctx context.Context, in *SyncSubcommitteeIndexRequest, opts ...grpc.CallOption) (*SyncSubcommitteeIndexResponse, error)
GetSyncCommitteeContribution(ctx context.Context, in *SyncCommitteeContributionRequest, opts ...grpc.CallOption) (*SyncCommitteeContribution, error)
SubmitSignedContributionAndProof(ctx context.Context, in *SignedContributionAndProof, opts ...grpc.CallOption) (*empty.Empty, error)
}
type beaconNodeValidatorAltairClient struct {
cc grpc.ClientConnInterface
}
func NewBeaconNodeValidatorAltairClient(cc grpc.ClientConnInterface) BeaconNodeValidatorAltairClient {
return &beaconNodeValidatorAltairClient{cc}
}
func (c *beaconNodeValidatorAltairClient) GetBlock(ctx context.Context, in *v1alpha1.BlockRequest, opts ...grpc.CallOption) (*BeaconBlockAltair, error) {
out := new(BeaconBlockAltair)
err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetBlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconNodeValidatorAltairClient) ProposeBlock(ctx context.Context, in *SignedBeaconBlockAltair, opts ...grpc.CallOption) (*v1alpha1.ProposeResponse, error) {
out := new(v1alpha1.ProposeResponse)
err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/ProposeBlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconNodeValidatorAltairClient) GetSyncMessageBlockRoot(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SyncMessageBlockRootResponse, error) {
out := new(SyncMessageBlockRootResponse)
err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncMessageBlockRoot", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconNodeValidatorAltairClient) SubmitSyncMessage(ctx context.Context, in *SyncCommitteeMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSyncMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconNodeValidatorAltairClient) GetSyncSubcommitteeIndex(ctx context.Context, in *SyncSubcommitteeIndexRequest, opts ...grpc.CallOption) (*SyncSubcommitteeIndexResponse, error) {
out := new(SyncSubcommitteeIndexResponse)
err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncSubcommitteeIndex", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconNodeValidatorAltairClient) GetSyncCommitteeContribution(ctx context.Context, in *SyncCommitteeContributionRequest, opts ...grpc.CallOption) (*SyncCommitteeContribution, error) {
out := new(SyncCommitteeContribution)
err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncCommitteeContribution", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconNodeValidatorAltairClient) SubmitSignedContributionAndProof(ctx context.Context, in *SignedContributionAndProof, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSignedContributionAndProof", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// BeaconNodeValidatorAltairServer is the server API for BeaconNodeValidatorAltair service.
type BeaconNodeValidatorAltairServer interface {
GetBlock(context.Context, *v1alpha1.BlockRequest) (*BeaconBlockAltair, error)
ProposeBlock(context.Context, *SignedBeaconBlockAltair) (*v1alpha1.ProposeResponse, error)
GetSyncMessageBlockRoot(context.Context, *empty.Empty) (*SyncMessageBlockRootResponse, error)
SubmitSyncMessage(context.Context, *SyncCommitteeMessage) (*empty.Empty, error)
GetSyncSubcommitteeIndex(context.Context, *SyncSubcommitteeIndexRequest) (*SyncSubcommitteeIndexResponse, error)
GetSyncCommitteeContribution(context.Context, *SyncCommitteeContributionRequest) (*SyncCommitteeContribution, error)
SubmitSignedContributionAndProof(context.Context, *SignedContributionAndProof) (*empty.Empty, error)
}
// UnimplementedBeaconNodeValidatorAltairServer can be embedded to have forward compatible implementations.
type UnimplementedBeaconNodeValidatorAltairServer struct {
}
func (*UnimplementedBeaconNodeValidatorAltairServer) GetBlock(context.Context, *v1alpha1.BlockRequest) (*BeaconBlockAltair, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented")
}
func (*UnimplementedBeaconNodeValidatorAltairServer) ProposeBlock(context.Context, *SignedBeaconBlockAltair) (*v1alpha1.ProposeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProposeBlock not implemented")
}
func (*UnimplementedBeaconNodeValidatorAltairServer) GetSyncMessageBlockRoot(context.Context, *empty.Empty) (*SyncMessageBlockRootResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSyncMessageBlockRoot not implemented")
}
func (*UnimplementedBeaconNodeValidatorAltairServer) SubmitSyncMessage(context.Context, *SyncCommitteeMessage) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubmitSyncMessage not implemented")
}
func (*UnimplementedBeaconNodeValidatorAltairServer) GetSyncSubcommitteeIndex(context.Context, *SyncSubcommitteeIndexRequest) (*SyncSubcommitteeIndexResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSyncSubcommitteeIndex not implemented")
}
func (*UnimplementedBeaconNodeValidatorAltairServer) GetSyncCommitteeContribution(context.Context, *SyncCommitteeContributionRequest) (*SyncCommitteeContribution, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSyncCommitteeContribution not implemented")
}
func (*UnimplementedBeaconNodeValidatorAltairServer) SubmitSignedContributionAndProof(context.Context, *SignedContributionAndProof) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedContributionAndProof not implemented")
}
func RegisterBeaconNodeValidatorAltairServer(s *grpc.Server, srv BeaconNodeValidatorAltairServer) {
s.RegisterService(&_BeaconNodeValidatorAltair_serviceDesc, srv)
}
func _BeaconNodeValidatorAltair_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1alpha1.BlockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconNodeValidatorAltairServer).GetBlock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetBlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconNodeValidatorAltairServer).GetBlock(ctx, req.(*v1alpha1.BlockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconNodeValidatorAltair_ProposeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SignedBeaconBlockAltair)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconNodeValidatorAltairServer).ProposeBlock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.prysm.v2.BeaconNodeValidatorAltair/ProposeBlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconNodeValidatorAltairServer).ProposeBlock(ctx, req.(*SignedBeaconBlockAltair))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconNodeValidatorAltairServer).GetSyncMessageBlockRoot(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncMessageBlockRoot",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconNodeValidatorAltairServer).GetSyncMessageBlockRoot(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconNodeValidatorAltair_SubmitSyncMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncCommitteeMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconNodeValidatorAltairServer).SubmitSyncMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSyncMessage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconNodeValidatorAltairServer).SubmitSyncMessage(ctx, req.(*SyncCommitteeMessage))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncSubcommitteeIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconNodeValidatorAltairServer).GetSyncSubcommitteeIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncSubcommitteeIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconNodeValidatorAltairServer).GetSyncSubcommitteeIndex(ctx, req.(*SyncSubcommitteeIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconNodeValidatorAltair_GetSyncCommitteeContribution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncCommitteeContributionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconNodeValidatorAltairServer).GetSyncCommitteeContribution(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncCommitteeContribution",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconNodeValidatorAltairServer).GetSyncCommitteeContribution(ctx, req.(*SyncCommitteeContributionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SignedContributionAndProof)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconNodeValidatorAltairServer).SubmitSignedContributionAndProof(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSignedContributionAndProof",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconNodeValidatorAltairServer).SubmitSignedContributionAndProof(ctx, req.(*SignedContributionAndProof))
}
return interceptor(ctx, in, info, handler)
}
var _BeaconNodeValidatorAltair_serviceDesc = grpc.ServiceDesc{
ServiceName: "ethereum.prysm.v2.BeaconNodeValidatorAltair",
HandlerType: (*BeaconNodeValidatorAltairServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetBlock",
Handler: _BeaconNodeValidatorAltair_GetBlock_Handler,
},
{
MethodName: "ProposeBlock",
Handler: _BeaconNodeValidatorAltair_ProposeBlock_Handler,
},
{
MethodName: "GetSyncMessageBlockRoot",
Handler: _BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_Handler,
},
{
MethodName: "SubmitSyncMessage",
Handler: _BeaconNodeValidatorAltair_SubmitSyncMessage_Handler,
},
{
MethodName: "GetSyncSubcommitteeIndex",
Handler: _BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_Handler,
},
{
MethodName: "GetSyncCommitteeContribution",
Handler: _BeaconNodeValidatorAltair_GetSyncCommitteeContribution_Handler,
},
{
MethodName: "SubmitSignedContributionAndProof",
Handler: _BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/prysm/v2/validator.proto",
}

648
proto/prysm/v2/validator.pb.gw.go Executable file
View File

@@ -0,0 +1,648 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: proto/prysm/v2/validator.proto
/*
Package v2 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package v2
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/ptypes/empty"
emptypb "github.com/golang/protobuf/ptypes/empty"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
var _ = github_com_prysmaticlabs_eth2_types.Epoch(0)
var _ = emptypb.Empty{}
var _ = empty.Empty{}
var (
filter_BeaconNodeValidatorAltair_GetBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_BeaconNodeValidatorAltair_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorAltairClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq eth.BlockRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidatorAltair_GetBlock_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidatorAltair_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorAltairServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq eth.BlockRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidatorAltair_GetBlock_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetBlock(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidatorAltair_ProposeBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorAltairClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedBeaconBlockAltair
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ProposeBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidatorAltair_ProposeBlock_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorAltairServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedBeaconBlockAltair
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ProposeBlock(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorAltairClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetSyncMessageBlockRoot(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorAltairServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetSyncMessageBlockRoot(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidatorAltair_SubmitSyncMessage_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorAltairClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeMessage
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SubmitSyncMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidatorAltair_SubmitSyncMessage_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorAltairServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeMessage
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SubmitSyncMessage(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorAltairClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncSubcommitteeIndexRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetSyncSubcommitteeIndex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorAltairServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncSubcommitteeIndexRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetSyncSubcommitteeIndex(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorAltairClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeContributionRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetSyncCommitteeContribution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorAltairServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncCommitteeContributionRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetSyncCommitteeContribution(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorAltairClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedContributionAndProof
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SubmitSignedContributionAndProof(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorAltairServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignedContributionAndProof
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SubmitSignedContributionAndProof(ctx, &protoReq)
return msg, metadata, err
}
// RegisterBeaconNodeValidatorAltairHandlerServer registers the http handlers for service BeaconNodeValidatorAltair to "mux".
// UnaryRPC :call BeaconNodeValidatorAltairServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBeaconNodeValidatorAltairHandlerFromEndpoint instead.
func RegisterBeaconNodeValidatorAltairHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconNodeValidatorAltairServer) error {
mux.Handle("GET", pattern_BeaconNodeValidatorAltair_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetBlock")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidatorAltair_GetBlock_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_ProposeBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/ProposeBlock")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidatorAltair_ProposeBlock_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_ProposeBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncMessageBlockRoot")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_SubmitSyncMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSyncMessage")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidatorAltair_SubmitSyncMessage_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_SubmitSyncMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncSubcommitteeIndex")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncCommitteeContribution")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSignedContributionAndProof")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterBeaconNodeValidatorAltairHandlerFromEndpoint is same as RegisterBeaconNodeValidatorAltairHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBeaconNodeValidatorAltairHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterBeaconNodeValidatorAltairHandler(ctx, mux, conn)
}
// RegisterBeaconNodeValidatorAltairHandler registers the http handlers for service BeaconNodeValidatorAltair to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterBeaconNodeValidatorAltairHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterBeaconNodeValidatorAltairHandlerClient(ctx, mux, NewBeaconNodeValidatorAltairClient(conn))
}
// RegisterBeaconNodeValidatorAltairHandlerClient registers the http handlers for service BeaconNodeValidatorAltair
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconNodeValidatorAltairClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconNodeValidatorAltairClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "BeaconNodeValidatorAltairClient" to call the correct interceptors.
func RegisterBeaconNodeValidatorAltairHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconNodeValidatorAltairClient) error {
mux.Handle("GET", pattern_BeaconNodeValidatorAltair_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetBlock")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidatorAltair_GetBlock_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_ProposeBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/ProposeBlock")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidatorAltair_ProposeBlock_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_ProposeBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncMessageBlockRoot")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_SubmitSyncMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSyncMessage")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidatorAltair_SubmitSyncMessage_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_SubmitSyncMessage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncSubcommitteeIndex")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/GetSyncCommitteeContribution")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.prysm.v2.BeaconNodeValidatorAltair/SubmitSignedContributionAndProof")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_BeaconNodeValidatorAltair_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v2prysm", "validator", "block"}, ""))
pattern_BeaconNodeValidatorAltair_ProposeBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "validator", "block"}, ""))
pattern_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "validator", "sync_message_block_root"}, ""))
pattern_BeaconNodeValidatorAltair_SubmitSyncMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "validator", "sync_message"}, ""))
pattern_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"prysm", "v2", "sync_subcommittee_index"}, ""))
pattern_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "validator", "contribution_and_proof"}, ""))
pattern_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "validator", "signed_contribution_and_proof"}, ""))
)
var (
forward_BeaconNodeValidatorAltair_GetBlock_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidatorAltair_ProposeBlock_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidatorAltair_GetSyncMessageBlockRoot_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidatorAltair_SubmitSyncMessage_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidatorAltair_GetSyncSubcommitteeIndex_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidatorAltair_GetSyncCommitteeContribution_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidatorAltair_SubmitSignedContributionAndProof_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,137 @@
// Copyright 2020 Prysmatic Labs.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package ethereum.prysm.v2;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/validator.proto";
import "proto/prysm/v2/beacon_block.proto";
import "proto/prysm/v2/sync_committee.proto";
option csharp_namespace = "Ethereum.Prysm.V2";
option go_package = "github.com/prysmaticlabs/prysm/proto/prysm/v2;v2";
option java_multiple_files = true;
option java_outer_classname = "ValidatorProto";
option java_package = "org.ethereum.prysm.v2";
option php_namespace = "Ethereum\\Prysm\\v2";
// Beacon node validator API
//
// The beacon node validator API enables a validator to connect
// and perform its obligations on the Ethereum 2.0 phase 0 beacon chain.
service BeaconNodeValidatorAltair {
// Retrieves the latest valid beacon block to be proposed on the beacon chain.
//
// The server returns a new beacon block, without proposer signature, that can be
// proposed on the beacon chain. The block should be filled with all the necessary
// data for proposer to sign. This block is versioned from Altair onwards.
rpc GetBlock(ethereum.eth.v1alpha1.BlockRequest) returns (BeaconBlockAltair) {
option (google.api.http) = {
get: "/eth/v2prysm/validator/block"
};
}
// Sends the newly signed beacon block to beacon node.
//
// The validator sends the newly signed beacon block to the beacon node so the beacon block can
// be included in the beacon chain. The beacon node is expected to validate and process the
// beacon block into its state. This block is versioned from Altair onwards.
rpc ProposeBlock(SignedBeaconBlockAltair) returns (ethereum.eth.v1alpha1.ProposeResponse) {
option (google.api.http) = {
post: "/prysm/v2/validator/block"
body: "*"
};
}
// Retrieves a sync committee message block root to be signed over as part of sync committee duty.
rpc GetSyncMessageBlockRoot(google.protobuf.Empty) returns (SyncMessageBlockRootResponse) {
option (google.api.http) = {
get: "/prysm/v2/validator/sync_message_block_root"
};
}
// Submits a sync committee message to be broadcasted over network. This is part of sync committee duty.
rpc SubmitSyncMessage(SyncCommitteeMessage) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/prysm/v2/validator/sync_message"
body: "*"
};
}
// Retrieves the sync subcommittee index of a given validator.
//
// The server returns the sync subcommittee index given the validator public key,
// if the validator does not exist in the sync committee then an error would be returned.
// The subcommittee index is used for the aggregation of sync committee message.
rpc GetSyncSubcommitteeIndex(SyncSubcommitteeIndexRequest) returns (SyncSubcommitteeIndexResponse) {
option (google.api.http) = {
get: "/prysm/v2/sync_subcommittee_index"
};
}
// Retrieve sync committee contribution to the beacon node to aggregate all matching sync committee messages with the same slot and root.
// the beacon node responses with a sync committee contribution object for the validator to sign over.
rpc GetSyncCommitteeContribution(SyncCommitteeContributionRequest) returns (SyncCommitteeContribution) {
option (google.api.http) = {
post: "/prysm/v2/validator/contribution_and_proof"
body: "*"
};
}
// Submit a signed sync committee contribution and proof object, the beacon node will broadcast the
// signed contribution and proof object.
rpc SubmitSignedContributionAndProof(SignedContributionAndProof) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/prysm/v2/validator/signed_contribution_and_proof"
body: "*"
};
}
}
// SyncMessageBlockRootResponse for beacon chain validator to retrieve and
// to sign over the block root as part of sync committee duty to facilitate light client.
message SyncMessageBlockRootResponse {
// The block root of the head block.
bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
// SyncSubcommitteeIndexRequest requests sync subcommittee index given the validator public key.
message SyncSubcommitteeIndexRequest {
// The validator's public key.
bytes public_key = 1 [(ethereum.eth.ext.ssz_size) = "48"];
// The slot of validator's assignment.
uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
message SyncCommitteeContributionRequest {
// Slot for which the aggregation request applies.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// 48 byte public key of the validator.
bytes public_key = 2 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
// Subnet ID of where this contribution and proof should be broadcast to.
uint64 subnet_id = 3;
}
// SyncSubcommitteeIndexResponse responds index of the sync subcommittee of a given validator.
message SyncSubcommitteeIndexResponse {
// The subcommittee index itself.
// If the total validator count is not sufficient, there could be more than one index.
repeated uint64 indices = 1;
}

View File

@@ -13,6 +13,7 @@ proto_library(
deps = [
"//proto/beacon/rpc/v1:v1_proto",
"//proto/eth/v1alpha1:proto",
"//proto/prysm/v2:proto",
"//proto/eth/ext:proto",
"@com_google_protobuf//:empty_proto",
"@go_googleapis//google/api:annotations_proto",
@@ -32,6 +33,7 @@ go_proto_library(
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_prysmaticlabs_eth2_types//:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//proto/eth/ext:go_default_library",
"@go_googleapis//google/api:annotations_go_proto",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
@@ -54,6 +56,7 @@ go_proto_library(
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_prysmaticlabs_eth2_types//:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//proto/eth/ext:go_default_library",
"@go_googleapis//google/api:annotations_go_proto",
],

View File

@@ -16,6 +16,7 @@ import (
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
v2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -255,7 +256,7 @@ func (x *SignRequest) GetEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
func (x *SignRequest) GetBlockV2() *v1alpha1.BeaconBlockAltair {
func (x *SignRequest) GetBlockV2() *v2.BeaconBlockAltair {
if x, ok := x.GetObject().(*SignRequest_BlockV2); ok {
return x.BlockV2
}
@@ -291,7 +292,7 @@ type SignRequest_Epoch struct {
}
type SignRequest_BlockV2 struct {
BlockV2 *v1alpha1.BeaconBlockAltair `protobuf:"bytes,107,opt,name=blockV2,proto3,oneof"`
BlockV2 *v2.BeaconBlockAltair `protobuf:"bytes,107,opt,name=blockV2,proto3,oneof"`
}
func (*SignRequest_Block) isSignRequest_Object() {}
@@ -377,91 +378,91 @@ var file_proto_validator_accounts_v2_keymanager_proto_rawDesc = []byte{
0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f,
0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61,
0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x4e, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b,
0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x14, 0x76, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79,
0x73, 0x22, 0xa0, 0x05, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79,
0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x6f, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52,
0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a,
0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f,
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75,
0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70,
0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c,
0x52, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c,
0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x9c, 0x05, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c,
0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67,
0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x69, 0x67,
0x6e, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e,
0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x65, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74,
0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f,
0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
0x53, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64,
0x61, 0x74, 0x61, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65,
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74,
0x61, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x44, 0x61, 0x74, 0x61, 0x12, 0x7c, 0x0a, 0x1f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e,
0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63,
0x6b, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x10, 0x61, 0x74,
0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x66,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74,
0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f,
0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12,
0x7c, 0x0a, 0x1f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74,
0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f,
0x6f, 0x66, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52,
0x1c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x3a, 0x0a,
0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74,
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
0x68, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69,
0x74, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x73, 0x6c, 0x6f,
0x74, 0x18, 0x69, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69,
0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73,
0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x45, 0x0a,
0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5,
0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f,
0x6f, 0x66, 0x48, 0x00, 0x52, 0x1c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f,
0x6f, 0x66, 0x12, 0x3a, 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61,
0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x69, 0x74, 0x12, 0x42,
0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5,
0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79,
0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d,
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x65,
0x70, 0x6f, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x32, 0x18,
0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65,
0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48,
0x00, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x32, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
0x75, 0x72, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e,
0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45,
0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44,
0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32, 0xa7,
0x02, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12,
0x90, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69,
0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x1a, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c,
0x6f, 0x74, 0x12, 0x45, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x6a, 0x20, 0x01, 0x28,
0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f,
0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68,
0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x40, 0x0a, 0x07, 0x62, 0x6c, 0x6f,
0x63, 0x6b, 0x56, 0x32, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x42,
0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72,
0x48, 0x00, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x32, 0x42, 0x08, 0x0a, 0x06, 0x6f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
0x74, 0x75, 0x72, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f,
0x76, 0x32, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x2b, 0x2e, 0x65, 0x74,
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x18,
0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55,
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43,
0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4e, 0x49, 0x45,
0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32,
0xa7, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72,
0x12, 0x90, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69,
0x63, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x2b, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69,
0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65,
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22,
0x18, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65,
0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
@@ -487,7 +488,7 @@ var file_proto_validator_accounts_v2_keymanager_proto_goTypes = []interface{}{
(*v1alpha1.AttestationData)(nil), // 5: ethereum.eth.v1alpha1.AttestationData
(*v1alpha1.AggregateAttestationAndProof)(nil), // 6: ethereum.eth.v1alpha1.AggregateAttestationAndProof
(*v1alpha1.VoluntaryExit)(nil), // 7: ethereum.eth.v1alpha1.VoluntaryExit
(*v1alpha1.BeaconBlockAltair)(nil), // 8: ethereum.eth.v1alpha1.BeaconBlockAltair
(*v2.BeaconBlockAltair)(nil), // 8: ethereum.prysm.v2.BeaconBlockAltair
(*empty.Empty)(nil), // 9: google.protobuf.Empty
}
var file_proto_validator_accounts_v2_keymanager_proto_depIdxs = []int32{
@@ -495,7 +496,7 @@ var file_proto_validator_accounts_v2_keymanager_proto_depIdxs = []int32{
5, // 1: ethereum.validator.accounts.v2.SignRequest.attestation_data:type_name -> ethereum.eth.v1alpha1.AttestationData
6, // 2: ethereum.validator.accounts.v2.SignRequest.aggregate_attestation_and_proof:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProof
7, // 3: ethereum.validator.accounts.v2.SignRequest.exit:type_name -> ethereum.eth.v1alpha1.VoluntaryExit
8, // 4: ethereum.validator.accounts.v2.SignRequest.blockV2:type_name -> ethereum.eth.v1alpha1.BeaconBlockAltair
8, // 4: ethereum.validator.accounts.v2.SignRequest.blockV2:type_name -> ethereum.prysm.v2.BeaconBlockAltair
0, // 5: ethereum.validator.accounts.v2.SignResponse.status:type_name -> ethereum.validator.accounts.v2.SignResponse.Status
9, // 6: ethereum.validator.accounts.v2.RemoteSigner.ListValidatingPublicKeys:input_type -> google.protobuf.Empty
2, // 7: ethereum.validator.accounts.v2.RemoteSigner.Sign:input_type -> ethereum.validator.accounts.v2.SignRequest

View File

@@ -4,7 +4,7 @@ package ethereum.validator.accounts.v2;
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/attestation.proto";
import "proto/eth/v1alpha1/beacon_block.proto";
import "proto/eth/v1alpha1/beacon_block_altair.proto";
import "proto/prysm/v2/beacon_block.proto";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
@@ -62,7 +62,7 @@ message SignRequest {
uint64 epoch = 106 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Altair objects.
ethereum.eth.v1alpha1.BeaconBlockAltair blockV2 = 107;
ethereum.prysm.v2.BeaconBlockAltair blockV2 = 107;
}
}

View File

@@ -24,3 +24,5 @@ done
goimports -w "$mock_path/."
gofmt -s -w "$mock_path/."
GO11MODULE=on mockgen -package=mock -destination=shared/mock/beacon_validator_client_v2_mock.go github.com/prysmaticlabs/prysm/proto/prysm/v2 BeaconNodeValidatorAltairClient

View File

@@ -8,6 +8,7 @@ go_library(
deps = [
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/bytesutil:go_default_library",
],
)

View File

@@ -3,6 +3,7 @@ package copyutil
import (
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
)
@@ -112,22 +113,22 @@ func CopyBeaconBlockBody(body *ethpb.BeaconBlockBody) *ethpb.BeaconBlockBody {
}
// CopySignedBeaconBlockAltair copies the provided SignedBeaconBlock.
func CopySignedBeaconBlockAltair(sigBlock *ethpb.SignedBeaconBlockAltair) *ethpb.SignedBeaconBlockAltair {
func CopySignedBeaconBlockAltair(sigBlock *prysmv2.SignedBeaconBlock) *prysmv2.SignedBeaconBlock {
if sigBlock == nil {
return nil
}
return &ethpb.SignedBeaconBlockAltair{
return &prysmv2.SignedBeaconBlock{
Block: CopyBeaconBlockAltair(sigBlock.Block),
Signature: bytesutil.SafeCopyBytes(sigBlock.Signature),
}
}
// CopyBeaconBlockAltair copies the provided BeaconBlock.
func CopyBeaconBlockAltair(block *ethpb.BeaconBlockAltair) *ethpb.BeaconBlockAltair {
func CopyBeaconBlockAltair(block *prysmv2.BeaconBlock) *prysmv2.BeaconBlock {
if block == nil {
return nil
}
return &ethpb.BeaconBlockAltair{
return &prysmv2.BeaconBlock{
Slot: block.Slot,
ProposerIndex: block.ProposerIndex,
ParentRoot: bytesutil.SafeCopyBytes(block.ParentRoot),
@@ -137,11 +138,11 @@ func CopyBeaconBlockAltair(block *ethpb.BeaconBlockAltair) *ethpb.BeaconBlockAlt
}
// CopyBeaconBlockBodyAltair copies the provided BeaconBlockBody.
func CopyBeaconBlockBodyAltair(body *ethpb.BeaconBlockBodyAltair) *ethpb.BeaconBlockBodyAltair {
func CopyBeaconBlockBodyAltair(body *prysmv2.BeaconBlockBody) *prysmv2.BeaconBlockBody {
if body == nil {
return nil
}
return &ethpb.BeaconBlockBodyAltair{
return &prysmv2.BeaconBlockBody{
RandaoReveal: bytesutil.SafeCopyBytes(body.RandaoReveal),
Eth1Data: CopyETH1Data(body.Eth1Data),
Graffiti: bytesutil.SafeCopyBytes(body.Graffiti),
@@ -329,11 +330,11 @@ func CopyValidator(val *ethpb.Validator) *ethpb.Validator {
}
// CopySyncCommitteeMessage copies the provided sync committee message object.
func CopySyncCommitteeMessage(s *ethpb.SyncCommitteeMessage) *ethpb.SyncCommitteeMessage {
func CopySyncCommitteeMessage(s *prysmv2.SyncCommitteeMessage) *prysmv2.SyncCommitteeMessage {
if s == nil {
return nil
}
return &ethpb.SyncCommitteeMessage{
return &prysmv2.SyncCommitteeMessage{
Slot: s.Slot,
BlockRoot: bytesutil.SafeCopyBytes(s.BlockRoot),
ValidatorIndex: s.ValidatorIndex,
@@ -342,11 +343,11 @@ func CopySyncCommitteeMessage(s *ethpb.SyncCommitteeMessage) *ethpb.SyncCommitte
}
// CopySyncCommitteeContribution copies the provided sync committee contribution object.
func CopySyncCommitteeContribution(c *ethpb.SyncCommitteeContribution) *ethpb.SyncCommitteeContribution {
func CopySyncCommitteeContribution(c *prysmv2.SyncCommitteeContribution) *prysmv2.SyncCommitteeContribution {
if c == nil {
return nil
}
return &ethpb.SyncCommitteeContribution{
return &prysmv2.SyncCommitteeContribution{
Slot: c.Slot,
BlockRoot: bytesutil.SafeCopyBytes(c.BlockRoot),
SubcommitteeIndex: c.SubcommitteeIndex,
@@ -356,11 +357,11 @@ func CopySyncCommitteeContribution(c *ethpb.SyncCommitteeContribution) *ethpb.Sy
}
// CopySyncAggregate copies the provided sync aggregate object.
func CopySyncAggregate(a *ethpb.SyncAggregate) *ethpb.SyncAggregate {
func CopySyncAggregate(a *prysmv2.SyncAggregate) *prysmv2.SyncAggregate {
if a == nil {
return nil
}
return &ethpb.SyncAggregate{
return &prysmv2.SyncAggregate{
SyncCommitteeBits: bytesutil.SafeCopyBytes(a.SyncCommitteeBits),
SyncCommitteeSignature: bytesutil.SafeCopyBytes(a.SyncCommitteeSignature),
}

View File

@@ -14,6 +14,7 @@ go_library(
deps = [
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/copyutil:go_default_library",
"//shared/interfaces/version:go_default_library",
"@com_github_ferranbt_fastssz//:go_default_library",

View File

@@ -4,6 +4,7 @@ import (
"github.com/pkg/errors"
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/copyutil"
"github.com/prysmaticlabs/prysm/shared/interfaces/version"
"google.golang.org/protobuf/proto"
@@ -13,12 +14,12 @@ import (
// object. This wrapper allows us to conform to a common interface so that beacon
// blocks for future forks can also be applied across prysm without issues.
type AltairSignedBeaconBlock struct {
b *ethpb.SignedBeaconBlockAltair
b *prysmv2.SignedBeaconBlock
}
// WrappedAltairSignedBeaconBlock is constructor which wraps a protobuf altair block
// with the block wrapper.
func WrappedAltairSignedBeaconBlock(b *ethpb.SignedBeaconBlockAltair) AltairSignedBeaconBlock {
func WrappedAltairSignedBeaconBlock(b *prysmv2.SignedBeaconBlock) AltairSignedBeaconBlock {
return AltairSignedBeaconBlock{b: b}
}
@@ -74,7 +75,7 @@ func (w AltairSignedBeaconBlock) Proto() proto.Message {
}
// PbAltairBlock returns the underlying protobuf object.
func (w AltairSignedBeaconBlock) PbAltairBlock() (*ethpb.SignedBeaconBlockAltair, error) {
func (w AltairSignedBeaconBlock) PbAltairBlock() (*prysmv2.SignedBeaconBlock, error) {
return w.b, nil
}
@@ -90,12 +91,12 @@ func (w AltairSignedBeaconBlock) Version() int {
// AltairBeaconBlock is the wrapper for the actual block.
type AltairBeaconBlock struct {
b *ethpb.BeaconBlockAltair
b *prysmv2.BeaconBlock
}
// WrappedAltairBeaconBlock is constructor which wraps a protobuf altair object
// with the block wrapper.
func WrappedAltairBeaconBlock(b *ethpb.BeaconBlockAltair) AltairBeaconBlock {
func WrappedAltairBeaconBlock(b *prysmv2.BeaconBlock) AltairBeaconBlock {
return AltairBeaconBlock{b: b}
}
@@ -170,12 +171,12 @@ func (w AltairBeaconBlock) Version() int {
// AltairBeaconBlockBody is a wrapper of a beacon block body.
type AltairBeaconBlockBody struct {
b *ethpb.BeaconBlockBodyAltair
b *prysmv2.BeaconBlockBody
}
// WrappedAltairBeaconBlockBody is constructor which wraps a protobuf altair object
// with the block wrapper.
func WrappedAltairBeaconBlockBody(b *ethpb.BeaconBlockBodyAltair) AltairBeaconBlockBody {
func WrappedAltairBeaconBlockBody(b *prysmv2.BeaconBlockBody) AltairBeaconBlockBody {
return AltairBeaconBlockBody{b: b}
}
@@ -220,7 +221,7 @@ func (w AltairBeaconBlockBody) VoluntaryExits() []*ethpb.SignedVoluntaryExit {
}
// SyncAggregate returns the sync aggregate in the block.
func (w AltairBeaconBlockBody) SyncAggregate() (*ethpb.SyncAggregate, error) {
func (w AltairBeaconBlockBody) SyncAggregate() (*prysmv2.SyncAggregate, error) {
return w.b.SyncAggregate, nil
}

View File

@@ -4,6 +4,7 @@ import (
ssz "github.com/ferranbt/fastssz"
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"google.golang.org/protobuf/proto"
)
@@ -48,7 +49,7 @@ type BeaconBlockBody interface {
Attestations() []*ethpb.Attestation
Deposits() []*ethpb.Deposit
VoluntaryExits() []*ethpb.SignedVoluntaryExit
SyncAggregate() (*ethpb.SyncAggregate, error)
SyncAggregate() (*prysmv2.SyncAggregate, error)
IsNil() bool
HashTreeRoot() ([32]byte, error)
Proto() proto.Message

View File

@@ -4,6 +4,7 @@ import (
"github.com/pkg/errors"
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/copyutil"
"github.com/prysmaticlabs/prysm/shared/interfaces/version"
"google.golang.org/protobuf/proto"
@@ -215,7 +216,7 @@ func (w Phase0BeaconBlockBody) VoluntaryExits() []*ethpb.SignedVoluntaryExit {
}
// SyncAggregate returns the sync aggregate in the block.
func (w Phase0BeaconBlockBody) SyncAggregate() (*ethpb.SyncAggregate, error) {
func (w Phase0BeaconBlockBody) SyncAggregate() (*prysmv2.SyncAggregate, error) {
return nil, errors.New("Sync aggregate is not supported in phase 0 block")
}

View File

@@ -8,6 +8,7 @@ go_library(
"beacon_chain_service_mock.go",
"beacon_service_mock.go",
"beacon_validator_client_mock.go",
"beacon_validator_client_v2_mock.go",
"beacon_validator_server_mock.go",
"event_service_mock.go",
"keymanager_mock.go",
@@ -18,6 +19,7 @@ go_library(
deps = [
"//proto/eth/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//proto/validator/accounts/v2:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//proto/gateway:go_default_library",

View File

@@ -98,26 +98,6 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) GetBlock(arg0, arg1 interfa
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetBlock), varargs...)
}
// GetBlockV2 mocks base method.
func (m *MockBeaconNodeValidatorClient) GetBlockV2(arg0 context.Context, arg1 *eth.BlockRequest, arg2 ...grpc.CallOption) (*eth.BeaconBlockAltair, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetBlockV2", varargs...)
ret0, _ := ret[0].(*eth.BeaconBlockAltair)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBlockV2 indicates an expected call of GetBlockV2.
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetBlockV2(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockV2", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetBlockV2), varargs...)
}
// GetDuties mocks base method.
func (m *MockBeaconNodeValidatorClient) GetDuties(arg0 context.Context, arg1 *eth.DutiesRequest, arg2 ...grpc.CallOption) (*eth.DutiesResponse, error) {
m.ctrl.T.Helper()
@@ -138,66 +118,6 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) GetDuties(arg0, arg1 interf
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetDuties), varargs...)
}
// GetSyncCommitteeContribution mocks base method.
func (m *MockBeaconNodeValidatorClient) GetSyncCommitteeContribution(arg0 context.Context, arg1 *eth.SyncCommitteeContributionRequest, arg2 ...grpc.CallOption) (*eth.SyncCommitteeContribution, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSyncCommitteeContribution", varargs...)
ret0, _ := ret[0].(*eth.SyncCommitteeContribution)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSyncCommitteeContribution indicates an expected call of GetSyncCommitteeContribution.
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncCommitteeContribution(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeContribution", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncCommitteeContribution), varargs...)
}
// GetSyncMessageBlockRoot mocks base method.
func (m *MockBeaconNodeValidatorClient) GetSyncMessageBlockRoot(arg0 context.Context, arg1 *emptypb.Empty, arg2 ...grpc.CallOption) (*eth.SyncMessageBlockRootResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSyncMessageBlockRoot", varargs...)
ret0, _ := ret[0].(*eth.SyncMessageBlockRootResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSyncMessageBlockRoot indicates an expected call of GetSyncMessageBlockRoot.
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncMessageBlockRoot(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncMessageBlockRoot", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncMessageBlockRoot), varargs...)
}
// GetSyncSubcommitteeIndex mocks base method.
func (m *MockBeaconNodeValidatorClient) GetSyncSubcommitteeIndex(arg0 context.Context, arg1 *eth.SyncSubcommitteeIndexRequest, arg2 ...grpc.CallOption) (*eth.SyncSubcommitteeIndexRespond, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSyncSubcommitteeIndex", varargs...)
ret0, _ := ret[0].(*eth.SyncSubcommitteeIndexRespond)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSyncSubcommitteeIndex indicates an expected call of GetSyncSubcommitteeIndex.
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncSubcommitteeIndex(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncSubcommitteeIndex", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncSubcommitteeIndex), varargs...)
}
// MultipleValidatorStatus mocks base method.
func (m *MockBeaconNodeValidatorClient) MultipleValidatorStatus(arg0 context.Context, arg1 *eth.MultipleValidatorStatusRequest, arg2 ...grpc.CallOption) (*eth.MultipleValidatorStatusResponse, error) {
m.ctrl.T.Helper()
@@ -258,26 +178,6 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeBlock(arg0, arg1 int
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBlock", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ProposeBlock), varargs...)
}
// ProposeBlockV2 mocks base method.
func (m *MockBeaconNodeValidatorClient) ProposeBlockV2(arg0 context.Context, arg1 *eth.SignedBeaconBlockAltair, arg2 ...grpc.CallOption) (*eth.ProposeResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ProposeBlockV2", varargs...)
ret0, _ := ret[0].(*eth.ProposeResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ProposeBlockV2 indicates an expected call of ProposeBlockV2.
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeBlockV2(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBlockV2", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ProposeBlockV2), varargs...)
}
// ProposeExit mocks base method.
func (m *MockBeaconNodeValidatorClient) ProposeExit(arg0 context.Context, arg1 *eth.SignedVoluntaryExit, arg2 ...grpc.CallOption) (*eth.ProposeExitResponse, error) {
m.ctrl.T.Helper()
@@ -358,46 +258,6 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedAggregateSelect
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedAggregateSelectionProof), varargs...)
}
// SubmitSignedContributionAndProof mocks base method.
func (m *MockBeaconNodeValidatorClient) SubmitSignedContributionAndProof(arg0 context.Context, arg1 *eth.SignedContributionAndProof, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubmitSignedContributionAndProof", varargs...)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitSignedContributionAndProof indicates an expected call of SubmitSignedContributionAndProof.
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedContributionAndProof(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedContributionAndProof), varargs...)
}
// SubmitSyncMessage mocks base method.
func (m *MockBeaconNodeValidatorClient) SubmitSyncMessage(arg0 context.Context, arg1 *eth.SyncCommitteeMessage, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubmitSyncMessage", varargs...)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitSyncMessage indicates an expected call of SubmitSyncMessage.
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSyncMessage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSyncMessage", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSyncMessage), varargs...)
}
// SubscribeCommitteeSubnets mocks base method.
func (m *MockBeaconNodeValidatorClient) SubscribeCommitteeSubnets(arg0 context.Context, arg1 *eth.CommitteeSubnetsSubscribeRequest, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()

View File

@@ -0,0 +1,179 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/prysmaticlabs/prysm/proto/prysm/v2 (interfaces: BeaconNodeValidatorAltairClient)
// Package mock is a generated GoMock package.
package mock
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
v2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
grpc "google.golang.org/grpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// MockBeaconNodeValidatorAltairClient is a mock of BeaconNodeValidatorAltairClient interface.
type MockBeaconNodeValidatorAltairClient struct {
ctrl *gomock.Controller
recorder *MockBeaconNodeValidatorAltairClientMockRecorder
}
// MockBeaconNodeValidatorAltairClientMockRecorder is the mock recorder for MockBeaconNodeValidatorAltairClient.
type MockBeaconNodeValidatorAltairClientMockRecorder struct {
mock *MockBeaconNodeValidatorAltairClient
}
// NewMockBeaconNodeValidatorAltairClient creates a new mock instance.
func NewMockBeaconNodeValidatorAltairClient(ctrl *gomock.Controller) *MockBeaconNodeValidatorAltairClient {
mock := &MockBeaconNodeValidatorAltairClient{ctrl: ctrl}
mock.recorder = &MockBeaconNodeValidatorAltairClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBeaconNodeValidatorAltairClient) EXPECT() *MockBeaconNodeValidatorAltairClientMockRecorder {
return m.recorder
}
// GetBlock mocks base method.
func (m *MockBeaconNodeValidatorAltairClient) GetBlock(arg0 context.Context, arg1 *eth.BlockRequest, arg2 ...grpc.CallOption) (*v2.BeaconBlockAltair, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetBlock", varargs...)
ret0, _ := ret[0].(*v2.BeaconBlockAltair)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBlock indicates an expected call of GetBlock.
func (mr *MockBeaconNodeValidatorAltairClientMockRecorder) GetBlock(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockBeaconNodeValidatorAltairClient)(nil).GetBlock), varargs...)
}
// GetSyncCommitteeContribution mocks base method.
func (m *MockBeaconNodeValidatorAltairClient) GetSyncCommitteeContribution(arg0 context.Context, arg1 *v2.SyncCommitteeContributionRequest, arg2 ...grpc.CallOption) (*v2.SyncCommitteeContribution, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSyncCommitteeContribution", varargs...)
ret0, _ := ret[0].(*v2.SyncCommitteeContribution)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSyncCommitteeContribution indicates an expected call of GetSyncCommitteeContribution.
func (mr *MockBeaconNodeValidatorAltairClientMockRecorder) GetSyncCommitteeContribution(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeContribution", reflect.TypeOf((*MockBeaconNodeValidatorAltairClient)(nil).GetSyncCommitteeContribution), varargs...)
}
// GetSyncMessageBlockRoot mocks base method.
func (m *MockBeaconNodeValidatorAltairClient) GetSyncMessageBlockRoot(arg0 context.Context, arg1 *emptypb.Empty, arg2 ...grpc.CallOption) (*v2.SyncMessageBlockRootResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSyncMessageBlockRoot", varargs...)
ret0, _ := ret[0].(*v2.SyncMessageBlockRootResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSyncMessageBlockRoot indicates an expected call of GetSyncMessageBlockRoot.
func (mr *MockBeaconNodeValidatorAltairClientMockRecorder) GetSyncMessageBlockRoot(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncMessageBlockRoot", reflect.TypeOf((*MockBeaconNodeValidatorAltairClient)(nil).GetSyncMessageBlockRoot), varargs...)
}
// GetSyncSubcommitteeIndex mocks base method.
func (m *MockBeaconNodeValidatorAltairClient) GetSyncSubcommitteeIndex(arg0 context.Context, arg1 *v2.SyncSubcommitteeIndexRequest, arg2 ...grpc.CallOption) (*v2.SyncSubcommitteeIndexResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSyncSubcommitteeIndex", varargs...)
ret0, _ := ret[0].(*v2.SyncSubcommitteeIndexResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSyncSubcommitteeIndex indicates an expected call of GetSyncSubcommitteeIndex.
func (mr *MockBeaconNodeValidatorAltairClientMockRecorder) GetSyncSubcommitteeIndex(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncSubcommitteeIndex", reflect.TypeOf((*MockBeaconNodeValidatorAltairClient)(nil).GetSyncSubcommitteeIndex), varargs...)
}
// ProposeBlock mocks base method.
func (m *MockBeaconNodeValidatorAltairClient) ProposeBlock(arg0 context.Context, arg1 *v2.SignedBeaconBlockAltair, arg2 ...grpc.CallOption) (*eth.ProposeResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ProposeBlock", varargs...)
ret0, _ := ret[0].(*eth.ProposeResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ProposeBlock indicates an expected call of ProposeBlock.
func (mr *MockBeaconNodeValidatorAltairClientMockRecorder) ProposeBlock(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBlock", reflect.TypeOf((*MockBeaconNodeValidatorAltairClient)(nil).ProposeBlock), varargs...)
}
// SubmitSignedContributionAndProof mocks base method.
func (m *MockBeaconNodeValidatorAltairClient) SubmitSignedContributionAndProof(arg0 context.Context, arg1 *v2.SignedContributionAndProof, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubmitSignedContributionAndProof", varargs...)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitSignedContributionAndProof indicates an expected call of SubmitSignedContributionAndProof.
func (mr *MockBeaconNodeValidatorAltairClientMockRecorder) SubmitSignedContributionAndProof(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorAltairClient)(nil).SubmitSignedContributionAndProof), varargs...)
}
// SubmitSyncMessage mocks base method.
func (m *MockBeaconNodeValidatorAltairClient) SubmitSyncMessage(arg0 context.Context, arg1 *v2.SyncCommitteeMessage, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubmitSyncMessage", varargs...)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitSyncMessage indicates an expected call of SubmitSyncMessage.
func (mr *MockBeaconNodeValidatorAltairClientMockRecorder) SubmitSyncMessage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSyncMessage", reflect.TypeOf((*MockBeaconNodeValidatorAltairClient)(nil).SubmitSyncMessage), varargs...)
}

View File

@@ -82,21 +82,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetBlock(arg0, arg1 interfa
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetBlock), arg0, arg1)
}
// GetBlockV2 mocks base method
func (m *MockBeaconNodeValidatorServer) GetBlockV2(arg0 context.Context, arg1 *v1alpha1.BlockRequest) (*v1alpha1.BeaconBlockAltair, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlockV2", arg0, arg1)
ret0, _ := ret[0].(*v1alpha1.BeaconBlockAltair)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBlockV2 indicates an expected call of GetBlockV2
func (mr *MockBeaconNodeValidatorServerMockRecorder) GetBlockV2(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockV2", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetBlockV2), arg0, arg1)
}
// GetDuties mocks base method
func (m *MockBeaconNodeValidatorServer) GetDuties(arg0 context.Context, arg1 *v1alpha1.DutiesRequest) (*v1alpha1.DutiesResponse, error) {
m.ctrl.T.Helper()
@@ -112,21 +97,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetDuties(arg0, arg1 interf
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDuties", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetDuties), arg0, arg1)
}
// GetSyncMessageBlockRoot mocks base method
func (m *MockBeaconNodeValidatorServer) GetSyncMessageBlockRoot(arg0 context.Context, arg1 *emptypb.Empty) (*v1alpha1.SyncMessageBlockRootResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetSyncMessageBlockRoot", arg0, arg1)
ret0, _ := ret[0].(*v1alpha1.SyncMessageBlockRootResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSyncMessageBlockRoot indicates an expected call of GetSyncMessageBlockRoot
func (mr *MockBeaconNodeValidatorServerMockRecorder) GetSyncMessageBlockRoot(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncMessageBlockRoot", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetSyncMessageBlockRoot), arg0, arg1)
}
// MultipleValidatorStatus mocks base method
func (m *MockBeaconNodeValidatorServer) MultipleValidatorStatus(arg0 context.Context, arg1 *v1alpha1.MultipleValidatorStatusRequest) (*v1alpha1.MultipleValidatorStatusResponse, error) {
m.ctrl.T.Helper()
@@ -172,21 +142,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) ProposeBlock(arg0, arg1 int
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBlock", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).ProposeBlock), arg0, arg1)
}
// ProposeBlockV2 mocks base method
func (m *MockBeaconNodeValidatorServer) ProposeBlockV2(arg0 context.Context, arg1 *v1alpha1.SignedBeaconBlockAltair) (*v1alpha1.ProposeResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ProposeBlockV2", arg0, arg1)
ret0, _ := ret[0].(*v1alpha1.ProposeResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ProposeBlockV2 indicates an expected call of ProposeBlockV2
func (mr *MockBeaconNodeValidatorServerMockRecorder) ProposeBlockV2(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBlockV2", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).ProposeBlockV2), arg0, arg1)
}
// ProposeExit mocks base method
func (m *MockBeaconNodeValidatorServer) ProposeExit(arg0 context.Context, arg1 *v1alpha1.SignedVoluntaryExit) (*v1alpha1.ProposeExitResponse, error) {
m.ctrl.T.Helper()
@@ -246,21 +201,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedAggregateSelect
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProof", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedAggregateSelectionProof), arg0, arg1)
}
// SubmitSyncMessage mocks base method
func (m *MockBeaconNodeValidatorServer) SubmitSyncMessage(arg0 context.Context, arg1 *v1alpha1.SyncCommitteeMessage) (*emptypb.Empty, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SubmitSyncMessage", arg0, arg1)
ret0, _ := ret[0].(*emptypb.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitSyncMessage indicates an expected call of SubmitSyncMessage
func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSyncMessage(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSyncMessage", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSyncMessage), arg0, arg1)
}
// SubscribeCommitteeSubnets mocks base method
func (m *MockBeaconNodeValidatorServer) SubscribeCommitteeSubnets(arg0 context.Context, arg1 *v1alpha1.CommitteeSubnetsSubscribeRequest) (*emptypb.Empty, error) {
m.ctrl.T.Helper()

View File

@@ -28,6 +28,7 @@ go_library(
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/bls:go_default_library",
"//shared/bytesutil:go_default_library",
"//shared/hashutil:go_default_library",
@@ -63,6 +64,7 @@ go_test(
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/bytesutil:go_default_library",
"//shared/interfaces:go_default_library",
"//shared/params:go_default_library",

View File

@@ -13,6 +13,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/state"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/params"
@@ -37,12 +38,12 @@ func DeterministicGenesisStateAltair(t testing.TB, numValidators uint64) (iface.
}
// NewBeaconBlockAltair creates a beacon block with minimum marshalable fields.
func NewBeaconBlockAltair() *ethpb.SignedBeaconBlockAltair {
return &ethpb.SignedBeaconBlockAltair{
Block: &ethpb.BeaconBlockAltair{
func NewBeaconBlockAltair() *prysmv2.SignedBeaconBlock {
return &prysmv2.SignedBeaconBlock{
Block: &prysmv2.BeaconBlock{
ParentRoot: make([]byte, 32),
StateRoot: make([]byte, 32),
Body: &ethpb.BeaconBlockBodyAltair{
Body: &prysmv2.BeaconBlockBody{
RandaoReveal: make([]byte, 96),
Eth1Data: &ethpb.Eth1Data{
DepositRoot: make([]byte, 32),
@@ -54,7 +55,7 @@ func NewBeaconBlockAltair() *ethpb.SignedBeaconBlockAltair {
Deposits: []*ethpb.Deposit{},
ProposerSlashings: []*ethpb.ProposerSlashing{},
VoluntaryExits: []*ethpb.SignedVoluntaryExit{},
SyncAggregate: &ethpb.SyncAggregate{
SyncAggregate: &prysmv2.SyncAggregate{
SyncCommitteeBits: make([]byte, len(bitfield.NewBitvector512())),
SyncCommitteeSignature: make([]byte, 96),
},
@@ -67,12 +68,12 @@ func NewBeaconBlockAltair() *ethpb.SignedBeaconBlockAltair {
// BlockSignatureAltair calculates the post-state root of the block and returns the signature.
func BlockSignatureAltair(
bState iface.BeaconStateAltair,
block *ethpb.BeaconBlockAltair,
block *prysmv2.BeaconBlock,
privKeys []bls.SecretKey,
) (bls.Signature, error) {
var err error
s, err := state.CalculateStateRoot(context.Background(), bState, interfaces.WrappedAltairSignedBeaconBlock(&ethpb.SignedBeaconBlockAltair{Block: block}))
s, err := state.CalculateStateRoot(context.Background(), bState, interfaces.WrappedAltairSignedBeaconBlock(&prysmv2.SignedBeaconBlock{Block: block}))
if err != nil {
return nil, err
}
@@ -108,7 +109,7 @@ func GenerateFullBlockAltair(
privs []bls.SecretKey,
conf *BlockGenConfig,
slot types.Slot,
) (*ethpb.SignedBeaconBlockAltair, error) {
) (*prysmv2.SignedBeaconBlock, error) {
ctx := context.Background()
currentSlot := bState.Slot()
if currentSlot > slot {
@@ -202,11 +203,11 @@ func GenerateFullBlockAltair(
return nil, err
}
block := &ethpb.BeaconBlockAltair{
block := &prysmv2.BeaconBlock{
Slot: slot,
ParentRoot: parentRoot[:],
ProposerIndex: idx,
Body: &ethpb.BeaconBlockBodyAltair{
Body: &prysmv2.BeaconBlockBody{
Eth1Data: eth1Data,
RandaoReveal: reveal,
ProposerSlashings: pSlashings,
@@ -227,5 +228,5 @@ func GenerateFullBlockAltair(
return nil, err
}
return &ethpb.SignedBeaconBlockAltair{Block: block, Signature: signature.Marshal()}, nil
return &prysmv2.SignedBeaconBlock{Block: block, Signature: signature.Marshal()}, nil
}

View File

@@ -10,6 +10,7 @@ import (
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
v1 "github.com/prysmaticlabs/prysm/proto/eth/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/params"
@@ -506,7 +507,7 @@ func HydrateV1BeaconBlockBody(b *v1.BeaconBlockBody) *v1.BeaconBlockBody {
// HydrateSignedBeaconBlockAltair hydrates a signed beacon block with correct field length sizes
// to comply with fssz marshalling and unmarshalling rules.
func HydrateSignedBeaconBlockAltair(b *ethpb.SignedBeaconBlockAltair) *ethpb.SignedBeaconBlockAltair {
func HydrateSignedBeaconBlockAltair(b *prysmv2.SignedBeaconBlock) *prysmv2.SignedBeaconBlock {
if b.Signature == nil {
b.Signature = make([]byte, params.BeaconConfig().BLSSignatureLength)
}
@@ -516,9 +517,9 @@ func HydrateSignedBeaconBlockAltair(b *ethpb.SignedBeaconBlockAltair) *ethpb.Sig
// HydrateBeaconBlockAltair hydrates a beacon block with correct field length sizes
// to comply with fssz marshalling and unmarshalling rules.
func HydrateBeaconBlockAltair(b *ethpb.BeaconBlockAltair) *ethpb.BeaconBlockAltair {
func HydrateBeaconBlockAltair(b *prysmv2.BeaconBlock) *prysmv2.BeaconBlock {
if b == nil {
b = &ethpb.BeaconBlockAltair{}
b = &prysmv2.BeaconBlock{}
}
if b.ParentRoot == nil {
b.ParentRoot = make([]byte, 32)
@@ -532,9 +533,9 @@ func HydrateBeaconBlockAltair(b *ethpb.BeaconBlockAltair) *ethpb.BeaconBlockAlta
// HydrateBeaconBlockBodyAltair hydrates a beacon block body with correct field length sizes
// to comply with fssz marshalling and unmarshalling rules.
func HydrateBeaconBlockBodyAltair(b *ethpb.BeaconBlockBodyAltair) *ethpb.BeaconBlockBodyAltair {
func HydrateBeaconBlockBodyAltair(b *prysmv2.BeaconBlockBody) *prysmv2.BeaconBlockBody {
if b == nil {
b = &ethpb.BeaconBlockBodyAltair{}
b = &prysmv2.BeaconBlockBody{}
}
if b.RandaoReveal == nil {
b.RandaoReveal = make([]byte, params.BeaconConfig().BLSSignatureLength)
@@ -549,7 +550,7 @@ func HydrateBeaconBlockBodyAltair(b *ethpb.BeaconBlockBodyAltair) *ethpb.BeaconB
}
}
if b.SyncAggregate == nil {
b.SyncAggregate = &ethpb.SyncAggregate{
b.SyncAggregate = &prysmv2.SyncAggregate{
SyncCommitteeBits: make([]byte, 64),
SyncCommitteeSignature: make([]byte, 96),
}

View File

@@ -10,6 +10,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/state/stateutils"
v1 "github.com/prysmaticlabs/prysm/proto/eth/v1"
eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/params"
@@ -200,7 +201,7 @@ func TestHydrateV1SignedBeaconBlock_NoError(t *testing.T) {
}
func TestHydrateSignedBeaconBlockAltair_NoError(t *testing.T) {
b := &eth.SignedBeaconBlockAltair{}
b := &prysmv2.SignedBeaconBlock{}
b = HydrateSignedBeaconBlockAltair(b)
_, err := b.HashTreeRoot()
require.NoError(t, err)

View File

@@ -8,14 +8,14 @@ import (
p2pType "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/interfaces/version"
"github.com/prysmaticlabs/prysm/shared/params"
)
func generateSyncCommittees(bState iface.BeaconState, privs []bls.SecretKey, parentRoot [32]byte) (*ethpb.SyncAggregate, error) {
func generateSyncCommittees(bState iface.BeaconState, privs []bls.SecretKey, parentRoot [32]byte) (*prysmv2.SyncAggregate, error) {
st, ok := bState.(iface.BeaconStateAltair)
if !ok || bState.Version() == version.Phase0 {
return nil, errors.Errorf("state cannot be asserted to altair state")
@@ -38,7 +38,7 @@ func generateSyncCommittees(bState iface.BeaconState, privs []bls.SecretKey, par
}
sigs := make([]bls.Signature, 0, len(syncCommittee.Pubkeys))
var bVector []byte
currSize := new(ethpb.SyncAggregate).SyncCommitteeBits.Len()
currSize := new(prysmv2.SyncAggregate).SyncCommitteeBits.Len()
switch currSize {
case 512:
bVector = bitfield.NewBitvector512()
@@ -72,8 +72,8 @@ func generateSyncCommittees(bState iface.BeaconState, privs []bls.SecretKey, par
}
if len(sigs) == 0 {
fakeSig := [96]byte{0xC0}
return &ethpb.SyncAggregate{SyncCommitteeSignature: fakeSig[:], SyncCommitteeBits: bVector}, nil
return &prysmv2.SyncAggregate{SyncCommitteeSignature: fakeSig[:], SyncCommitteeBits: bVector}, nil
}
aggSig := bls.AggregateSignatures(sigs)
return &ethpb.SyncAggregate{SyncCommitteeSignature: aggSig.Marshal(), SyncCommitteeBits: bVector}, nil
return &prysmv2.SyncAggregate{SyncCommitteeSignature: aggSig.Marshal(), SyncCommitteeBits: bVector}, nil
}

View File

@@ -12,7 +12,7 @@ go_library(
"//beacon-chain/state/interface:go_default_library",
"//beacon-chain/state/state-altair:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/interfaces:go_default_library",
"//shared/testutil:go_default_library",
"//shared/testutil/require:go_default_library",

View File

@@ -11,7 +11,7 @@ import (
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -58,7 +58,7 @@ func RunFinalityTest(t *testing.T, config string) {
require.NoError(t, err)
blockSSZ, err := snappy.Decode(nil /* dst */, blockFile)
require.NoError(t, err, "Failed to decompress")
block := &ethpb.SignedBeaconBlockAltair{}
block := &prysmv2.SignedBeaconBlock{}
require.NoError(t, block.UnmarshalSSZ(blockSSZ), "Failed to unmarshal")
processedState, err = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.WrappedAltairSignedBeaconBlock(block))
require.NoError(t, err)

View File

@@ -18,6 +18,7 @@ go_library(
"//beacon-chain/state/stateV0:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/interfaces:go_default_library",
"//shared/params:go_default_library",
"//shared/testutil:go_default_library",

View File

@@ -14,6 +14,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateV0"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil"
@@ -42,7 +43,7 @@ func RunForkTransitionTest(t *testing.T, config string) {
require.NoError(t, utils.UnmarshalYaml(file, config), "Failed to Unmarshal")
preforkBlocks := make([]*ethpb.SignedBeaconBlock, 0)
postforkBlocks := make([]*ethpb.SignedBeaconBlockAltair, 0)
postforkBlocks := make([]*prysmv2.SignedBeaconBlock, 0)
// Fork happens without any pre-fork blocks.
if config.ForkBlock == 0 {
for i := 0; i < config.BlocksCount; i++ {
@@ -51,7 +52,7 @@ func RunForkTransitionTest(t *testing.T, config string) {
require.NoError(t, err)
blockSSZ, err := snappy.Decode(nil /* dst */, blockFile)
require.NoError(t, err, "Failed to decompress")
block := &ethpb.SignedBeaconBlockAltair{}
block := &prysmv2.SignedBeaconBlock{}
require.NoError(t, block.UnmarshalSSZ(blockSSZ), "Failed to unmarshal")
postforkBlocks = append(postforkBlocks, block)
}
@@ -73,7 +74,7 @@ func RunForkTransitionTest(t *testing.T, config string) {
require.NoError(t, err)
blockSSZ, err := snappy.Decode(nil /* dst */, blockFile)
require.NoError(t, err, "Failed to decompress")
block := &ethpb.SignedBeaconBlockAltair{}
block := &prysmv2.SignedBeaconBlock{}
require.NoError(t, block.UnmarshalSSZ(blockSSZ), "Failed to unmarshal")
postforkBlocks = append(postforkBlocks, block)
}

View File

@@ -23,6 +23,7 @@ go_library(
"//beacon-chain/state/state-altair:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/interfaces:go_default_library",
"//shared/testutil:go_default_library",
"//shared/testutil/require:go_default_library",

View File

@@ -7,6 +7,7 @@ import (
"github.com/golang/snappy"
"github.com/prysmaticlabs/prysm/beacon-chain/core/altair"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
"github.com/prysmaticlabs/prysm/spectest/utils"
@@ -25,7 +26,7 @@ func RunAttestationTest(t *testing.T, config string) {
att := &ethpb.Attestation{}
require.NoError(t, att.UnmarshalSSZ(attestationSSZ), "Failed to unmarshal")
body := &ethpb.BeaconBlockBodyAltair{Attestations: []*ethpb.Attestation{att}}
body := &prysmv2.BeaconBlockBody{Attestations: []*ethpb.Attestation{att}}
RunBlockOperationTest(t, folderPath, body, altair.ProcessAttestations)
})
}

View File

@@ -10,6 +10,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -29,7 +30,7 @@ func RunAttesterSlashingTest(t *testing.T, config string) {
attSlashing := &ethpb.AttesterSlashing{}
require.NoError(t, attSlashing.UnmarshalSSZ(attSlashingSSZ), "Failed to unmarshal")
body := &ethpb.BeaconBlockBodyAltair{AttesterSlashings: []*ethpb.AttesterSlashing{attSlashing}}
body := &prysmv2.BeaconBlockBody{AttesterSlashings: []*ethpb.AttesterSlashing{attSlashing}}
RunBlockOperationTest(t, folderPath, body, func(ctx context.Context, s iface.BeaconState, b interfaces.SignedBeaconBlock) (iface.BeaconState, error) {
return blocks.ProcessAttesterSlashings(ctx, s, b.Block().Body().AttesterSlashings(), altair.SlashValidator)
})

View File

@@ -11,7 +11,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
"github.com/prysmaticlabs/prysm/spectest/utils"
@@ -28,7 +28,7 @@ func RunBlockHeaderTest(t *testing.T, config string) {
require.NoError(t, err)
blockSSZ, err := snappy.Decode(nil /* dst */, blockFile)
require.NoError(t, err, "Failed to decompress")
block := &ethpb.BeaconBlockAltair{}
block := &prysmv2.BeaconBlock{}
require.NoError(t, block.UnmarshalSSZ(blockSSZ), "Failed to unmarshal")
preBeaconStateFile, err := testutil.BazelFileBytes(testsFolderPath, folder.Name(), "pre.ssz_snappy")

View File

@@ -9,6 +9,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/altair"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -28,7 +29,7 @@ func RunDepositTest(t *testing.T, config string) {
deposit := &ethpb.Deposit{}
require.NoError(t, deposit.UnmarshalSSZ(depositSSZ), "Failed to unmarshal")
body := &ethpb.BeaconBlockBodyAltair{Deposits: []*ethpb.Deposit{deposit}}
body := &prysmv2.BeaconBlockBody{Deposits: []*ethpb.Deposit{deposit}}
processDepositsFunc := func(ctx context.Context, s iface.BeaconState, b interfaces.SignedBeaconBlock) (iface.BeaconState, error) {
return altair.ProcessDeposits(ctx, s, b.Block().Body().Deposits())
}

View File

@@ -13,7 +13,7 @@ import (
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -28,7 +28,7 @@ type blockOperation func(context.Context, iface.BeaconState, interfaces.SignedBe
func RunBlockOperationTest(
t *testing.T,
folderPath string,
body *ethpb.BeaconBlockBodyAltair,
body *prysmv2.BeaconBlockBody,
operationFn blockOperation,
) {
preBeaconStateFile, err := testutil.BazelFileBytes(path.Join(folderPath, "pre.ssz_snappy"))

View File

@@ -10,6 +10,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -29,7 +30,7 @@ func RunProposerSlashingTest(t *testing.T, config string) {
proposerSlashing := &ethpb.ProposerSlashing{}
require.NoError(t, proposerSlashing.UnmarshalSSZ(proposerSlashingSSZ), "Failed to unmarshal")
body := &ethpb.BeaconBlockBodyAltair{ProposerSlashings: []*ethpb.ProposerSlashing{proposerSlashing}}
body := &prysmv2.BeaconBlockBody{ProposerSlashings: []*ethpb.ProposerSlashing{proposerSlashing}}
RunBlockOperationTest(t, folderPath, body, func(ctx context.Context, s iface.BeaconState, b interfaces.SignedBeaconBlock) (iface.BeaconState, error) {
return blocks.ProcessProposerSlashings(ctx, s, b.Block().Body().ProposerSlashings(), altair.SlashValidator)
})

View File

@@ -8,7 +8,7 @@ import (
"github.com/golang/snappy"
"github.com/prysmaticlabs/prysm/beacon-chain/core/altair"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -25,10 +25,10 @@ func RunSyncCommitteeTest(t *testing.T, config string) {
require.NoError(t, err)
syncCommitteeSSZ, err := snappy.Decode(nil /* dst */, syncCommitteeFile)
require.NoError(t, err, "Failed to decompress")
sc := &ethpb.SyncAggregate{}
sc := &prysmv2.SyncAggregate{}
require.NoError(t, sc.UnmarshalSSZ(syncCommitteeSSZ), "Failed to unmarshal")
body := &ethpb.BeaconBlockBodyAltair{SyncAggregate: sc}
body := &prysmv2.BeaconBlockBody{SyncAggregate: sc}
RunBlockOperationTest(t, folderPath, body, func(ctx context.Context, s iface.BeaconState, b interfaces.SignedBeaconBlock) (iface.BeaconState, error) {
return altair.ProcessSyncAggregate(s, body.SyncAggregate)
})

View File

@@ -9,6 +9,7 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -28,7 +29,7 @@ func RunVoluntaryExitTest(t *testing.T, config string) {
voluntaryExit := &ethpb.SignedVoluntaryExit{}
require.NoError(t, voluntaryExit.UnmarshalSSZ(exitSSZ), "Failed to unmarshal")
body := &ethpb.BeaconBlockBodyAltair{VoluntaryExits: []*ethpb.SignedVoluntaryExit{voluntaryExit}}
body := &prysmv2.BeaconBlockBody{VoluntaryExits: []*ethpb.SignedVoluntaryExit{voluntaryExit}}
RunBlockOperationTest(t, folderPath, body, func(ctx context.Context, s iface.BeaconState, b interfaces.SignedBeaconBlock) (iface.BeaconState, error) {
return blocks.ProcessVoluntaryExits(ctx, s, b.Block().Body().VoluntaryExits())
})

View File

@@ -16,7 +16,7 @@ go_library(
"//beacon-chain/state/interface:go_default_library",
"//beacon-chain/state/state-altair:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/interfaces:go_default_library",
"//shared/testutil:go_default_library",
"//shared/testutil/require:go_default_library",

View File

@@ -15,7 +15,7 @@ import (
iface "github.com/prysmaticlabs/prysm/beacon-chain/state/interface"
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/interfaces"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
@@ -60,7 +60,7 @@ func RunBlockProcessingTest(t *testing.T, config string) {
require.NoError(t, err)
blockSSZ, err := snappy.Decode(nil /* dst */, blockFile)
require.NoError(t, err, "Failed to decompress")
block := &ethpb.SignedBeaconBlockAltair{}
block := &prysmv2.SignedBeaconBlock{}
require.NoError(t, block.UnmarshalSSZ(blockSSZ), "Failed to unmarshal")
processedState, transitionError = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.WrappedAltairSignedBeaconBlock(block))
if transitionError != nil {

View File

@@ -10,6 +10,7 @@ go_library(
"//beacon-chain/state/state-altair:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/testutil:go_default_library",
"//shared/testutil/require:go_default_library",
"//spectest/utils:go_default_library",

View File

@@ -12,6 +12,7 @@ import (
stateAltair "github.com/prysmaticlabs/prysm/beacon-chain/state/state-altair"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
"github.com/prysmaticlabs/prysm/spectest/utils"
@@ -103,9 +104,9 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "AggregateAndProof":
obj = &ethpb.AggregateAttestationAndProof{}
case "BeaconBlock":
obj = &ethpb.BeaconBlockAltair{}
obj = &prysmv2.BeaconBlock{}
case "BeaconBlockBody":
obj = &ethpb.BeaconBlockBodyAltair{}
obj = &prysmv2.BeaconBlockBody{}
case "BeaconBlockHeader":
obj = &ethpb.BeaconBlockHeader{}
case "BeaconState":
@@ -138,7 +139,7 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "SignedAggregateAndProof":
obj = &ethpb.SignedAggregateAttestationAndProof{}
case "SignedBeaconBlock":
obj = &ethpb.SignedBeaconBlockAltair{}
obj = &prysmv2.SignedBeaconBlock{}
case "SignedBeaconBlockHeader":
obj = &ethpb.SignedBeaconBlockHeader{}
case "SignedVoluntaryExit":
@@ -150,15 +151,15 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "VoluntaryExit":
obj = &ethpb.VoluntaryExit{}
case "SyncCommitteeMessage":
obj = &ethpb.SyncCommitteeMessage{}
obj = &prysmv2.SyncCommitteeMessage{}
case "SyncCommitteeContribution":
obj = &ethpb.SyncCommitteeContribution{}
obj = &prysmv2.SyncCommitteeContribution{}
case "ContributionAndProof":
obj = &ethpb.ContributionAndProof{}
obj = &prysmv2.ContributionAndProof{}
case "SignedContributionAndProof":
obj = &ethpb.SignedContributionAndProof{}
obj = &prysmv2.SignedContributionAndProof{}
case "SyncAggregate":
obj = &ethpb.SyncAggregate{}
obj = &prysmv2.SyncAggregate{}
case "SyncAggregatorSelectionData":
obj = &pb.SyncAggregatorSelectionData{}
case "SyncCommittee":

View File

@@ -25,6 +25,7 @@ go_library(
"//beacon-chain/core/helpers:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//proto/validator/accounts/v2:go_default_library",
"//shared/blockutil:go_default_library",
"//shared/bls:go_default_library",
@@ -105,6 +106,7 @@ go_test(
"//beacon-chain/core/helpers:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/eth/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//proto/validator/accounts/v2:go_default_library",
"//shared:go_default_library",
"//shared/bls:go_default_library",

View File

@@ -10,6 +10,7 @@ import (
types "github.com/prysmaticlabs/eth2-types"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
validatorpb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
@@ -197,7 +198,7 @@ func (v *validator) proposeBlockV2(ctx context.Context, slot types.Slot, pubKey
}
// Request block from beacon node
b, err := v.validatorClient.GetBlockV2(ctx, &ethpb.BlockRequest{
b, err := v.validatorClientV2.GetBlock(ctx, &ethpb.BlockRequest{
Slot: slot,
RandaoReveal: randaoReveal,
Graffiti: g,
@@ -219,7 +220,7 @@ func (v *validator) proposeBlockV2(ctx context.Context, slot types.Slot, pubKey
}
return
}
blk := &ethpb.SignedBeaconBlockAltair{
blk := &prysmv2.SignedBeaconBlock{
Block: b,
Signature: sig,
}
@@ -248,7 +249,7 @@ func (v *validator) proposeBlockV2(ctx context.Context, slot types.Slot, pubKey
}
// Propose and broadcast block via beacon node
blkResp, err := v.validatorClient.ProposeBlockV2(ctx, blk)
blkResp, err := v.validatorClientV2.ProposeBlock(ctx, blk)
if err != nil {
log.WithError(err).Error("Failed to propose block")
if v.emitAccountMetrics {
@@ -361,7 +362,7 @@ func (v *validator) signBlock(ctx context.Context, pubKey [48]byte, epoch types.
var sig bls.Signature
switch b.Version() {
case version.Altair:
block, ok := b.Proto().(*ethpb.BeaconBlockAltair)
block, ok := b.Proto().(*prysmv2.BeaconBlock)
if !ok {
return nil, nil, errors.New("could not convert obj to beacon block altair")
}

View File

@@ -12,6 +12,7 @@ import (
lru "github.com/hashicorp/golang-lru"
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
validatorpb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2"
"github.com/prysmaticlabs/prysm/shared/bls"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
@@ -28,9 +29,10 @@ import (
)
type mocks struct {
validatorClient *mock.MockBeaconNodeValidatorClient
nodeClient *mock.MockNodeClient
signExitFunc func(context.Context, *validatorpb.SignRequest) (bls.Signature, error)
validatorClient *mock.MockBeaconNodeValidatorClient
validatorClientV2 *mock.MockBeaconNodeValidatorAltairClient
nodeClient *mock.MockNodeClient
signExitFunc func(context.Context, *validatorpb.SignRequest) (bls.Signature, error)
}
type mockSignature struct{}
@@ -62,8 +64,9 @@ func setup(t *testing.T) (*validator, *mocks, bls.SecretKey, func()) {
valDB := testing2.SetupDB(t, [][48]byte{pubKey})
ctrl := gomock.NewController(t)
m := &mocks{
validatorClient: mock.NewMockBeaconNodeValidatorClient(ctrl),
nodeClient: mock.NewMockNodeClient(ctrl),
validatorClient: mock.NewMockBeaconNodeValidatorClient(ctrl),
validatorClientV2: mock.NewMockBeaconNodeValidatorAltairClient(ctrl),
nodeClient: mock.NewMockNodeClient(ctrl),
signExitFunc: func(ctx context.Context, req *validatorpb.SignRequest) (bls.Signature, error) {
return mockSignature{}, nil
},
@@ -81,6 +84,7 @@ func setup(t *testing.T) (*validator, *mocks, bls.SecretKey, func()) {
db: valDB,
keyManager: km,
validatorClient: m.validatorClient,
validatorClientV2: m.validatorClientV2,
graffiti: []byte{},
attLogs: make(map[[32]byte]*attSubmitted),
aggregatedSlotCommitteeIDCache: aggregatedSlotCommitteeIDCache,
@@ -169,7 +173,7 @@ func TestProposeBlockV2_RequestBlockFailed(t *testing.T) {
gomock.Any(), // epoch
).Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil /*err*/)
m.validatorClient.EXPECT().GetBlockV2(
m.validatorClientV2.EXPECT().GetBlock(
gomock.Any(), // ctx
gomock.Any(), // block request
).Return(nil /*response*/, errors.New("uh oh"))
@@ -225,7 +229,7 @@ func TestProposeBlockV2_ProposeBlockFailed(t *testing.T) {
gomock.Any(), // epoch
).Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil /*err*/)
m.validatorClient.EXPECT().GetBlockV2(
m.validatorClientV2.EXPECT().GetBlock(
gomock.Any(), // ctx
gomock.Any(),
).Return(testutil.NewBeaconBlockAltair().Block, nil /*err*/)
@@ -235,9 +239,9 @@ func TestProposeBlockV2_ProposeBlockFailed(t *testing.T) {
gomock.Any(), // epoch
).Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil /*err*/)
m.validatorClient.EXPECT().ProposeBlockV2(
m.validatorClientV2.EXPECT().ProposeBlock(
gomock.Any(), // ctx
gomock.AssignableToTypeOf(&ethpb.SignedBeaconBlockAltair{}),
gomock.AssignableToTypeOf(&prysmv2.SignedBeaconBlock{}),
).Return(nil /*response*/, errors.New("uh oh"))
validator.ProposeBlock(context.Background(), 2*params.BeaconConfig().SlotsPerEpoch, pubKey)
@@ -320,7 +324,7 @@ func TestProposeBlockV2_BlocksDoubleProposal(t *testing.T) {
testBlock := testutil.NewBeaconBlockAltair()
slot := params.BeaconConfig().SlotsPerEpoch*5 + 2
testBlock.Block.Slot = slot
m.validatorClient.EXPECT().GetBlockV2(
m.validatorClientV2.EXPECT().GetBlock(
gomock.Any(), // ctx
gomock.Any(),
).Return(testBlock.Block, nil /*err*/)
@@ -330,7 +334,7 @@ func TestProposeBlockV2_BlocksDoubleProposal(t *testing.T) {
graffiti := [32]byte{}
copy(graffiti[:], "someothergraffiti")
secondTestBlock.Block.Body.Graffiti = graffiti[:]
m.validatorClient.EXPECT().GetBlockV2(
m.validatorClientV2.EXPECT().GetBlock(
gomock.Any(), // ctx
gomock.Any(),
).Return(secondTestBlock.Block, nil /*err*/)
@@ -340,9 +344,9 @@ func TestProposeBlockV2_BlocksDoubleProposal(t *testing.T) {
gomock.Any(), // epoch
).Times(3).Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil /*err*/)
m.validatorClient.EXPECT().ProposeBlockV2(
m.validatorClientV2.EXPECT().ProposeBlock(
gomock.Any(), // ctx
gomock.AssignableToTypeOf(&ethpb.SignedBeaconBlockAltair{}),
gomock.AssignableToTypeOf(&prysmv2.SignedBeaconBlock{}),
).Return(&ethpb.ProposeResponse{BlockRoot: make([]byte, 32)}, nil /*error*/)
validator.ProposeBlock(context.Background(), slot, pubKey)
@@ -587,7 +591,7 @@ func TestProposeBlockV2_BroadcastsBlock_WithGraffiti(t *testing.T) {
blk := testutil.NewBeaconBlockAltair()
blk.Block.Body.Graffiti = validator.graffiti
m.validatorClient.EXPECT().GetBlockV2(
m.validatorClientV2.EXPECT().GetBlock(
gomock.Any(), // ctx
gomock.Any(),
).Return(blk.Block, nil /*err*/)
@@ -597,12 +601,12 @@ func TestProposeBlockV2_BroadcastsBlock_WithGraffiti(t *testing.T) {
gomock.Any(), // epoch
).Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil /*err*/)
var sentBlock *ethpb.SignedBeaconBlockAltair
var sentBlock *prysmv2.SignedBeaconBlock
m.validatorClient.EXPECT().ProposeBlockV2(
m.validatorClientV2.EXPECT().ProposeBlock(
gomock.Any(), // ctx
gomock.AssignableToTypeOf(&ethpb.SignedBeaconBlockAltair{}),
).DoAndReturn(func(ctx context.Context, block *ethpb.SignedBeaconBlockAltair) (*ethpb.ProposeResponse, error) {
gomock.AssignableToTypeOf(&prysmv2.SignedBeaconBlock{}),
).DoAndReturn(func(ctx context.Context, block *prysmv2.SignedBeaconBlock) (*ethpb.ProposeResponse, error) {
sentBlock = block
return &ethpb.ProposeResponse{BlockRoot: make([]byte, 32)}, nil
})

View File

@@ -15,6 +15,7 @@ import (
"github.com/pkg/errors"
types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/event"
"github.com/prysmaticlabs/prysm/shared/grpcutils"
@@ -180,6 +181,7 @@ func (v *ValidatorService) Start() {
v.validator = &validator{
db: v.db,
validatorClient: ethpb.NewBeaconNodeValidatorClient(v.conn),
validatorClientV2: prysmv2.NewBeaconNodeValidatorAltairClient(v.conn),
beaconClient: ethpb.NewBeaconChainClient(v.conn),
node: ethpb.NewNodeClient(v.conn),
keyManager: v.keyManager,

Some files were not shown because too many files have changed in this diff Show More