diff --git a/WORKSPACE b/WORKSPACE index d853e226be4a..0644db9ec521 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.2" +consensus_spec_version = "v1.5.0-alpha.3" bls_test_version = "v0.1.1" @@ -243,7 +243,7 @@ filegroup( visibility = ["//visibility:public"], ) """, - integrity = "sha256-NNXBa7SZ2sFb68HPNahgu1p0yDBpjuKJuLfRCl7vvoQ=", + integrity = "sha256-+byv+GUOQytex5GgtjBGVoNDseJZbiBdAjEtlgCbjEo=", 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-7BnlBvGWU92iAB100cMaAXVQhRrqpMQbavgrI+/paCw=", + integrity = "sha256-JJUy/jT1h3kGQkinTuzL7gMOA1+qgmPgJXVrYuH63Cg=", 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-VCHhcNt+fynf/sHK11qbRBAy608u9T1qAafvAGfxQhA=", + integrity = "sha256-T2VM4Qd0SwgGnTjWxjOX297DqEsovO9Ueij1UEJy48Y=", 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-a2aCNFyFkYLtf6QSwGOHdx7xXHjA2NNT8x8ZuxB0aes=", + integrity = "sha256-OP9BCBcQ7i+93bwj7ktY8pZ5uWsGjgTe4XTp7BDhX+I=", 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/rpc/eth/config/handlers_test.go b/beacon-chain/rpc/eth/config/handlers_test.go index 18a5159da585..1863f86cc1f7 100644 --- a/beacon-chain/rpc/eth/config/handlers_test.go +++ b/beacon-chain/rpc/eth/config/handlers_test.go @@ -144,7 +144,7 @@ func TestGetSpec(t *testing.T) { config.PendingConsolidationsLimit = 84 config.MaxPartialWithdrawalsPerPayload = 85 config.FullExitRequestAmount = 86 - config.MaxConsolidations = 87 + config.MaxConsolidationsRequestsPerPayload = 87 config.MaxAttesterSlashingsElectra = 88 config.MaxAttestationsElectra = 89 config.MaxWithdrawalRequestsPerPayload = 90 @@ -514,7 +514,7 @@ func TestGetSpec(t *testing.T) { assert.Equal(t, "85", v) case "FULL_EXIT_REQUEST_AMOUNT": assert.Equal(t, "86", v) - case "MAX_CONSOLIDATIONS": + case "MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD": assert.Equal(t, "87", v) case "DOMAIN_CONSOLIDATION": assert.Equal(t, "0x31313030", v) diff --git a/beacon-chain/state/state-native/getters_withdrawal_test.go b/beacon-chain/state/state-native/getters_withdrawal_test.go index bfaa841bc585..f296f4e6e53d 100644 --- a/beacon-chain/state/state-native/getters_withdrawal_test.go +++ b/beacon-chain/state/state-native/getters_withdrawal_test.go @@ -336,7 +336,7 @@ func TestExpectedWithdrawals(t *testing.T) { t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") // Load a serialized Electra state from disk. // This spectest has a fully hydrated beacon state with partial pending withdrawals. - serializedBytes, err := util.BazelFileBytes("tests/mainnet/electra/operations/execution_layer_withdrawal_request/pyspec_tests/pending_withdrawals_consume_all_excess_balance/pre.ssz_snappy") + serializedBytes, err := util.BazelFileBytes("tests/mainnet/electra/operations/withdrawal_request/pyspec_tests/pending_withdrawals_consume_all_excess_balance/pre.ssz_snappy") require.NoError(t, err) serializedSSZ, err := snappy.Decode(nil /* dst */, serializedBytes) require.NoError(t, err) diff --git a/config/params/config.go b/config/params/config.go index 816089cbcbcf..5a33bc1a631d 100644 --- a/config/params/config.go +++ b/config/params/config.go @@ -246,7 +246,7 @@ type BeaconChainConfig struct { PendingBalanceDepositLimit uint64 `yaml:"PENDING_BALANCE_DEPOSITS_LIMIT" spec:"true"` // PendingBalanceDepositLimit is the maximum number of pending balance deposits allowed in the beacon state. PendingPartialWithdrawalsLimit uint64 `yaml:"PENDING_PARTIAL_WITHDRAWALS_LIMIT" spec:"true"` // PendingPartialWithdrawalsLimit is the maximum number of pending partial withdrawals allowed in the beacon state. PendingConsolidationsLimit uint64 `yaml:"PENDING_CONSOLIDATIONS_LIMIT" spec:"true"` // PendingConsolidationsLimit is the maximum number of pending validator consolidations allowed in the beacon state. - MaxConsolidations uint64 `yaml:"MAX_CONSOLIDATIONS" spec:"true"` // MaxConsolidations is the maximum number of consolidations in a block. + MaxConsolidationsRequestsPerPayload uint64 `yaml:"MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD" spec:"true"` // MaxConsolidationsRequestsPerPayload is the maximum number of consolidations in a block. MaxPendingPartialsPerWithdrawalsSweep uint64 `yaml:"MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP" spec:"true"` // MaxPendingPartialsPerWithdrawalsSweep is the maximum number of pending partial withdrawals to process per payload. FullExitRequestAmount uint64 `yaml:"FULL_EXIT_REQUEST_AMOUNT" spec:"true"` // FullExitRequestAmount is the amount of Gwei required to request a full exit. MaxWithdrawalRequestsPerPayload uint64 `yaml:"MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD" spec:"true"` // MaxWithdrawalRequestsPerPayload is the maximum number of execution layer withdrawal requests in each payload. diff --git a/config/params/loader_test.go b/config/params/loader_test.go index 09b9491f2b17..3045bb4a5e78 100644 --- a/config/params/loader_test.go +++ b/config/params/loader_test.go @@ -25,6 +25,7 @@ import ( // IMPORTANT: Use one field per line and sort these alphabetically to reduce conflicts. var placeholderFields = []string{ "BYTES_PER_LOGS_BLOOM", // Compile time constant on ExecutionPayload.logs_bloom. + "CUSTODY_REQUIREMENT", "EIP6110_FORK_EPOCH", "EIP6110_FORK_VERSION", "EIP7002_FORK_EPOCH", @@ -40,6 +41,8 @@ var placeholderFields = []string{ "MAX_EXTRA_DATA_BYTES", // Compile time constant on ExecutionPayload.extra_data. "MAX_TRANSACTIONS_PER_PAYLOAD", // Compile time constant on ExecutionPayload.transactions. "REORG_HEAD_WEIGHT_THRESHOLD", + "SAMPLES_PER_SLOT", + "TARGET_NUMBER_OF_PEERS", "UPDATE_TIMEOUT", "WHISK_EPOCHS_PER_SHUFFLING_PHASE", "WHISK_FORK_EPOCH", diff --git a/config/params/mainnet_config.go b/config/params/mainnet_config.go index bfb8af28ef36..3cd9fc47a8d0 100644 --- a/config/params/mainnet_config.go +++ b/config/params/mainnet_config.go @@ -286,7 +286,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{ PendingPartialWithdrawalsLimit: 134_217_728, PendingConsolidationsLimit: 262_144, MinActivationBalance: 32_000_000_000, - MaxConsolidations: 1, + MaxConsolidationsRequestsPerPayload: 1, MaxPendingPartialsPerWithdrawalsSweep: 8, FullExitRequestAmount: 0, MaxWithdrawalRequestsPerPayload: 16, diff --git a/proto/prysm/v1alpha1/attestation.pb.go b/proto/prysm/v1alpha1/attestation.pb.go index 1e5694b84c61..6b1f970fb1ef 100755 --- a/proto/prysm/v1alpha1/attestation.pb.go +++ b/proto/prysm/v1alpha1/attestation.pb.go @@ -94,8 +94,8 @@ type AttestationElectra struct { AggregationBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitlist" ssz-max:"131072"` Data *AttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - CommitteeBits github_com_prysmaticlabs_go_bitfield.Bitvector64 `protobuf:"bytes,4,opt,name=committee_bits,json=committeeBits,proto3" json:"committee_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector64" ssz-size:"8"` Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` + CommitteeBits github_com_prysmaticlabs_go_bitfield.Bitvector64 `protobuf:"bytes,4,opt,name=committee_bits,json=committeeBits,proto3" json:"committee_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector64" ssz-size:"8"` } func (x *AttestationElectra) Reset() { @@ -144,18 +144,18 @@ func (x *AttestationElectra) GetData() *AttestationData { return nil } -func (x *AttestationElectra) GetCommitteeBits() github_com_prysmaticlabs_go_bitfield.Bitvector64 { +func (x *AttestationElectra) GetSignature() []byte { if x != nil { - return x.CommitteeBits + return x.Signature } - return github_com_prysmaticlabs_go_bitfield.Bitvector64(nil) + return nil } -func (x *AttestationElectra) GetSignature() []byte { +func (x *AttestationElectra) GetCommitteeBits() github_com_prysmaticlabs_go_bitfield.Bitvector64 { if x != nil { - return x.Signature + return x.CommitteeBits } - return nil + return github_com_prysmaticlabs_go_bitfield.Bitvector64(nil) } type AggregateAttestationAndProof struct { @@ -561,16 +561,16 @@ var file_proto_prysm_v1alpha1_attestation_proto_rawDesc = []byte{ 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x60, 0x0a, - 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x39, 0x82, 0xb5, 0x18, 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, 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, 0x12, - 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 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, + 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, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x60, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x39, 0x82, 0xb5, 0x18, + 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, 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, diff --git a/proto/prysm/v1alpha1/attestation.proto b/proto/prysm/v1alpha1/attestation.proto index 630d05f90cd7..a41a3e685fcc 100644 --- a/proto/prysm/v1alpha1/attestation.proto +++ b/proto/prysm/v1alpha1/attestation.proto @@ -42,11 +42,11 @@ message AttestationElectra { AttestationData data = 2; - // TODO: doc - bytes committee_bits = 4 [(ethereum.eth.ext.ssz_size) = "committee_bits.size", (ethereum.eth.ext.cast_type) = "committee_bits.type"]; - // 96 byte BLS aggregate signature. bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"]; + + // Represents the committee which aggregated attestation belong. + bytes committee_bits = 4 [(ethereum.eth.ext.ssz_size) = "committee_bits.size", (ethereum.eth.ext.cast_type) = "committee_bits.type"]; } message AggregateAttestationAndProof { diff --git a/testing/spectest/shared/electra/operations/withdrawal_request.go b/testing/spectest/shared/electra/operations/withdrawal_request.go index 5278dd97c00d..2f5451a74972 100644 --- a/testing/spectest/shared/electra/operations/withdrawal_request.go +++ b/testing/spectest/shared/electra/operations/withdrawal_request.go @@ -18,14 +18,14 @@ import ( func RunWithdrawalRequestTest(t *testing.T, config string) { require.NoError(t, utils.SetConfig(t, config)) - testFolders, testsFolderPath := utils.TestFolders(t, config, "electra", "operations/execution_layer_withdrawal_request/pyspec_tests") + testFolders, testsFolderPath := utils.TestFolders(t, config, "electra", "operations/withdrawal_request/pyspec_tests") if len(testFolders) == 0 { - t.Fatalf("No test folders found for %s/%s/%s", config, "electra", "operations/execution_layer_withdrawal_request/pyspec_tests") + t.Fatalf("No test folders found for %s/%s/%s", config, "electra", "operations/withdrawal_request/pyspec_tests") } for _, folder := range testFolders { t.Run(folder.Name(), func(t *testing.T) { folderPath := path.Join(testsFolderPath, folder.Name()) - withdrawalRequestFile, err := util.BazelFileBytes(folderPath, "execution_layer_withdrawal_request.ssz_snappy") + withdrawalRequestFile, err := util.BazelFileBytes(folderPath, "withdrawal_request.ssz_snappy") require.NoError(t, err) withdrawalRequestSSZ, err := snappy.Decode(nil /* dst */, withdrawalRequestFile) require.NoError(t, err, "Failed to decompress") diff --git a/testing/spectest/shared/electra/ssz_static/ssz_static.go b/testing/spectest/shared/electra/ssz_static/ssz_static.go index d64e5d9968a8..86522ce4cdbf 100644 --- a/testing/spectest/shared/electra/ssz_static/ssz_static.go +++ b/testing/spectest/shared/electra/ssz_static/ssz_static.go @@ -37,10 +37,8 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i var obj interface{} switch folderName { case "ExecutionPayload": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") obj = &enginev1.ExecutionPayloadElectra{} case "ExecutionPayloadHeader": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") obj = &enginev1.ExecutionPayloadHeaderElectra{} case "Attestation": obj = ðpb.AttestationElectra{} @@ -51,15 +49,12 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i case "AggregateAndProof": obj = ðpb.AggregateAttestationAndProofElectra{} case "BeaconBlock": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") obj = ðpb.BeaconBlockElectra{} case "BeaconBlockBody": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") obj = ðpb.BeaconBlockBodyElectra{} case "BeaconBlockHeader": obj = ðpb.BeaconBlockHeader{} case "BeaconState": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") obj = ðpb.BeaconStateElectra{} case "Checkpoint": obj = ðpb.Checkpoint{} @@ -89,7 +84,6 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i case "SignedAggregateAndProof": obj = ðpb.SignedAggregateAttestationAndProofElectra{} case "SignedBeaconBlock": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") obj = ðpb.SignedBeaconBlockElectra{} case "SignedBeaconBlockHeader": obj = ðpb.SignedBeaconBlockHeader{} @@ -151,19 +145,11 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i obj = ðpb.PendingBalanceDeposit{} case "PendingPartialWithdrawal": obj = ðpb.PendingPartialWithdrawal{} - case "Consolidation": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") - // TODO: Remove this case when the spectests are updated to v1.5.0-alpha.3 - return nil, nil - case "SignedConsolidation": - t.Skip("Failing until spectests are updated to v1.5.0-alpha.3") - // TODO: Remove this case when the spectests are updated to v1.5.0-alpha.3 - return nil, nil case "PendingConsolidation": obj = ðpb.PendingConsolidation{} - case "ExecutionLayerWithdrawalRequest": // TODO: update in spectest update + case "WithdrawalRequest": obj = &enginev1.WithdrawalRequest{} - case "DepositReceipt": // TODO: update in spectest update + case "DepositRequest": obj = &enginev1.DepositRequest{} case "ConsolidationRequest": obj = &enginev1.ConsolidationRequest{}