update spectests to 1.4.0-beta.5 (#13318)

* update spectests to 1.4.0-beta.5

* add spec config
This commit is contained in:
Potuz
2023-12-12 15:27:48 -03:00
committed by GitHub
parent 5e56b5fdd7
commit ce7452c97a
6 changed files with 38 additions and 13 deletions

View File

@@ -151,4 +151,14 @@ func (bb *Builder) Check(t testing.TB, c *Check) {
got := fmt.Sprintf("%#x", bb.service.ProposerBoost())
require.DeepEqual(t, want, got)
}
if c.GetProposerHead != nil {
want := fmt.Sprintf("%#x", common.FromHex(*c.GetProposerHead))
got := fmt.Sprintf("%#x", bb.service.GetProposerHead())
require.DeepEqual(t, want, got)
}
/* TODO: We need to mock the entire proposer system to be able to test this.
if c.ShouldOverrideFCU != nil {
require.DeepEqual(t, c.ShouldOverrideFCU.Result, bb.service.ShouldOverrideFCU())
}
*/
}

View File

@@ -14,13 +14,15 @@ type Step struct {
}
type Check struct {
Time *int `json:"time"`
GenesisTime int `json:"genesis_time"`
ProposerBoostRoot *string `json:"proposer_boost_root"`
Head *SlotRoot `json:"head"`
JustifiedCheckPoint *EpochRoot `json:"justified_checkpoint"`
BestJustifiedCheckPoint *EpochRoot `json:"best_justified_checkpoint"`
FinalizedCheckPoint *EpochRoot `json:"finalized_checkpoint"`
Time *int `json:"time"`
GenesisTime int `json:"genesis_time"`
ProposerBoostRoot *string `json:"proposer_boost_root"`
Head *SlotRoot `json:"head"`
JustifiedCheckPoint *EpochRoot `json:"justified_checkpoint"`
BestJustifiedCheckPoint *EpochRoot `json:"best_justified_checkpoint"`
FinalizedCheckPoint *EpochRoot `json:"finalized_checkpoint"`
GetProposerHead *string `json:"get_proposer_head"`
ShouldOverrideFCU *ShouldOverride `json:"should_override_forkchoice_update"`
}
type SlotRoot struct {
@@ -38,3 +40,8 @@ type MockEngineResp struct {
LatestValidHash *string `json:"latest_valid_hash"`
ValidationError *string `json:"validation_error"`
}
type ShouldOverride struct {
ValidatorConnected bool `json:"validator_is_connected"`
Result bool `json:"result"`
}

View File

@@ -130,7 +130,7 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
case "BlobIdentifier":
obj = &ethpb.BlobIdentifier{}
case "BlobSidecar":
obj = &ethpb.DeprecatedBlobSidecar{}
obj = &ethpb.BlobSidecar{}
case "SignedBlobSidecar":
obj = &ethpb.SignedBlobSidecar{}
case "PowBlock":