Add light client types to spectest (#15097)

* add light client types to spectest

* changelog entry

* remove lightclientSnapshot from tests
This commit is contained in:
Bastin
2025-03-26 18:44:30 +01:00
committed by GitHub
parent e82f9ccca3
commit a3e61275a3
6 changed files with 28 additions and 65 deletions

View File

@@ -0,0 +1,3 @@
### Added
- Add light client ssz types to the spec test

View File

@@ -71,8 +71,7 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "IndexedAttestation":
obj = &ethpb.IndexedAttestation{}
case "LightClientHeader":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientHeaderAltair{}
case "PendingAttestation":
obj = &ethpb.PendingAttestation{}
case "ProposerSlashing":
@@ -106,20 +105,13 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "SyncCommittee":
obj = &ethpb.SyncCommittee{}
case "LightClientOptimisticUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientOptimisticUpdateAltair{}
case "LightClientFinalityUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientFinalityUpdateAltair{}
case "LightClientBootstrap":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientSnapshot":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientBootstrapAltair{}
case "LightClientUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientUpdateAltair{}
default:
return nil, errors.New("type not found")
}

View File

@@ -76,8 +76,7 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "IndexedAttestation":
obj = &ethpb.IndexedAttestation{}
case "LightClientHeader":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientHeaderAltair{}
case "PendingAttestation":
obj = &ethpb.PendingAttestation{}
case "ProposerSlashing":
@@ -111,20 +110,13 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "SyncCommittee":
obj = &ethpb.SyncCommittee{}
case "LightClientOptimisticUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientOptimisticUpdateAltair{}
case "LightClientFinalityUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientFinalityUpdateAltair{}
case "LightClientBootstrap":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientSnapshot":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientBootstrapAltair{}
case "LightClientUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientUpdateAltair{}
case "PowBlock":
obj = &ethpb.PowBlock{}
default:

View File

@@ -76,8 +76,7 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "IndexedAttestation":
obj = &ethpb.IndexedAttestation{}
case "LightClientHeader":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientHeaderCapella{}
case "PendingAttestation":
obj = &ethpb.PendingAttestation{}
case "ProposerSlashing":
@@ -113,20 +112,13 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "HistoricalSummary":
obj = &ethpb.HistoricalSummary{}
case "LightClientOptimisticUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientOptimisticUpdateCapella{}
case "LightClientFinalityUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientFinalityUpdateCapella{}
case "LightClientBootstrap":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientSnapshot":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientBootstrapCapella{}
case "LightClientUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientUpdateCapella{}
case "PowBlock":
obj = &ethpb.PowBlock{}
case "Withdrawal":

View File

@@ -110,23 +110,15 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "SyncCommittee":
obj = &ethpb.SyncCommittee{}
case "LightClientOptimisticUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientOptimisticUpdateDeneb{}
case "LightClientFinalityUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientFinalityUpdateDeneb{}
case "LightClientBootstrap":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientSnapshot":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientBootstrapDeneb{}
case "LightClientUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientUpdateDeneb{}
case "LightClientHeader":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientHeaderDeneb{}
case "BlobIdentifier":
obj = &ethpb.BlobIdentifier{}
case "BlobSidecar":

View File

@@ -112,23 +112,15 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "SyncCommittee":
obj = &ethpb.SyncCommittee{}
case "LightClientOptimisticUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientOptimisticUpdateDeneb{}
case "LightClientFinalityUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientFinalityUpdateElectra{}
case "LightClientBootstrap":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientSnapshot":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientBootstrapElectra{}
case "LightClientUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientUpdateElectra{}
case "LightClientHeader":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
obj = &ethpb.LightClientHeaderDeneb{}
case "BlobIdentifier":
obj = &ethpb.BlobIdentifier{}
case "BlobSidecar":