mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
Add light client types to spectest (#15097)
* add light client types to spectest * changelog entry * remove lightclientSnapshot from tests
This commit is contained in:
3
changelog/bastin_add-lc-types-to-spectest.md
Normal file
3
changelog/bastin_add-lc-types-to-spectest.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### Added
|
||||
|
||||
- Add light client ssz types to the spec test
|
||||
@@ -71,8 +71,7 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "IndexedAttestation":
|
||||
obj = ðpb.IndexedAttestation{}
|
||||
case "LightClientHeader":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientHeaderAltair{}
|
||||
case "PendingAttestation":
|
||||
obj = ðpb.PendingAttestation{}
|
||||
case "ProposerSlashing":
|
||||
@@ -106,20 +105,13 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "SyncCommittee":
|
||||
obj = ðpb.SyncCommittee{}
|
||||
case "LightClientOptimisticUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientOptimisticUpdateAltair{}
|
||||
case "LightClientFinalityUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.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 = ðpb.LightClientBootstrapAltair{}
|
||||
case "LightClientUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientUpdateAltair{}
|
||||
default:
|
||||
return nil, errors.New("type not found")
|
||||
}
|
||||
|
||||
@@ -76,8 +76,7 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "IndexedAttestation":
|
||||
obj = ðpb.IndexedAttestation{}
|
||||
case "LightClientHeader":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientHeaderAltair{}
|
||||
case "PendingAttestation":
|
||||
obj = ðpb.PendingAttestation{}
|
||||
case "ProposerSlashing":
|
||||
@@ -111,20 +110,13 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "SyncCommittee":
|
||||
obj = ðpb.SyncCommittee{}
|
||||
case "LightClientOptimisticUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientOptimisticUpdateAltair{}
|
||||
case "LightClientFinalityUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.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 = ðpb.LightClientBootstrapAltair{}
|
||||
case "LightClientUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientUpdateAltair{}
|
||||
case "PowBlock":
|
||||
obj = ðpb.PowBlock{}
|
||||
default:
|
||||
|
||||
@@ -76,8 +76,7 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "IndexedAttestation":
|
||||
obj = ðpb.IndexedAttestation{}
|
||||
case "LightClientHeader":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientHeaderCapella{}
|
||||
case "PendingAttestation":
|
||||
obj = ðpb.PendingAttestation{}
|
||||
case "ProposerSlashing":
|
||||
@@ -113,20 +112,13 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "HistoricalSummary":
|
||||
obj = ðpb.HistoricalSummary{}
|
||||
case "LightClientOptimisticUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientOptimisticUpdateCapella{}
|
||||
case "LightClientFinalityUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.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 = ðpb.LightClientBootstrapCapella{}
|
||||
case "LightClientUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientUpdateCapella{}
|
||||
case "PowBlock":
|
||||
obj = ðpb.PowBlock{}
|
||||
case "Withdrawal":
|
||||
|
||||
@@ -110,23 +110,15 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "SyncCommittee":
|
||||
obj = ðpb.SyncCommittee{}
|
||||
case "LightClientOptimisticUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientOptimisticUpdateDeneb{}
|
||||
case "LightClientFinalityUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.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 = ðpb.LightClientBootstrapDeneb{}
|
||||
case "LightClientUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientUpdateDeneb{}
|
||||
case "LightClientHeader":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientHeaderDeneb{}
|
||||
case "BlobIdentifier":
|
||||
obj = ðpb.BlobIdentifier{}
|
||||
case "BlobSidecar":
|
||||
|
||||
@@ -112,23 +112,15 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "SyncCommittee":
|
||||
obj = ðpb.SyncCommittee{}
|
||||
case "LightClientOptimisticUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientOptimisticUpdateDeneb{}
|
||||
case "LightClientFinalityUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.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 = ðpb.LightClientBootstrapElectra{}
|
||||
case "LightClientUpdate":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientUpdateElectra{}
|
||||
case "LightClientHeader":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
obj = ðpb.LightClientHeaderDeneb{}
|
||||
case "BlobIdentifier":
|
||||
obj = ðpb.BlobIdentifier{}
|
||||
case "BlobSidecar":
|
||||
|
||||
Reference in New Issue
Block a user