diff --git a/ssv/spectest/tests/runner/consensus/post_finish.go b/ssv/spectest/tests/runner/consensus/post_finish.go index 99f19ab11..356224cd4 100644 --- a/ssv/spectest/tests/runner/consensus/post_finish.go +++ b/ssv/spectest/tests/runner/consensus/post_finish.go @@ -209,7 +209,7 @@ func PostFinish() tests.SpecTest { testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, version), }, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, version)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, version)), }, } } diff --git a/ssv/spectest/tests/runner/duties/proposer/normal_accepts_blinded_block.go b/ssv/spectest/tests/runner/duties/proposer/normal_accepts_blinded_block.go index f360d60ba..b3f9000af 100644 --- a/ssv/spectest/tests/runner/duties/proposer/normal_accepts_blinded_block.go +++ b/ssv/spectest/tests/runner/duties/proposer/normal_accepts_blinded_block.go @@ -40,7 +40,7 @@ func NormalProposerAcceptsBlindedBlock() tests.SpecTest { testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, version), }, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, version)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, version)), }, } } diff --git a/ssv/spectest/tests/runner/duties/proposer/propose_regular_decide_blinded.go b/ssv/spectest/tests/runner/duties/proposer/propose_regular_decide_blinded.go index d17f0fc31..8c0694c5f 100644 --- a/ssv/spectest/tests/runner/duties/proposer/propose_regular_decide_blinded.go +++ b/ssv/spectest/tests/runner/duties/proposer/propose_regular_decide_blinded.go @@ -43,7 +43,7 @@ func ProposeRegularBlockDecidedBlinded() tests.SpecTest { testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, spec.DataVersionDeneb), }, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, spec.DataVersionDeneb)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, spec.DataVersionDeneb)), }, } } diff --git a/ssv/spectest/tests/runner/full_happy_flow.go b/ssv/spectest/tests/runner/full_happy_flow.go index a3cc9857e..160bbe6d7 100644 --- a/ssv/spectest/tests/runner/full_happy_flow.go +++ b/ssv/spectest/tests/runner/full_happy_flow.go @@ -200,7 +200,7 @@ func FullHappyFlow() tests.SpecTest { testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, version), }, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, version)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, version)), }, } } diff --git a/ssv/spectest/tests/runner/postconsensus/post_quorum.go b/ssv/spectest/tests/runner/postconsensus/post_quorum.go index 5ea7475de..8a5589202 100644 --- a/ssv/spectest/tests/runner/postconsensus/post_quorum.go +++ b/ssv/spectest/tests/runner/postconsensus/post_quorum.go @@ -163,7 +163,7 @@ func PostQuorum() tests.SpecTest { PostDutyRunnerState: postQuorumBlindedProposerSC(version).ExpectedState, OutputMessages: []*types.SignedPartialSignatureMessage{}, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, version)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, version)), }, DontStartDuty: true, ExpectedError: expectedErr, diff --git a/ssv/spectest/tests/runner/postconsensus/quorum.go b/ssv/spectest/tests/runner/postconsensus/quorum.go index 479ac4439..14f4d9dd3 100644 --- a/ssv/spectest/tests/runner/postconsensus/quorum.go +++ b/ssv/spectest/tests/runner/postconsensus/quorum.go @@ -151,7 +151,7 @@ func Quorum() tests.SpecTest { PostDutyRunnerState: quorumBlindedProposerSC(version).ExpectedState, OutputMessages: []*types.SignedPartialSignatureMessage{}, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, version)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, version)), }, DontStartDuty: true, } diff --git a/ssv/spectest/tests/runner/postconsensus/quorum_10_operators.go b/ssv/spectest/tests/runner/postconsensus/quorum_10_operators.go index c0697323b..c918a5b8a 100644 --- a/ssv/spectest/tests/runner/postconsensus/quorum_10_operators.go +++ b/ssv/spectest/tests/runner/postconsensus/quorum_10_operators.go @@ -109,7 +109,7 @@ func Quorum10Operators() tests.SpecTest { PostDutyRunnerStateRoot: "d0498893b8a9386af88df849f3d88bcff88c495c4705ab74fb4560e16abde3fb", OutputMessages: []*types.SignedPartialSignatureMessage{}, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, spec.DataVersionDeneb)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, spec.DataVersionDeneb)), }, DontStartDuty: true, }, diff --git a/ssv/spectest/tests/runner/postconsensus/quorum_13_operators.go b/ssv/spectest/tests/runner/postconsensus/quorum_13_operators.go index 76cbd17b5..91ef336a9 100644 --- a/ssv/spectest/tests/runner/postconsensus/quorum_13_operators.go +++ b/ssv/spectest/tests/runner/postconsensus/quorum_13_operators.go @@ -117,7 +117,7 @@ func Quorum13Operators() tests.SpecTest { PostDutyRunnerStateRoot: "404287c64ae601ac20744783becd0081ff25da8b58592daac39365a8bbdb5e4a", OutputMessages: []*types.SignedPartialSignatureMessage{}, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, spec.DataVersionDeneb)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, spec.DataVersionDeneb)), }, DontStartDuty: true, }, diff --git a/ssv/spectest/tests/runner/postconsensus/quorum_7_operators.go b/ssv/spectest/tests/runner/postconsensus/quorum_7_operators.go index 99dd7b1cf..8940281d2 100644 --- a/ssv/spectest/tests/runner/postconsensus/quorum_7_operators.go +++ b/ssv/spectest/tests/runner/postconsensus/quorum_7_operators.go @@ -163,7 +163,7 @@ func Quorum7Operators() tests.SpecTest { PostDutyRunnerState: quorum7OperatorsBlindedProposerSC(version).ExpectedState, OutputMessages: []*types.SignedPartialSignatureMessage{}, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, version)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, version)), }, DontStartDuty: true, } diff --git a/ssv/spectest/tests/runner/pre_consensus_justifications/happy_flow.go b/ssv/spectest/tests/runner/pre_consensus_justifications/happy_flow.go index 8a7421700..0bcda41b0 100644 --- a/ssv/spectest/tests/runner/pre_consensus_justifications/happy_flow.go +++ b/ssv/spectest/tests/runner/pre_consensus_justifications/happy_flow.go @@ -226,7 +226,7 @@ func HappyFlow() tests.SpecTest { testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, spec.DataVersionDeneb), }, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, spec.DataVersionDeneb)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, spec.DataVersionDeneb)), }, }, { @@ -248,7 +248,7 @@ func HappyFlow() tests.SpecTest { testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, spec.DataVersionDeneb), }, BeaconBroadcastedRoots: []string{ - testingutils.GetSSZRootNoError(testingutils.TestingSignedBlindedBeaconBlockV(ks, spec.DataVersionDeneb)), + testingutils.GetSSZRootNoError(testingutils.TestingSignedBeaconBlockV(ks, spec.DataVersionDeneb)), }, }, { diff --git a/types/testingutils/beacon_node_versioned.go b/types/testingutils/beacon_node_versioned.go index 093366d02..6a9f3551d 100644 --- a/types/testingutils/beacon_node_versioned.go +++ b/types/testingutils/beacon_node_versioned.go @@ -169,7 +169,7 @@ var TestingSignedBeaconBlockV = func(ks *TestKeySet, version spec.DataVersion) s return &apiv1deneb.SignedBlockContents{ SignedBlock: &deneb.SignedBeaconBlock{ Message: vBlk.Deneb.Block, - Signature: signBeaconObject(vBlk.Deneb.Block, types.DomainProposer, ks), + Signature: signBeaconObject(vBlk.Deneb, types.DomainProposer, ks), }, KZGProofs: vBlk.Deneb.KZGProofs, Blobs: vBlk.Deneb.Blobs, @@ -179,34 +179,6 @@ var TestingSignedBeaconBlockV = func(ks *TestKeySet, version spec.DataVersion) s } } -var TestingSignedBlindedBeaconBlockV = func(ks *TestKeySet, version spec.DataVersion) ssz.HashRoot { - vBlk := TestingBeaconBlockV(version) - - switch version { - case spec.DataVersionCapella: - if vBlk.Capella == nil { - panic("empty block") - } - return &capella.SignedBeaconBlock{ - Message: vBlk.Capella, - Signature: signBeaconObject(vBlk.Capella, types.DomainProposer, ks), - } - case spec.DataVersionDeneb: - if vBlk.Deneb == nil { - panic("empty block contents") - } - if vBlk.Deneb.Block == nil { - panic("empty block") - } - return &deneb.SignedBeaconBlock{ - Message: vBlk.Deneb.Block, - Signature: signBeaconObject(vBlk.Deneb.Block, types.DomainProposer, ks), - } - default: - panic("unsupported version") - } -} - var TestingDutyEpochV = func(version spec.DataVersion) phase0.Epoch { switch version { case spec.DataVersionCapella: