diff --git a/changelog/bastin_lc-fulu-spectest.md b/changelog/bastin_lc-fulu-spectest.md new file mode 100644 index 0000000000..86ffc1a873 --- /dev/null +++ b/changelog/bastin_lc-fulu-spectest.md @@ -0,0 +1,3 @@ +### Ignored + +- Fulu spec tests coverage for light client tests. \ No newline at end of file diff --git a/testing/spectest/exclusions.txt b/testing/spectest/exclusions.txt index 934961a831..28e6778240 100644 --- a/testing/spectest/exclusions.txt +++ b/testing/spectest/exclusions.txt @@ -9,8 +9,6 @@ tests/minimal/bellatrix/light_client/data_collection tests/minimal/capella/light_client/data_collection tests/minimal/deneb/light_client/data_collection tests/minimal/electra/light_client/data_collection -tests/minimal/fulu/light_client/single_merkle_proof -tests/mainnet/fulu/light_client/single_merkle_proof # SSZ Generic tests/general/phase0/ssz_generic/basic_vector diff --git a/testing/spectest/mainnet/BUILD.bazel b/testing/spectest/mainnet/BUILD.bazel index 4c57835e76..5582a8dfad 100644 --- a/testing/spectest/mainnet/BUILD.bazel +++ b/testing/spectest/mainnet/BUILD.bazel @@ -179,6 +179,7 @@ go_test( "fulu__fork__upgrade_to_fulu_test.go", "fulu__fork_transition__transition_test.go", "fulu__forkchoice__forkchoice_test.go", + "fulu__light_client__single_merkle_proof_test.go", "fulu__merkle_proof__merkle_proof_test.go", "fulu__networking__custody_groups_test.go", "fulu__operations__attestation_test.go", diff --git a/testing/spectest/mainnet/fulu__light_client__single_merkle_proof_test.go b/testing/spectest/mainnet/fulu__light_client__single_merkle_proof_test.go new file mode 100644 index 0000000000..e073c02b42 --- /dev/null +++ b/testing/spectest/mainnet/fulu__light_client__single_merkle_proof_test.go @@ -0,0 +1,12 @@ +package mainnet + +import ( + "testing" + + "github.com/OffchainLabs/prysm/v6/runtime/version" + "github.com/OffchainLabs/prysm/v6/testing/spectest/shared/common/light_client" +) + +func TestMainnet_Fulu_LightClient_SingleMerkleProof(t *testing.T) { + light_client.RunLightClientSingleMerkleProofTests(t, "mainnet", version.Fulu) +} diff --git a/testing/spectest/minimal/BUILD.bazel b/testing/spectest/minimal/BUILD.bazel index 27bb04f406..4eace54866 100644 --- a/testing/spectest/minimal/BUILD.bazel +++ b/testing/spectest/minimal/BUILD.bazel @@ -185,6 +185,7 @@ go_test( "fulu__fork__upgrade_to_fulu_test.go", "fulu__fork_transition__transition_test.go", "fulu__forkchoice__forkchoice_test.go", + "fulu__light_client__single_merkle_proof_test.go", "fulu__merkle_proof__merkle_proof_test.go", "fulu__networking__custody_columns_test.go", "fulu__operations__attestation_test.go", diff --git a/testing/spectest/minimal/fulu__light_client__single_merkle_proof_test.go b/testing/spectest/minimal/fulu__light_client__single_merkle_proof_test.go new file mode 100644 index 0000000000..819166b3e1 --- /dev/null +++ b/testing/spectest/minimal/fulu__light_client__single_merkle_proof_test.go @@ -0,0 +1,12 @@ +package minimal + +import ( + "testing" + + "github.com/OffchainLabs/prysm/v6/runtime/version" + "github.com/OffchainLabs/prysm/v6/testing/spectest/shared/common/light_client" +) + +func TestMinimal_Fulu_LightClient_SingleMerkleProof(t *testing.T) { + light_client.RunLightClientSingleMerkleProofTests(t, "minimal", version.Fulu) +} diff --git a/testing/spectest/shared/common/light_client/single_merkle_proof.go b/testing/spectest/shared/common/light_client/single_merkle_proof.go index 9c1cde09a9..acec35b3a4 100644 --- a/testing/spectest/shared/common/light_client/single_merkle_proof.go +++ b/testing/spectest/shared/common/light_client/single_merkle_proof.go @@ -85,6 +85,11 @@ func runLightClientSingleMerkleProofTestBeaconState(t *testing.T, testFolderPath require.NoError(t, beaconStateBase.UnmarshalSSZ(beaconStateSSZ), "Failed to unmarshal") beaconState, err = state_native.InitializeFromProtoElectra(beaconStateBase) require.NoError(t, err) + case version.Fulu: + beaconStateBase := ðpb.BeaconStateFulu{} + require.NoError(t, beaconStateBase.UnmarshalSSZ(beaconStateSSZ), "Failed to unmarshal") + beaconState, err = state_native.InitializeFromProtoFulu(beaconStateBase) + require.NoError(t, err) default: t.Fatalf("Unsupported version: %d", v) } @@ -157,7 +162,7 @@ func runLightClientSingleMerkleProofTestBeaconBlockBody(t *testing.T, testFolder require.NoError(t, err) executionPayloadRoot, err = beaconBlockBody.ExecutionPayload.HashTreeRoot() require.NoError(t, err) - case version.Electra: + case version.Electra, version.Fulu: beaconBlockBody := ðpb.BeaconBlockBodyElectra{} require.NoError(t, beaconBlockBody.UnmarshalSSZ(beaconBlockBodySSZ), "Failed to unmarshal") beaconBlockBodyRoot, err = beaconBlockBody.HashTreeRoot()