Skip to content

Commit

Permalink
State comparison - SSV runner/consensus (ssvlabs#253)
Browse files Browse the repository at this point in the history
* implementation

* tmp

* remove unused

* use latest go-eth2-client version

* use latest go-eth2-client version

* return block data as versioned & hashroot

* improve log

* upgrade go-eth2-client v0.15.8

* proposerCalls interface change

* versioned block spec tests

* generate test json

* include all versioned block spec tests

* remove unused fields

* use block version instead of hardcoded

* keep only bellatrix block version

* mention github issue

* SSV comparable state ssvlabs#215

* use proper package names

* Create beacon_node_versioned.go

* Create ssv_msgs_versioned.go

* versioned state comparison example

* TestProposerWithJustificationsConsensusData versioned example

* versioned TestingProposerDutyNextEpoch example

* versioned PostConsensusWrongProposerMsg example

* versioned PostConsensusWrongSigProposerMsg example

* versioned PostConsensusProposerTooManyRootsMsg example

* versioned PostConsensusSigProposerWrongBeaconSignerMsg example

* return testing blocks as versioned

* use TestingProposerDuty versioned slot

* add versioned PostConsensusProposerTooFewRootsMsg

* versioned PostConsensusProposerTooFewRootsMsg example

* versioned runner decided msgs

* randao versioned

* versioned PreConsensusRandaoMsg SSVDecidingMsgs example

* versioned PreConsensusRandaoNextEpochMsg example

* versioned PreConsensusRandaoDifferentEpochMsg example

* versioned PreConsensusRandaoTooManyRootsMsg example

* versioned PreConsensusRandaoTooFewRootsMsg example

* versioned PreConsensusRandaoWrongBeaconSigMsg example

* versioned PreConsensusRandaoDifferentSignerMsg example

* go fmt ./...

* use versioned PreConsensusRandaoMsg

* use versioned TestingProposerDuty

* delete redundant tests (#1)

* remove (versioned) name

* remove unused

* versioned GetBeaconBlock/GetBlindedBeaconBlock

* fix merge conflict

* use TestingDutySlotBellatrixNextEpoch

* add versioned TestingInvalidDutySlot

* versioned TestingInvalidDutySlot example

* versioned TestingInvalidDutySlot example2

* add an issue comment

* versioned messages tests

* versioned runner consensus

* versioned runner/duties/newduty

* versioned runner/duties/proposer

* versioned runner/full_happy_flow

* versioned runner/postconsensus

* versioned runner/pre_consensus_justifications

* versioned runner/preconsensus

* versioned valcheck/valcheckduty

* versioned consensusdata/proposer

* versioned beacon_node_test

* remove non-versioned funcs

* ssz withdrawals

* capella support

* versioned SSZWithdrawalsMarshaling

* introduce versioned epoch + use goerli capella epoch fork

* remove versioned block IsEmpty func

* review adjustments

* beacon_node_consts

* multi version FullHappyFlow example

* ExpectedDecidingMsgsForHeightWithRoot

* ExpectedSSVDecidingMsgsV

* use ExpectedSSVDecidingMsgsV

* adjust multi version FullHappyFlow example

* future_decided sc test

* post_decided sc test

* post_finish sc test

* valid_decided sc test

* valid_decided_7_operators sc test

* comparable StartNewRunnerDutySpecTest

* decided sc test

* not_decided sc test

* duplicate_msg sc test

* duplicate_msg_different_roots sc test

* inconsistent_beacon_signer sc test

* post_quorum sc test

* pre_decided sc test

* quorum sc test

* quorum_7_operators sc test

* unknown_signer sc test

* preconsensus/duplicate_msg sc test

* preconsensus/no_running_duty sc test

* preconsensus/post_decided_sc sc test

* preconsensus/post_finish sc test

* preconsensus/post_quorum sc test

* preconsensus/quorum sc test

* preconsensus/quorum_7_operators sc test

* preconsensus/unknown_signer sc test

* multi version TestBeaconBlockRoot

* fix deadlock

* add required fields to pass json tests

* fix test comment

* fix test

* future_decided full sc test

* post_decided full sc test

* post_finish full sc test

* valid_decided full sc test

* valid_decided_7_operators full sc test

* fix ssvlabs#250

* generate tests.json

* unwrap slice (#6)

* Fix comments (#12)

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
  • Loading branch information
olegshmuelov and GalRogozinski authored Jun 19, 2023
1 parent 3a3cd03 commit befa08d
Show file tree
Hide file tree
Showing 11 changed files with 1,470 additions and 202 deletions.
2 changes: 1 addition & 1 deletion ssv/spectest/generate/tests.json

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions ssv/spectest/tests/runner/consensus/future_decided.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func FutureDecided() tests.SpecTest {
nil,
),
},
PostDutyRunnerStateRoot: "6e003cd912d95b73c177f276929f03180b02dc77fec38720d718f8361b53d2b8",
PostDutyRunnerStateRoot: futureDecidedSyncCommitteeContributionSC().Root(),
PostDutyRunnerState: futureDecidedSyncCommitteeContributionSC().ExpectedState,
OutputMessages: []*types.SignedPartialSignatureMessage{
testingutils.PreConsensusContributionProofMsg(ks.Shares[1], ks.Shares[1], 1, 1),
},
Expand All @@ -64,7 +65,8 @@ func FutureDecided() tests.SpecTest {
nil,
),
},
PostDutyRunnerStateRoot: "ef4080c54e4d1cad83e02388ce61ce499c93628a5176d5defb12c97856dcb4ee",
PostDutyRunnerStateRoot: futureDecidedSyncCommitteeSC().Root(),
PostDutyRunnerState: futureDecidedSyncCommitteeSC().ExpectedState,
OutputMessages: []*types.SignedPartialSignatureMessage{},
ExpectedError: errStr,
},
Expand All @@ -86,7 +88,8 @@ func FutureDecided() tests.SpecTest {
nil,
),
},
PostDutyRunnerStateRoot: "96cb700dbfff1b478bb550f6b76e66e9837b05e78b77692ca9acc4bebb1845d7",
PostDutyRunnerStateRoot: futureDecidedAggregatorSC().Root(),
PostDutyRunnerState: futureDecidedAggregatorSC().ExpectedState,
OutputMessages: []*types.SignedPartialSignatureMessage{
testingutils.PreConsensusSelectionProofMsg(ks.Shares[1], ks.Shares[1], 1, 1),
},
Expand All @@ -107,7 +110,8 @@ func FutureDecided() tests.SpecTest {
nil,
),
},
PostDutyRunnerStateRoot: "fdc2d5c52ee8e5dc1a33219579aa820b2e8a22d75bf159cbd68f6299af546e26",
PostDutyRunnerStateRoot: futureDecidedAttesterSC().Root(),
PostDutyRunnerState: futureDecidedAttesterSC().ExpectedState,
OutputMessages: []*types.SignedPartialSignatureMessage{},
ExpectedError: errStr,
},
Expand Down
Loading

0 comments on commit befa08d

Please sign in to comment.