From a201c78d2823c8c5947197a9f50daed76c2ccabd Mon Sep 17 00:00:00 2001 From: terence tsao Date: Fri, 1 Nov 2024 11:32:40 -0700 Subject: [PATCH 01/11] Add missed exit checks to consolidation processing --- CHANGELOG.md | 1 + beacon-chain/core/electra/consolidations.go | 19 +++++++++++++++++++ .../core/electra/consolidations_test.go | 14 ++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ccb5167d037..0f64d6ae260d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - Updated light client protobufs. [PR](https://github.com/prysmaticlabs/prysm/pull/14650) - Added `Eth-Consensus-Version` header to `ListAttestationsV2` and `GetAggregateAttestationV2` endpoints. - Updated light client consensus types. [PR](https://github.com/prysmaticlabs/prysm/pull/14652) +- Add missed exit checks to consolidation processing ### Deprecated diff --git a/beacon-chain/core/electra/consolidations.go b/beacon-chain/core/electra/consolidations.go index a4e08c19f8c9..a11454697f06 100644 --- a/beacon-chain/core/electra/consolidations.go +++ b/beacon-chain/core/electra/consolidations.go @@ -156,6 +156,13 @@ func ProcessPendingConsolidations(ctx context.Context, st state.BeaconState) err // if target_validator.exit_epoch != FAR_FUTURE_EPOCH: // return // +// # Verify the source has been active long enough +// if current_epoch < source_validator.activation_epoch + SHARD_COMMITTEE_PERIOD: +// return +// +// # Verify the source has no pending withdrawals in the queue +// if get_pending_balance_to_withdraw(state, source_index) > 0: +// return // # Initiate source validator exit and append pending consolidation // source_validator.exit_epoch = compute_consolidation_epoch_and_update_churn( // state, source_validator.effective_balance @@ -258,6 +265,18 @@ func ProcessConsolidationRequests(ctx context.Context, st state.BeaconState, req continue } + if curEpoch < srcV.ActivationEpoch+params.BeaconConfig().ShardCommitteePeriod { + continue + } + bal, err := st.PendingBalanceToWithdraw(srcIdx) + if err != nil { + log.WithError(err).Error("failed to fetch pending balance to withdraw") + continue + } + if bal > 0 { + continue + } + // Initiate the exit of the source validator. exitEpoch, err := ComputeConsolidationEpochAndUpdateChurn(ctx, st, primitives.Gwei(srcV.EffectiveBalance)) if err != nil { diff --git a/beacon-chain/core/electra/consolidations_test.go b/beacon-chain/core/electra/consolidations_test.go index 8d065d914848..e6bf68a754c3 100644 --- a/beacon-chain/core/electra/consolidations_test.go +++ b/beacon-chain/core/electra/consolidations_test.go @@ -213,6 +213,7 @@ func TestProcessConsolidationRequests(t *testing.T) { name: "one valid request", state: func() state.BeaconState { st := ð.BeaconStateElectra{ + Slot: params.BeaconConfig().SlotsPerEpoch.Mul(uint64(params.BeaconConfig().ShardCommitteePeriod)), Validators: createValidatorsWithTotalActiveBalance(32000000000000000), // 32M ETH } // Validator scenario setup. See comments in reqs section. @@ -222,6 +223,12 @@ func TestProcessConsolidationRequests(t *testing.T) { st.Validators[12].ActivationEpoch = params.BeaconConfig().FarFutureEpoch st.Validators[13].ExitEpoch = 10 st.Validators[16].ExitEpoch = 10 + st.PendingPartialWithdrawals = []*eth.PendingPartialWithdrawal{ + { + Index: 17, + Amount: 100, + }, + } s, err := state_native.InitializeFromProtoElectra(st) require.NoError(t, err) return s @@ -287,6 +294,12 @@ func TestProcessConsolidationRequests(t *testing.T) { SourcePubkey: []byte("val_0"), TargetPubkey: []byte("val_0"), }, + // Has pening partial withdrawal + { + SourceAddress: append(bytesutil.PadTo(nil, 19), byte(0)), + SourcePubkey: []byte("val_17"), + TargetPubkey: []byte("val_1"), + }, // Valid consolidation request. This should be last to ensure invalid requests do // not end the processing early. { @@ -347,6 +360,7 @@ func TestProcessConsolidationRequests(t *testing.T) { name: "pending consolidations limit reached during processing", state: func() state.BeaconState { st := ð.BeaconStateElectra{ + Slot: params.BeaconConfig().SlotsPerEpoch.Mul(uint64(params.BeaconConfig().ShardCommitteePeriod)), Validators: createValidatorsWithTotalActiveBalance(32000000000000000), // 32M ETH PendingConsolidations: make([]*eth.PendingConsolidation, params.BeaconConfig().PendingConsolidationsLimit-1), } From 0b454155d30131390285330d3be03b07667589bc Mon Sep 17 00:00:00 2001 From: terence tsao Date: Fri, 1 Nov 2024 19:48:15 -0700 Subject: [PATCH 02/11] Use safe add --- beacon-chain/core/electra/consolidations.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/beacon-chain/core/electra/consolidations.go b/beacon-chain/core/electra/consolidations.go index a11454697f06..d21d9b4d62fa 100644 --- a/beacon-chain/core/electra/consolidations.go +++ b/beacon-chain/core/electra/consolidations.go @@ -5,6 +5,7 @@ import ( "context" "fmt" + "github.com/ethereum/go-ethereum/common/math" "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" @@ -265,7 +266,12 @@ func ProcessConsolidationRequests(ctx context.Context, st state.BeaconState, req continue } - if curEpoch < srcV.ActivationEpoch+params.BeaconConfig().ShardCommitteePeriod { + e, ok := math.SafeAdd(uint64(srcV.ActivationEpoch), uint64(params.BeaconConfig().ShardCommitteePeriod)) + if !ok { + log.Error("Overflow when adding activation epoch and shard committee period") + continue + } + if uint64(curEpoch) < e { continue } bal, err := st.PendingBalanceToWithdraw(srcIdx) From 717e122f77c45103e5beaf9f3935ee030bfd656a Mon Sep 17 00:00:00 2001 From: james-prysm Date: Mon, 4 Nov 2024 10:54:22 -0600 Subject: [PATCH 03/11] gaz --- beacon-chain/core/electra/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/beacon-chain/core/electra/BUILD.bazel b/beacon-chain/core/electra/BUILD.bazel index 35ef921f3ef0..ee2a0addf949 100644 --- a/beacon-chain/core/electra/BUILD.bazel +++ b/beacon-chain/core/electra/BUILD.bazel @@ -41,6 +41,7 @@ go_library( "//runtime/version:go_default_library", "//time/slots:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", + "@com_github_ethereum_go_ethereum//common/math:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], From db643ad948aa22f4a232e3ce567caaa3764a65e8 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Sat, 23 Nov 2024 11:14:57 -0800 Subject: [PATCH 04/11] Pass spec tests (except single attestation) Revert params.SetupTestConfigCleanupWithLock(t) --- WORKSPACE | 10 +++++----- beacon-chain/core/electra/consolidations.go | 4 ++-- beacon-chain/core/electra/upgrade.go | 2 +- config/params/loader_test.go | 7 +++++-- proto/prysm/v1alpha1/attestation/attestation_utils.go | 3 +++ 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 9f52bbccf040..3bc439a7e785 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -227,7 +227,7 @@ filegroup( url = "https://github.com/ethereum/EIPs/archive/5480440fe51742ed23342b68cf106cefd427e39d.tar.gz", ) -consensus_spec_version = "v1.5.0-alpha.8" +consensus_spec_version = "v1.5.0-alpha.9" bls_test_version = "v0.1.1" @@ -243,7 +243,7 @@ filegroup( visibility = ["//visibility:public"], ) """, - integrity = "sha256-BsGIbEyJuYrzhShGl0tHhR4lP5Qwno8R3k8a6YBR/DA=", + integrity = "sha256-gHbvlnErUeJGWzW8/8JiVlk28JwmXSMhOzkynEIz+8g=", url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/general.tar.gz" % consensus_spec_version, ) @@ -259,7 +259,7 @@ filegroup( visibility = ["//visibility:public"], ) """, - integrity = "sha256-DkdvhPP2KiqUOpwFXQIFDCWCwsUDIC/xhTBD+TZevm0=", + integrity = "sha256-hQkQdpm5ng4miGYa5WsOKWa0q8WtZu99Oqbv9QtBeJM=", url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/minimal.tar.gz" % consensus_spec_version, ) @@ -275,7 +275,7 @@ filegroup( visibility = ["//visibility:public"], ) """, - integrity = "sha256-vkZqV0HB8A2Uc56C1Us/p5G57iaHL+zw2No93Xt6M/4=", + integrity = "sha256-33sBsmApnJpcyYfR3olKaPB+WC1q00ZKNzHa2TczIxk=", url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/mainnet.tar.gz" % consensus_spec_version, ) @@ -290,7 +290,7 @@ filegroup( visibility = ["//visibility:public"], ) """, - integrity = "sha256-D/HPAW61lKqjoWwl7N0XvhdX+67dCEFAy8JxVzqBGtU=", + integrity = "sha256-GQulBKLc2khpql2K/MxV+NG/d2kAhLXl+gLnKIg7rt4=", strip_prefix = "consensus-specs-" + consensus_spec_version[1:], url = "https://github.com/ethereum/consensus-specs/archive/refs/tags/%s.tar.gz" % consensus_spec_version, ) diff --git a/beacon-chain/core/electra/consolidations.go b/beacon-chain/core/electra/consolidations.go index d21d9b4d62fa..b2ddd2e49748 100644 --- a/beacon-chain/core/electra/consolidations.go +++ b/beacon-chain/core/electra/consolidations.go @@ -266,8 +266,8 @@ func ProcessConsolidationRequests(ctx context.Context, st state.BeaconState, req continue } - e, ok := math.SafeAdd(uint64(srcV.ActivationEpoch), uint64(params.BeaconConfig().ShardCommitteePeriod)) - if !ok { + e, overflow := math.SafeAdd(uint64(srcV.ActivationEpoch), uint64(params.BeaconConfig().ShardCommitteePeriod)) + if overflow { log.Error("Overflow when adding activation epoch and shard committee period") continue } diff --git a/beacon-chain/core/electra/upgrade.go b/beacon-chain/core/electra/upgrade.go index 2364db01f436..5eaff157a7fe 100644 --- a/beacon-chain/core/electra/upgrade.go +++ b/beacon-chain/core/electra/upgrade.go @@ -187,7 +187,7 @@ func UpgradeToElectra(beaconState state.BeaconState) (state.BeaconState, error) } // [New in Electra:EIP7251] - earliestExitEpoch := time.CurrentEpoch(beaconState) + earliestExitEpoch := helpers.ActivationExitEpoch(time.CurrentEpoch(beaconState)) preActivationIndices := make([]primitives.ValidatorIndex, 0) compoundWithdrawalIndices := make([]primitives.ValidatorIndex, 0) if err = beaconState.ReadFromEveryValidator(func(index int, val state.ReadOnlyValidator) error { diff --git a/config/params/loader_test.go b/config/params/loader_test.go index 791e896dda6f..eca6bde1e299 100644 --- a/config/params/loader_test.go +++ b/config/params/loader_test.go @@ -24,6 +24,7 @@ import ( // These are variables that we don't use in Prysm. (i.e. future hardfork, light client... etc) // IMPORTANT: Use one field per line and sort these alphabetically to reduce conflicts. var placeholderFields = []string{ + "BLOB_SIDECAR_SUBNET_COUNT_EIP7594", "BYTES_PER_LOGS_BLOOM", // Compile time constant on ExecutionPayload.logs_bloom. "EIP6110_FORK_EPOCH", "EIP6110_FORK_VERSION", @@ -35,11 +36,13 @@ var placeholderFields = []string{ "FIELD_ELEMENTS_PER_BLOB", // Compile time constant. "KZG_COMMITMENT_INCLUSION_PROOF_DEPTH", // Compile time constant on BlobSidecar.commitment_inclusion_proof. "MAX_BLOBS_PER_BLOCK", + "MAX_BLOBS_PER_BLOCK_EIP7594", "MAX_BLOB_COMMITMENTS_PER_BLOCK", // Compile time constant on BeaconBlockBodyDeneb.blob_kzg_commitments. "MAX_BYTES_PER_TRANSACTION", // Used for ssz of EL transactions. Unused in Prysm. "MAX_EXTRA_DATA_BYTES", // Compile time constant on ExecutionPayload.extra_data. - "MAX_REQUEST_PAYLOADS", // Compile time constant on BeaconBlockBody.ExecutionRequests - "MAX_TRANSACTIONS_PER_PAYLOAD", // Compile time constant on ExecutionPayload.transactions. + "MAX_REQUEST_BLOB_SIDECARS_EIP7594", + "MAX_REQUEST_PAYLOADS", // Compile time constant on BeaconBlockBody.ExecutionRequests + "MAX_TRANSACTIONS_PER_PAYLOAD", // Compile time constant on ExecutionPayload.transactions. "REORG_HEAD_WEIGHT_THRESHOLD", "TARGET_NUMBER_OF_PEERS", "UPDATE_TIMEOUT", diff --git a/proto/prysm/v1alpha1/attestation/attestation_utils.go b/proto/prysm/v1alpha1/attestation/attestation_utils.go index 9f886030256b..7c160a8cf43e 100644 --- a/proto/prysm/v1alpha1/attestation/attestation_utils.go +++ b/proto/prysm/v1alpha1/attestation/attestation_utils.go @@ -113,6 +113,9 @@ func AttestingIndices(att ethpb.Att, committees ...[]primitives.ValidatorIndex) committeeAttesters = append(committeeAttesters, uint64(vi)) } } + if len(committeeAttesters) == 0 { + return nil, fmt.Errorf("no attesting indices found in committee %v", c) + } attesters = append(attesters, committeeAttesters...) committeeOffset += len(c) } From 5a70635644ecf80f905b0b72643e950b6290957d Mon Sep 17 00:00:00 2001 From: terence tsao Date: Sun, 24 Nov 2024 13:41:24 -0800 Subject: [PATCH 05/11] Update earlist exit epoch for upgrade to electra --- CHANGELOG.md | 1 + beacon-chain/core/electra/upgrade.go | 2 +- beacon-chain/core/electra/upgrade_test.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ccb5167d037..13729d7567cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - Updated light client protobufs. [PR](https://github.com/prysmaticlabs/prysm/pull/14650) - Added `Eth-Consensus-Version` header to `ListAttestationsV2` and `GetAggregateAttestationV2` endpoints. - Updated light client consensus types. [PR](https://github.com/prysmaticlabs/prysm/pull/14652) +- Update earliest exit epoch for upgrade to electra ### Deprecated diff --git a/beacon-chain/core/electra/upgrade.go b/beacon-chain/core/electra/upgrade.go index 2364db01f436..5eaff157a7fe 100644 --- a/beacon-chain/core/electra/upgrade.go +++ b/beacon-chain/core/electra/upgrade.go @@ -187,7 +187,7 @@ func UpgradeToElectra(beaconState state.BeaconState) (state.BeaconState, error) } // [New in Electra:EIP7251] - earliestExitEpoch := time.CurrentEpoch(beaconState) + earliestExitEpoch := helpers.ActivationExitEpoch(time.CurrentEpoch(beaconState)) preActivationIndices := make([]primitives.ValidatorIndex, 0) compoundWithdrawalIndices := make([]primitives.ValidatorIndex, 0) if err = beaconState.ReadFromEveryValidator(func(index int, val state.ReadOnlyValidator) error { diff --git a/beacon-chain/core/electra/upgrade_test.go b/beacon-chain/core/electra/upgrade_test.go index 40f2f754c5a7..c80aef5f1854 100644 --- a/beacon-chain/core/electra/upgrade_test.go +++ b/beacon-chain/core/electra/upgrade_test.go @@ -159,7 +159,7 @@ func TestUpgradeToElectra(t *testing.T) { eee, err := mSt.EarliestExitEpoch() require.NoError(t, err) - require.Equal(t, primitives.Epoch(1), eee) + require.Equal(t, helpers.ActivationExitEpoch(primitives.Epoch(1)), eee) cbtc, err := mSt.ConsolidationBalanceToConsume() require.NoError(t, err) From 4587d9503765669661f212454a8c8a9471371c3b Mon Sep 17 00:00:00 2001 From: terence tsao Date: Sun, 24 Nov 2024 13:50:53 -0800 Subject: [PATCH 06/11] Validate that each committee bitfield in an aggregate contains at least one non-zero bit --- CHANGELOG.md | 1 + beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go | 4 +++- proto/prysm/v1alpha1/attestation/attestation_utils.go | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f54b7fd3bf8..25a02eadbed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,6 +91,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - corrects nil check on some interface attestation types - temporary solution to handling electra attesation and attester_slashing events. [pr](14655) - Diverse log improvements and comment additions. +- Validate that each committee bitfield in an aggregate contains at least one non-zero bit ### Security diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go index 8657ca5a3418..ad029c217be9 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go @@ -765,6 +765,8 @@ func TestServer_ListIndexedAttestationsElectra(t *testing.T) { cb := primitives.NewAttestationCommitteeBits() cb.SetBitAt(0, true) blockExample := util.NewBeaconBlockElectra() + ab := bitfield.NewBitlist(128 / uint64(params.BeaconConfig().SlotsPerEpoch)) + ab.SetBitAt(0, true) blockExample.Block.Body.Attestations = []*ethpb.AttestationElectra{ { Signature: make([]byte, fieldparams.BLSSignatureLength), @@ -778,7 +780,7 @@ func TestServer_ListIndexedAttestationsElectra(t *testing.T) { }, Slot: i, }, - AggregationBits: bitfield.NewBitlist(128 / uint64(params.BeaconConfig().SlotsPerEpoch)), + AggregationBits: ab, CommitteeBits: cb, }, } diff --git a/proto/prysm/v1alpha1/attestation/attestation_utils.go b/proto/prysm/v1alpha1/attestation/attestation_utils.go index 9f886030256b..7c160a8cf43e 100644 --- a/proto/prysm/v1alpha1/attestation/attestation_utils.go +++ b/proto/prysm/v1alpha1/attestation/attestation_utils.go @@ -113,6 +113,9 @@ func AttestingIndices(att ethpb.Att, committees ...[]primitives.ValidatorIndex) committeeAttesters = append(committeeAttesters, uint64(vi)) } } + if len(committeeAttesters) == 0 { + return nil, fmt.Errorf("no attesting indices found in committee %v", c) + } attesters = append(attesters, committeeAttesters...) committeeOffset += len(c) } From 637bdec05d52b6f013e53c4095dcb85fd7dac675 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Mon, 25 Nov 2024 06:59:11 -0800 Subject: [PATCH 07/11] Add single attestation --- proto/prysm/v1alpha1/BUILD.bazel | 1 + proto/prysm/v1alpha1/attestation.pb.go | 381 ++++++++++++++++--------- proto/prysm/v1alpha1/attestation.proto | 7 + proto/prysm/v1alpha1/electra.ssz.go | 103 ++++++- 4 files changed, 354 insertions(+), 138 deletions(-) diff --git a/proto/prysm/v1alpha1/BUILD.bazel b/proto/prysm/v1alpha1/BUILD.bazel index 6f349ab07af3..fe510860a9c6 100644 --- a/proto/prysm/v1alpha1/BUILD.bazel +++ b/proto/prysm/v1alpha1/BUILD.bazel @@ -172,6 +172,7 @@ ssz_electra_objs = [ "SignedBeaconBlockElectra", "SignedBlindedBeaconBlockElectra", "SignedConsolidation", + "SingleAttestation", ] ssz_fulu_objs = [ diff --git a/proto/prysm/v1alpha1/attestation.pb.go b/proto/prysm/v1alpha1/attestation.pb.go index 6b1f970fb1ef..2c3cfc022e16 100755 --- a/proto/prysm/v1alpha1/attestation.pb.go +++ b/proto/prysm/v1alpha1/attestation.pb.go @@ -158,6 +158,77 @@ func (x *AttestationElectra) GetCommitteeBits() github_com_prysmaticlabs_go_bitf return github_com_prysmaticlabs_go_bitfield.Bitvector64(nil) } +type SingleAttestation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommitteeId github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.CommitteeIndex `protobuf:"varint,1,opt,name=committee_id,json=committeeId,proto3" json:"committee_id,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.CommitteeIndex"` + AttesterIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,2,opt,name=attester_index,json=attesterIndex,proto3" json:"attester_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + Data *AttestationData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *SingleAttestation) Reset() { + *x = SingleAttestation{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SingleAttestation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleAttestation) ProtoMessage() {} + +func (x *SingleAttestation) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_attestation_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 SingleAttestation.ProtoReflect.Descriptor instead. +func (*SingleAttestation) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{2} +} + +func (x *SingleAttestation) GetCommitteeId() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.CommitteeIndex { + if x != nil { + return x.CommitteeId + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.CommitteeIndex(0) +} + +func (x *SingleAttestation) GetAttesterIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.AttesterIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *SingleAttestation) GetData() *AttestationData { + if x != nil { + return x.Data + } + return nil +} + +func (x *SingleAttestation) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + type AggregateAttestationAndProof struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -171,7 +242,7 @@ type AggregateAttestationAndProof struct { func (x *AggregateAttestationAndProof) Reset() { *x = AggregateAttestationAndProof{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[2] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -184,7 +255,7 @@ func (x *AggregateAttestationAndProof) String() string { func (*AggregateAttestationAndProof) ProtoMessage() {} func (x *AggregateAttestationAndProof) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[2] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -197,7 +268,7 @@ func (x *AggregateAttestationAndProof) ProtoReflect() protoreflect.Message { // Deprecated: Use AggregateAttestationAndProof.ProtoReflect.Descriptor instead. func (*AggregateAttestationAndProof) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{2} + return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{3} } func (x *AggregateAttestationAndProof) GetAggregatorIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { @@ -234,7 +305,7 @@ type AggregateAttestationAndProofElectra struct { func (x *AggregateAttestationAndProofElectra) Reset() { *x = AggregateAttestationAndProofElectra{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[3] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -247,7 +318,7 @@ func (x *AggregateAttestationAndProofElectra) String() string { func (*AggregateAttestationAndProofElectra) ProtoMessage() {} func (x *AggregateAttestationAndProofElectra) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[3] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -260,7 +331,7 @@ func (x *AggregateAttestationAndProofElectra) ProtoReflect() protoreflect.Messag // Deprecated: Use AggregateAttestationAndProofElectra.ProtoReflect.Descriptor instead. func (*AggregateAttestationAndProofElectra) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{3} + return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{4} } func (x *AggregateAttestationAndProofElectra) GetAggregatorIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { @@ -296,7 +367,7 @@ type SignedAggregateAttestationAndProof struct { func (x *SignedAggregateAttestationAndProof) Reset() { *x = SignedAggregateAttestationAndProof{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[4] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -309,7 +380,7 @@ func (x *SignedAggregateAttestationAndProof) String() string { func (*SignedAggregateAttestationAndProof) ProtoMessage() {} func (x *SignedAggregateAttestationAndProof) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[4] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -322,7 +393,7 @@ func (x *SignedAggregateAttestationAndProof) ProtoReflect() protoreflect.Message // Deprecated: Use SignedAggregateAttestationAndProof.ProtoReflect.Descriptor instead. func (*SignedAggregateAttestationAndProof) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{4} + return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{5} } func (x *SignedAggregateAttestationAndProof) GetMessage() *AggregateAttestationAndProof { @@ -351,7 +422,7 @@ type SignedAggregateAttestationAndProofElectra struct { func (x *SignedAggregateAttestationAndProofElectra) Reset() { *x = SignedAggregateAttestationAndProofElectra{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[5] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -364,7 +435,7 @@ func (x *SignedAggregateAttestationAndProofElectra) String() string { func (*SignedAggregateAttestationAndProofElectra) ProtoMessage() {} func (x *SignedAggregateAttestationAndProofElectra) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[5] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -377,7 +448,7 @@ func (x *SignedAggregateAttestationAndProofElectra) ProtoReflect() protoreflect. // Deprecated: Use SignedAggregateAttestationAndProofElectra.ProtoReflect.Descriptor instead. func (*SignedAggregateAttestationAndProofElectra) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{5} + return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{6} } func (x *SignedAggregateAttestationAndProofElectra) GetMessage() *AggregateAttestationAndProofElectra { @@ -409,7 +480,7 @@ type AttestationData struct { func (x *AttestationData) Reset() { *x = AttestationData{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[6] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -422,7 +493,7 @@ func (x *AttestationData) String() string { func (*AttestationData) ProtoMessage() {} func (x *AttestationData) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[6] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -435,7 +506,7 @@ func (x *AttestationData) ProtoReflect() protoreflect.Message { // Deprecated: Use AttestationData.ProtoReflect.Descriptor instead. func (*AttestationData) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{6} + return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{7} } func (x *AttestationData) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { @@ -485,7 +556,7 @@ type Checkpoint struct { func (x *Checkpoint) Reset() { *x = Checkpoint{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[7] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -498,7 +569,7 @@ func (x *Checkpoint) String() string { func (*Checkpoint) ProtoMessage() {} func (x *Checkpoint) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[7] + mi := &file_proto_prysm_v1alpha1_attestation_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -511,7 +582,7 @@ func (x *Checkpoint) ProtoReflect() protoreflect.Message { // Deprecated: Use Checkpoint.ProtoReflect.Descriptor instead. func (*Checkpoint) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{7} + return file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP(), []int{8} } func (x *Checkpoint) GetEpoch() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch { @@ -570,106 +641,128 @@ var file_proto_prysm_v1alpha1_attestation_proto_rawDesc = []byte{ 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, 0x36, 0x34, 0x8a, 0xb5, 0x18, 0x01, 0x38, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x65, 0x42, 0x69, 0x74, 0x73, 0x22, 0x8d, 0x02, 0x0a, 0x1c, 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, 0x12, 0x7a, 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, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, - 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, 0x40, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, - 0x03, 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, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 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, 0x9b, 0x02, 0x0a, 0x23, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x7a, 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, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 0x67, 0x69, 0x74, + 0x65, 0x42, 0x69, 0x74, 0x73, 0x22, 0xe1, 0x02, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x72, 0x0a, 0x0c, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x64, 0x12, + 0x76, 0x0a, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 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, 0x47, 0x0a, 0x09, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, - 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 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, 0x99, 0x01, 0x0a, 0x22, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x67, + 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 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, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 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, 0x8d, 0x02, 0x0a, 0x1c, 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, 0x12, 0x4d, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 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, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, - 0xa7, 0x01, 0x0a, 0x29, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x54, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, - 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 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, 0x90, 0x03, 0x0a, 0x0f, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, - 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, - 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x7a, 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, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, + 0x69, 0x74, 0x69, 0x76, 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, 0x40, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x18, 0x03, 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, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 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, 0x9b, 0x02, 0x0a, 0x23, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x61, 0x12, 0x7a, 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, 0x4f, 0x82, 0xb5, 0x18, + 0x4b, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, - 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x78, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, - 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x86, 0x01, 0x0a, - 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x05, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, - 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, 0x76, - 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x42, 0x9b, 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, 0x10, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 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, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 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, + 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 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, 0x47, 0x0a, + 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x09, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 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, 0x99, 0x01, 0x0a, 0x22, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 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, 0x12, 0x4d, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 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, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0xa7, 0x01, 0x0a, 0x29, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x61, 0x12, 0x54, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3a, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x90, 0x03, + 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x45, 0x82, 0xb5, 0x18, 0x41, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x78, 0x0a, 0x0f, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, + 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x22, 0x86, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x5c, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, + 0x82, 0xb5, 0x18, 0x42, 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, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, + 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1a, 0x0a, + 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x42, 0x9b, 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, 0x10, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 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, 0x76, 0x35, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 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 ( @@ -684,31 +777,33 @@ func file_proto_prysm_v1alpha1_attestation_proto_rawDescGZIP() []byte { return file_proto_prysm_v1alpha1_attestation_proto_rawDescData } -var file_proto_prysm_v1alpha1_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_proto_prysm_v1alpha1_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_proto_prysm_v1alpha1_attestation_proto_goTypes = []interface{}{ (*Attestation)(nil), // 0: ethereum.eth.v1alpha1.Attestation (*AttestationElectra)(nil), // 1: ethereum.eth.v1alpha1.AttestationElectra - (*AggregateAttestationAndProof)(nil), // 2: ethereum.eth.v1alpha1.AggregateAttestationAndProof - (*AggregateAttestationAndProofElectra)(nil), // 3: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra - (*SignedAggregateAttestationAndProof)(nil), // 4: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof - (*SignedAggregateAttestationAndProofElectra)(nil), // 5: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra - (*AttestationData)(nil), // 6: ethereum.eth.v1alpha1.AttestationData - (*Checkpoint)(nil), // 7: ethereum.eth.v1alpha1.Checkpoint + (*SingleAttestation)(nil), // 2: ethereum.eth.v1alpha1.SingleAttestation + (*AggregateAttestationAndProof)(nil), // 3: ethereum.eth.v1alpha1.AggregateAttestationAndProof + (*AggregateAttestationAndProofElectra)(nil), // 4: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra + (*SignedAggregateAttestationAndProof)(nil), // 5: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof + (*SignedAggregateAttestationAndProofElectra)(nil), // 6: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra + (*AttestationData)(nil), // 7: ethereum.eth.v1alpha1.AttestationData + (*Checkpoint)(nil), // 8: ethereum.eth.v1alpha1.Checkpoint } var file_proto_prysm_v1alpha1_attestation_proto_depIdxs = []int32{ - 6, // 0: ethereum.eth.v1alpha1.Attestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData - 6, // 1: ethereum.eth.v1alpha1.AttestationElectra.data:type_name -> ethereum.eth.v1alpha1.AttestationData - 0, // 2: ethereum.eth.v1alpha1.AggregateAttestationAndProof.aggregate:type_name -> ethereum.eth.v1alpha1.Attestation - 1, // 3: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra.aggregate:type_name -> ethereum.eth.v1alpha1.AttestationElectra - 2, // 4: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof.message:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProof - 3, // 5: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra.message:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra - 7, // 6: ethereum.eth.v1alpha1.AttestationData.source:type_name -> ethereum.eth.v1alpha1.Checkpoint - 7, // 7: ethereum.eth.v1alpha1.AttestationData.target:type_name -> ethereum.eth.v1alpha1.Checkpoint - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 7, // 0: ethereum.eth.v1alpha1.Attestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData + 7, // 1: ethereum.eth.v1alpha1.AttestationElectra.data:type_name -> ethereum.eth.v1alpha1.AttestationData + 7, // 2: ethereum.eth.v1alpha1.SingleAttestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData + 0, // 3: ethereum.eth.v1alpha1.AggregateAttestationAndProof.aggregate:type_name -> ethereum.eth.v1alpha1.Attestation + 1, // 4: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra.aggregate:type_name -> ethereum.eth.v1alpha1.AttestationElectra + 3, // 5: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof.message:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProof + 4, // 6: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra.message:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra + 8, // 7: ethereum.eth.v1alpha1.AttestationData.source:type_name -> ethereum.eth.v1alpha1.Checkpoint + 8, // 8: ethereum.eth.v1alpha1.AttestationData.target:type_name -> ethereum.eth.v1alpha1.Checkpoint + 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_v1alpha1_attestation_proto_init() } @@ -742,7 +837,7 @@ func file_proto_prysm_v1alpha1_attestation_proto_init() { } } file_proto_prysm_v1alpha1_attestation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregateAttestationAndProof); i { + switch v := v.(*SingleAttestation); i { case 0: return &v.state case 1: @@ -754,7 +849,7 @@ func file_proto_prysm_v1alpha1_attestation_proto_init() { } } file_proto_prysm_v1alpha1_attestation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregateAttestationAndProofElectra); i { + switch v := v.(*AggregateAttestationAndProof); i { case 0: return &v.state case 1: @@ -766,7 +861,7 @@ func file_proto_prysm_v1alpha1_attestation_proto_init() { } } file_proto_prysm_v1alpha1_attestation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignedAggregateAttestationAndProof); i { + switch v := v.(*AggregateAttestationAndProofElectra); i { case 0: return &v.state case 1: @@ -778,7 +873,7 @@ func file_proto_prysm_v1alpha1_attestation_proto_init() { } } file_proto_prysm_v1alpha1_attestation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignedAggregateAttestationAndProofElectra); i { + switch v := v.(*SignedAggregateAttestationAndProof); i { case 0: return &v.state case 1: @@ -790,7 +885,7 @@ func file_proto_prysm_v1alpha1_attestation_proto_init() { } } file_proto_prysm_v1alpha1_attestation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttestationData); i { + switch v := v.(*SignedAggregateAttestationAndProofElectra); i { case 0: return &v.state case 1: @@ -802,6 +897,18 @@ func file_proto_prysm_v1alpha1_attestation_proto_init() { } } file_proto_prysm_v1alpha1_attestation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttestationData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_attestation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Checkpoint); i { case 0: return &v.state @@ -820,7 +927,7 @@ func file_proto_prysm_v1alpha1_attestation_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_prysm_v1alpha1_attestation_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/prysm/v1alpha1/attestation.proto b/proto/prysm/v1alpha1/attestation.proto index a41a3e685fcc..3b30d6aab801 100644 --- a/proto/prysm/v1alpha1/attestation.proto +++ b/proto/prysm/v1alpha1/attestation.proto @@ -49,6 +49,13 @@ message AttestationElectra { bytes committee_bits = 4 [(ethereum.eth.ext.ssz_size) = "committee_bits.size", (ethereum.eth.ext.cast_type) = "committee_bits.type"]; } +message SingleAttestation { + uint64 committee_id = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.CommitteeIndex"]; + uint64 attester_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + AttestationData data = 3; + bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"]; +} + message AggregateAttestationAndProof { // The aggregator index that submitted this aggregated attestation and proof. uint64 aggregator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; diff --git a/proto/prysm/v1alpha1/electra.ssz.go b/proto/prysm/v1alpha1/electra.ssz.go index 16864eaebf0d..dccfbcc8357e 100644 --- a/proto/prysm/v1alpha1/electra.ssz.go +++ b/proto/prysm/v1alpha1/electra.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: bce36d386a65c91018c9a1edaacd2ed0f09cc4dce59fdc5f014fbd9e05bfee77 +// Hash: 2e826c1b9ac62c64b47fcf15d0fe029e986c1afccd33e10a84f041ffd0c7f161 package eth import ( @@ -157,6 +157,107 @@ func (a *AttestationElectra) HashTreeRootWith(hh *ssz.Hasher) (err error) { return } +// MarshalSSZ ssz marshals the SingleAttestation object +func (s *SingleAttestation) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(s) +} + +// MarshalSSZTo ssz marshals the SingleAttestation object to a target array +func (s *SingleAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'CommitteeId' + dst = ssz.MarshalUint64(dst, uint64(s.CommitteeId)) + + // Field (1) 'AttesterIndex' + dst = ssz.MarshalUint64(dst, uint64(s.AttesterIndex)) + + // Field (2) 'Data' + if s.Data == nil { + s.Data = new(AttestationData) + } + if dst, err = s.Data.MarshalSSZTo(dst); err != nil { + return + } + + // Field (3) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, s.Signature...) + + return +} + +// UnmarshalSSZ ssz unmarshals the SingleAttestation object +func (s *SingleAttestation) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 240 { + return ssz.ErrSize + } + + // Field (0) 'CommitteeId' + s.CommitteeId = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.CommitteeIndex(ssz.UnmarshallUint64(buf[0:8])) + + // Field (1) 'AttesterIndex' + s.AttesterIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[8:16])) + + // Field (2) 'Data' + if s.Data == nil { + s.Data = new(AttestationData) + } + if err = s.Data.UnmarshalSSZ(buf[16:144]); err != nil { + return err + } + + // Field (3) 'Signature' + if cap(s.Signature) == 0 { + s.Signature = make([]byte, 0, len(buf[144:240])) + } + s.Signature = append(s.Signature, buf[144:240]...) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the SingleAttestation object +func (s *SingleAttestation) SizeSSZ() (size int) { + size = 240 + return +} + +// HashTreeRoot ssz hashes the SingleAttestation object +func (s *SingleAttestation) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(s) +} + +// HashTreeRootWith ssz hashes the SingleAttestation object with a hasher +func (s *SingleAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'CommitteeId' + hh.PutUint64(uint64(s.CommitteeId)) + + // Field (1) 'AttesterIndex' + hh.PutUint64(uint64(s.AttesterIndex)) + + // Field (2) 'Data' + if err = s.Data.HashTreeRootWith(hh); err != nil { + return + } + + // Field (3) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(s.Signature) + + hh.Merkleize(indx) + return +} + // MarshalSSZ ssz marshals the AggregateAttestationAndProofElectra object func (a *AggregateAttestationAndProofElectra) MarshalSSZ() ([]byte, error) { return ssz.MarshalSSZ(a) From 7571bc8fdf70bdd27c0f9901c18f452c4e7a5758 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Mon, 25 Nov 2024 14:44:04 -0800 Subject: [PATCH 08/11] Add single attestation to ssz static --- testing/spectest/shared/electra/ssz_static/ssz_static.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/spectest/shared/electra/ssz_static/ssz_static.go b/testing/spectest/shared/electra/ssz_static/ssz_static.go index ee60e997db4f..2bfeeaba6612 100644 --- a/testing/spectest/shared/electra/ssz_static/ssz_static.go +++ b/testing/spectest/shared/electra/ssz_static/ssz_static.go @@ -103,6 +103,8 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i obj = ðpb.ContributionAndProof{} case "SignedContributionAndProof": obj = ðpb.SignedContributionAndProof{} + case "SingleAttestation": + obj = ðpb.SingleAttestation{} case "SyncAggregate": obj = ðpb.SyncAggregate{} case "SyncAggregatorSelectionData": From 1ae371a58ff194778515fbe401efa2b817fc3d79 Mon Sep 17 00:00:00 2001 From: terence Date: Wed, 4 Dec 2024 06:57:58 -0800 Subject: [PATCH 09/11] Fix typo Co-authored-by: Md Amaan <114795592+Redidacove@users.noreply.github.com> --- beacon-chain/core/electra/consolidations_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/core/electra/consolidations_test.go b/beacon-chain/core/electra/consolidations_test.go index e6bf68a754c3..0a565aedfc87 100644 --- a/beacon-chain/core/electra/consolidations_test.go +++ b/beacon-chain/core/electra/consolidations_test.go @@ -294,7 +294,7 @@ func TestProcessConsolidationRequests(t *testing.T) { SourcePubkey: []byte("val_0"), TargetPubkey: []byte("val_0"), }, - // Has pening partial withdrawal + // Has pending partial withdrawal { SourceAddress: append(bytesutil.PadTo(nil, 19), byte(0)), SourcePubkey: []byte("val_17"), From 66a3726bc0977be26cc57a0569768829116c8bd2 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Wed, 4 Dec 2024 10:03:02 -0500 Subject: [PATCH 10/11] Update UpgradeToElectra comments --- beacon-chain/core/electra/upgrade.go | 50 +++++++++++++--------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/beacon-chain/core/electra/upgrade.go b/beacon-chain/core/electra/upgrade.go index 5eaff157a7fe..1779a7cd2eea 100644 --- a/beacon-chain/core/electra/upgrade.go +++ b/beacon-chain/core/electra/upgrade.go @@ -16,36 +16,19 @@ import ( ) // UpgradeToElectra updates inputs a generic state to return the version Electra state. +// +// Spec code: // def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState: // // epoch = deneb.get_current_epoch(pre) -// latest_execution_payload_header = ExecutionPayloadHeader( -// parent_hash=pre.latest_execution_payload_header.parent_hash, -// fee_recipient=pre.latest_execution_payload_header.fee_recipient, -// state_root=pre.latest_execution_payload_header.state_root, -// receipts_root=pre.latest_execution_payload_header.receipts_root, -// logs_bloom=pre.latest_execution_payload_header.logs_bloom, -// prev_randao=pre.latest_execution_payload_header.prev_randao, -// block_number=pre.latest_execution_payload_header.block_number, -// gas_limit=pre.latest_execution_payload_header.gas_limit, -// gas_used=pre.latest_execution_payload_header.gas_used, -// timestamp=pre.latest_execution_payload_header.timestamp, -// extra_data=pre.latest_execution_payload_header.extra_data, -// base_fee_per_gas=pre.latest_execution_payload_header.base_fee_per_gas, -// block_hash=pre.latest_execution_payload_header.block_hash, -// transactions_root=pre.latest_execution_payload_header.transactions_root, -// withdrawals_root=pre.latest_execution_payload_header.withdrawals_root, -// blob_gas_used=pre.latest_execution_payload_header.blob_gas_used, -// excess_blob_gas=pre.latest_execution_payload_header.excess_blob_gas, -// deposit_requests_root=Root(), # [New in Electra:EIP6110] -// withdrawal_requests_root=Root(), # [New in Electra:EIP7002], -// consolidation_requests_root=Root(), # [New in Electra:EIP7251] -// ) +// latest_execution_payload_header = pre.latest_execution_payload_header // -// exit_epochs = [v.exit_epoch for v in pre.validators if v.exit_epoch != FAR_FUTURE_EPOCH] -// if not exit_epochs: -// exit_epochs = [get_current_epoch(pre)] -// earliest_exit_epoch = max(exit_epochs) + 1 +// earliest_exit_epoch = compute_activation_exit_epoch(get_current_epoch(pre)) +// for validator in pre.validators: +// if validator.exit_epoch != FAR_FUTURE_EPOCH: +// if validator.exit_epoch > earliest_exit_epoch: +// earliest_exit_epoch = validator.exit_epoch +// earliest_exit_epoch += Epoch(1) // // post = BeaconState( // # Versioning @@ -120,7 +103,20 @@ import ( // )) // // for index in pre_activation: -// queue_entire_balance_and_reset_validator(post, ValidatorIndex(index)) +// balance = post.balances[index] +// post.balances[index] = 0 +// validator = post.validators[index] +// validator.effective_balance = 0 +// validator.activation_eligibility_epoch = FAR_FUTURE_EPOCH +// # Use bls.G2_POINT_AT_INFINITY as a signature field placeholder +// # and GENESIS_SLOT to distinguish from a pending deposit request +// post.pending_deposits.append(PendingDeposit( +// pubkey=validator.pubkey, +// withdrawal_credentials=validator.withdrawal_credentials, +// amount=balance, +// signature=bls.G2_POINT_AT_INFINITY, +// slot=GENESIS_SLOT, +// )) // // # Ensure early adopters of compounding credentials go through the activation churn // for index, validator in enumerate(post.validators): From ba9ed0bf21959db310e6d5bd0b1be7e56a893790 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Wed, 4 Dec 2024 10:09:34 -0500 Subject: [PATCH 11/11] Add no lint dupword --- beacon-chain/core/electra/upgrade.go | 1 + 1 file changed, 1 insertion(+) diff --git a/beacon-chain/core/electra/upgrade.go b/beacon-chain/core/electra/upgrade.go index 1779a7cd2eea..acf6c6261bbb 100644 --- a/beacon-chain/core/electra/upgrade.go +++ b/beacon-chain/core/electra/upgrade.go @@ -17,6 +17,7 @@ import ( // UpgradeToElectra updates inputs a generic state to return the version Electra state. // +// nolint:dupword // Spec code: // def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState: //