Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rockx-sg/ssv-spec with ssv-spec master branch #30

Open
wants to merge 108 commits into
base: staging
Choose a base branch
from

Conversation

aayush-rockx
Copy link

No description provided.

alonmuroch and others added 30 commits December 13, 2022 12:40
* WIP msg validation func

* QBFT spec tests pass, didn't remove legacy validation

* qbft tests pass + removed old validation

* passes tests + json
* validate msg round against state round

* allow future round change message to be processed

* fix tests

* change round for every consensus message and revert previous change

* fix tests
* align duty struct + beacon interface

* sync committee subnet id

* sync committee spec vars

* align beacon intefrace

* pass tests

* remove json ignore

* aggregate panic and bug fixes

* align interface

* updated roots

* post invalid decided fix

* post consensus validaiton fix

* fix tests

* json update
* WIP

* finished

* json tests + lint

* fix + json
* spec tests pass

* added blidned block flag in runner

* testing beacon block transactions

* blinded block integration

* all tests pass

* WIP blinded block tests

* NowTestNetwork genesis time fix

* refactor beacon test network

* WIP validator registration runnner

* WIP validator registration tests

* validator registration pre consensus tests

* validator registration runner consensus and post consensus tests

* compiles

* added missing tests

* support decided blinded/ regular dynamically

* blinded block pre consensus tests

* blinded block consensus tests

* blinded block post consensus tests

* rebase fix

* mod tidy

* change domain application value + tests

* consensus data validation spec test

* post consensus spec tests pass

* new duty, consensus, sync committee, proposer and pre consensus spec test aligment

* all ssv tests pass + json

* qbft tests pass + json

* lint
* share ssz

* ssv message ssz

- change domain type to [4]byte
- change message id to [58]byte

* SSZ encoding generate

- Duty
- ConsensusData
- other adjustments

* QBFT ssz

- signed message + message ssz encoding
- full data on signed message, root in message
- remove stage specific data for a more stream lined message struct

* add pre consensus justifications to consensus data

* fix previous

* change root to [32]byte{}

* spec test stubs

* building WIP

* qbft commit tests build

* decided spec tests compile

* added slot to partial signatures

* Make tests compilable (#156)

* Make tests compilable

* Simplify futuremsg.Cleanup

* Fix operator ID in `proposal.FutureRound`

* Fix issues in roundchange.HappyFlow

* Fix issue `ks.Shares[2], types.OperatorID(2), 3` -> `ks.Shares[3], types.OperatorID(3), 2`

* Fix WrongProposer

* Fix roundchange.AfterProposal

* Fix roundchange.RoundChangePartialQuorum

* Fix CommitDataInvalid

* Fix prepare.UnknownSigner

* Fix DuplicateMsgQuorumPreparedRCFirst

* Fix proposal.FutureRound

* Fix proposal.FutureRoundPrevNotPrepared

* Fix issues in generators of testing messages

* Use DecidingMsgsForHeight

* Set FullData for prepare multi signer message

* Fix InputValue and DecidedVal in qbft controller spectests

* Revert "Fix InputValue and DecidedVal in qbft controller spectests"

This reverts commit 25f1531.

* Fix DecidedVal in controller/decided tests

* Fix DecidedVal in NoInstanceRunning and LateCommit

* Fix proposal message in CurrentInstancePastRound

* Fix proposal message and decided value in latemsg.LateCommitPastRound

* Fix signers in proposal.FutureRoundPrevNotPrepared

* Set FullData when creating testing round change message

* Change start value for qbft base instance to TestingQBFTFullData

* Adjust round change message in roundchange.HappyFlow

* Fix output message in roundchange.F1Speedup

* Fix round change messages in roundchange.F1SpeedupPrevPrepared and roundchange.F1SpeedupPrevPrepared

* Fix issues in sanity futuremsg tests

* Fix signers in startinstance.PostFutureDecided

* remove full data on marshaling justifications + tests

* fix test import cycle

* fix linting

* partial sig slot validation + tests

* ssv full happy flow spec passes

* Remove irrelevant tests

* Remove irrelevant tests [2]

* Fix futuremsg.InvalidMsg

* Fix processmsg.InvalidIdentifier

* Remove irrelevant tests [3]

* Remove irrelevant tests [4]

* Fix round change message validation for MsgSpecTest type

* Remove messages.RoundChangeDataInvalidPreparedValue

* Fix issues with DecidedVal and lack of RC justifications in latemsg tests

* Fix some startinstance and processmsg tests

* Add a TODO to check InvalidRoundChangeJustificationPrepared test

* validRoundChange->validRoundChangeForData

---------

Co-authored-by: Alon Muroch <alonmuroch@gmail.com>
Co-authored-by: aaron <aaron@blox.io>
Co-authored-by: aaron-blox <123868031+aaron-blox@users.noreply.github.com>

* Fix failing tests

* Make tests compilable

* Simplify futuremsg.Cleanup

* Fix operator ID in `proposal.FutureRound`

* Fix issues in roundchange.HappyFlow

* Fix issue `ks.Shares[2], types.OperatorID(2), 3` -> `ks.Shares[3], types.OperatorID(3), 2`

* Fix WrongProposer

* Fix roundchange.AfterProposal

* Fix roundchange.RoundChangePartialQuorum

* Fix CommitDataInvalid

* Fix prepare.UnknownSigner

* Fix DuplicateMsgQuorumPreparedRCFirst

* Fix proposal.FutureRound

* Fix proposal.FutureRoundPrevNotPrepared

* Add a comment

* Fix tests.HappyFlow

* Fix tests.SevenOperators

* Fix tests.TenOperators

* Fix tests.ThirteenOperators

* Fix prepare.HappyFlow

* Fix commit.HappyFlow

* Fix issues in generators of testing messages

* sanity tests

* WIP spec testsd

* WIP base sanity tests

* Use DecidingMsgsForHeight

* Set FullData for prepare multi signer message

* Fix InputValue and DecidedVal in qbft controller spectests

* Fix proposal.CurrentRoundPrevPrepared()

* Fix proposal.PastRoundProposalPrevPrepared()

* Revert "Fix InputValue and DecidedVal in qbft controller spectests"

This reverts commit 25f1531.

* Fix DecidedVal in controller/decided tests

* Fix decided.HasQuorum()

* Fix decided.LateDecidedBiggerQuorum(), decided.LateDecidedSmallerQuorum(), decided.DuplicateMsg()

* Fix DecidedVal in NoInstanceRunning and LateCommit

* Fix proposal message in CurrentInstancePastRound

* Fix decided.CurrentInstancePastRound

* Fix decided.CurrentInstanceFutureRound

* Fix proposal message and decided value in latemsg.LateCommitPastRound

* Fix startinstance.EmptyValue, startinstance.NilValue, startinstance.Valid

* Fix processmsg.NoInstanceRunning()

* Fix latemsg.LateCommit()

* Fix latemsg.LateCommitPastRound()

* Fix signers in proposal.FutureRoundPrevNotPrepared

* Fix:
	proposal.FirstRoundJustification(),
	proposal.FutureRoundPrevNotPrepared(),
	proposal.FutureRound(),
	proposal.NoRCJustification(),
	proposal.WrongProposer(),
	proposal.WrongSignature(),

* Set FullData when creating testing round change message

* Fix proposal: CurrentRoundPrevPrepared, FutureRound, FutureRoundPrevNotPrepared, PreparedPreviouslyJustification

* Update roots for controller tests

* Remove PreparedPreviouslyJustificationDebug

* Change start value for qbft base instance to TestingQBFTFullData

* Adjust round change message in roundchange.HappyFlow

* Fix roundchange.HappyFlow

* Fix output message in roundchange.F1Speedup

* Fix round change messages in roundchange.F1SpeedupPrevPrepared and roundchange.F1SpeedupPrevPrepared

* Fix roots in remaining sanity round change tests

* Fix issues in sanity futuremsg tests

* Fix remaining sanity futuremsg tests

* Add proposal.InvalidFullData test

* Fix root in proposal.CurrentRoundPrevNotPrepared

* Fix checks if H(data) != root

* Fix signers in startinstance.PostFutureDecided

* remove full data on marshaling justifications + tests

* fix test import cycle

* fix linting

* partial sig slot validation + tests

* ssv full happy flow spec passes

* Remove irrelevant tests

* Remove irrelevant tests [2]

* Fix futuremsg.InvalidMsg

* Fix processmsg.InvalidIdentifier

* Remove irrelevant tests [3]

* Remove irrelevant tests [4]

* Fix round change message validation for MsgSpecTest type

* Remove messages.RoundChangeDataInvalidPreparedValue

* Fix issues with DecidedVal and lack of RC justifications in latemsg tests

* Fix some startinstance and processmsg tests

* Add a TODO to check InvalidRoundChangeJustificationPrepared test

* validRoundChange->validRoundChangeForData

* Fix roots of some tests; fix missing justification in some proposal tests; add FullData to `TestingPrepareMessageWithParams`

* Fix issues after merging

* Uncomment sanity tests

* Remove duplicated sanity tests

* Fix a comment in proposal.InvalidFullData

* Create helper functions receiving identifiers for all futuremsg tests

* Remove duplicated tests

* Fix root for NotPreparedPreviouslyJustification

---------

Co-authored-by: Alon Muroch <alonmuroch@gmail.com>
Co-authored-by: aaron <aaron@blox.io>
Co-authored-by: aaron-blox <123868031+aaron-blox@users.noreply.github.com>

* ssz: fix ssv sanity tests (#162)

* Make tests compilable

* Simplify futuremsg.Cleanup

* Fix operator ID in `proposal.FutureRound`

* Fix issues in roundchange.HappyFlow

* Fix issue `ks.Shares[2], types.OperatorID(2), 3` -> `ks.Shares[3], types.OperatorID(3), 2`

* Fix WrongProposer

* Fix roundchange.AfterProposal

* Fix roundchange.RoundChangePartialQuorum

* Fix CommitDataInvalid

* Fix prepare.UnknownSigner

* Fix DuplicateMsgQuorumPreparedRCFirst

* Fix proposal.FutureRound

* Fix proposal.FutureRoundPrevNotPrepared

* Add a comment

* Fix tests.HappyFlow

* Fix tests.SevenOperators

* Fix tests.TenOperators

* Fix tests.ThirteenOperators

* Fix prepare.HappyFlow

* Fix commit.HappyFlow

* Fix issues in generators of testing messages

* sanity tests

* WIP spec testsd

* WIP base sanity tests

* Use DecidingMsgsForHeight

* Set FullData for prepare multi signer message

* Fix InputValue and DecidedVal in qbft controller spectests

* Fix proposal.CurrentRoundPrevPrepared()

* Fix proposal.PastRoundProposalPrevPrepared()

* Revert "Fix InputValue and DecidedVal in qbft controller spectests"

This reverts commit 25f1531.

* Fix DecidedVal in controller/decided tests

* Fix decided.HasQuorum()

* Fix decided.LateDecidedBiggerQuorum(), decided.LateDecidedSmallerQuorum(), decided.DuplicateMsg()

* Fix DecidedVal in NoInstanceRunning and LateCommit

* Fix proposal message in CurrentInstancePastRound

* Fix decided.CurrentInstancePastRound

* Fix decided.CurrentInstanceFutureRound

* Fix proposal message and decided value in latemsg.LateCommitPastRound

* Fix startinstance.EmptyValue, startinstance.NilValue, startinstance.Valid

* Fix processmsg.NoInstanceRunning()

* Fix latemsg.LateCommit()

* Fix latemsg.LateCommitPastRound()

* Fix signers in proposal.FutureRoundPrevNotPrepared

* Fix:
	proposal.FirstRoundJustification(),
	proposal.FutureRoundPrevNotPrepared(),
	proposal.FutureRound(),
	proposal.NoRCJustification(),
	proposal.WrongProposer(),
	proposal.WrongSignature(),

* Set FullData when creating testing round change message

* Fix proposal: CurrentRoundPrevPrepared, FutureRound, FutureRoundPrevNotPrepared, PreparedPreviouslyJustification

* Update roots for controller tests

* Remove PreparedPreviouslyJustificationDebug

* Change start value for qbft base instance to TestingQBFTFullData

* Adjust round change message in roundchange.HappyFlow

* Fix roundchange.HappyFlow

* Fix output message in roundchange.F1Speedup

* Fix round change messages in roundchange.F1SpeedupPrevPrepared and roundchange.F1SpeedupPrevPrepared

* Fix roots in remaining sanity round change tests

* Fix issues in sanity futuremsg tests

* Fix remaining sanity futuremsg tests

* Add proposal.InvalidFullData test

* Fix root in proposal.CurrentRoundPrevNotPrepared

* Fix checks if H(data) != root

* Fix signers in startinstance.PostFutureDecided

* remove full data on marshaling justifications + tests

* fix test import cycle

* fix linting

* partial sig slot validation + tests

* ssv full happy flow spec passes

* Remove irrelevant tests

* Remove irrelevant tests [2]

* Fix futuremsg.InvalidMsg

* Fix processmsg.InvalidIdentifier

* Remove irrelevant tests [3]

* Remove irrelevant tests [4]

* Fix round change message validation for MsgSpecTest type

* Remove messages.RoundChangeDataInvalidPreparedValue

* Fix issues with DecidedVal and lack of RC justifications in latemsg tests

* Fix some startinstance and processmsg tests

* Add a TODO to check InvalidRoundChangeJustificationPrepared test

* validRoundChange->validRoundChangeForData

* Fix roots of some tests; fix missing justification in some proposal tests; add FullData to `TestingPrepareMessageWithParams`

* Fix issues after merging

* Uncomment sanity tests

* Remove duplicated sanity tests

* Fix a comment in proposal.InvalidFullData

* Create helper functions receiving identifiers for all futuremsg tests

* Remove duplicated tests

* Fix root for NotPreparedPreviouslyJustification

* Fix timeout tests

* Fix justification validation for MsgSpecTest

* Simplify identifier usage in testingutils

* Delete messages.RoundChangeDataInvalidPreparedRound()

* Remove messages.SignedMsgSigTooLong and messages.SignedMsgSigTooShort

* Rename testing variables

* Fix generating proposal message with different root and proposal.DuplicateMsgDifferentValue

* Mark tests that have issues other that different instance roots with TODOs

* Remove outdated TODO from startinstance.PostFutureDecided

* Update TODO comments

* Comment out accidentally uncommented tests

* Fix proposal.PreparedPreviouslyNoPrepareJustificationQuorum

* Fix proposal.InvalidPrepareJustificationValue

* Fix proposal.InvalidPrepareJustificationRound

* Delete commit.InvalidCommitData and prepare.InvalidPrepareData

* Mark decided.CurrentInstancePastRound and decided.CurrentInstanceFutureRound as fixed

* Fix decided.CurrentInstance

* Delete roundchange.JustificationInvalidPrepareData

* Delete roundchange.JustificationWrongValue

* Fix decided.CurrentInstance root

* Remove roundchange.InvalidRoundChangeData

* Fix issues in remaining round change tests

* Fix decided.InvalidValCheckData

* Mark decided.InvalidValCheckData as fixed

* Mark recently fixed round change tests as fixed

* Delete proposal.JustificationsValueNotJustified

* Fix ssv sanity tests

* Remove debug print

* Fix DecidingMsgsForHeight

* Fix returned error if no running duty on consensus message processing

* Fix consensus.PostFinish test

* Delete messages.RoundChangeDataInvalidJustifications

* Attempt to fix consensus.PostFinish

* Revert roundchange.JustificationWrongValue removal

* Revert roundchange.JustificationWrongValue removal in all_tests.go

* Fix roundchange.JustificationWrongValue

* Comment out roundchange.JustificationWrongValue

* Fix consensus.NoRunningDuty

---------

Co-authored-by: Alon Muroch <alonmuroch@gmail.com>
Co-authored-by: aaron <aaron@blox.io>
Co-authored-by: aaron-blox <123868031+aaron-blox@users.noreply.github.com>

* ssz: fix remaining qbft and ssv tests (#164)

* Make tests compilable

* Simplify futuremsg.Cleanup

* Fix operator ID in `proposal.FutureRound`

* Fix issues in roundchange.HappyFlow

* Fix issue `ks.Shares[2], types.OperatorID(2), 3` -> `ks.Shares[3], types.OperatorID(3), 2`

* Fix WrongProposer

* Fix roundchange.AfterProposal

* Fix roundchange.RoundChangePartialQuorum

* Fix CommitDataInvalid

* Fix prepare.UnknownSigner

* Fix DuplicateMsgQuorumPreparedRCFirst

* Fix proposal.FutureRound

* Fix proposal.FutureRoundPrevNotPrepared

* Add a comment

* Fix tests.HappyFlow

* Fix tests.SevenOperators

* Fix tests.TenOperators

* Fix tests.ThirteenOperators

* Fix prepare.HappyFlow

* Fix commit.HappyFlow

* Fix issues in generators of testing messages

* sanity tests

* WIP spec testsd

* WIP base sanity tests

* Use DecidingMsgsForHeight

* Set FullData for prepare multi signer message

* Fix InputValue and DecidedVal in qbft controller spectests

* Fix proposal.CurrentRoundPrevPrepared()

* Fix proposal.PastRoundProposalPrevPrepared()

* Revert "Fix InputValue and DecidedVal in qbft controller spectests"

This reverts commit 25f1531.

* Fix DecidedVal in controller/decided tests

* Fix decided.HasQuorum()

* Fix decided.LateDecidedBiggerQuorum(), decided.LateDecidedSmallerQuorum(), decided.DuplicateMsg()

* Fix DecidedVal in NoInstanceRunning and LateCommit

* Fix proposal message in CurrentInstancePastRound

* Fix decided.CurrentInstancePastRound

* Fix decided.CurrentInstanceFutureRound

* Fix proposal message and decided value in latemsg.LateCommitPastRound

* Fix startinstance.EmptyValue, startinstance.NilValue, startinstance.Valid

* Fix processmsg.NoInstanceRunning()

* Fix latemsg.LateCommit()

* Fix latemsg.LateCommitPastRound()

* Fix signers in proposal.FutureRoundPrevNotPrepared

* Fix:
	proposal.FirstRoundJustification(),
	proposal.FutureRoundPrevNotPrepared(),
	proposal.FutureRound(),
	proposal.NoRCJustification(),
	proposal.WrongProposer(),
	proposal.WrongSignature(),

* Set FullData when creating testing round change message

* Fix proposal: CurrentRoundPrevPrepared, FutureRound, FutureRoundPrevNotPrepared, PreparedPreviouslyJustification

* Update roots for controller tests

* Remove PreparedPreviouslyJustificationDebug

* Change start value for qbft base instance to TestingQBFTFullData

* Adjust round change message in roundchange.HappyFlow

* Fix roundchange.HappyFlow

* Fix output message in roundchange.F1Speedup

* Fix round change messages in roundchange.F1SpeedupPrevPrepared and roundchange.F1SpeedupPrevPrepared

* Fix roots in remaining sanity round change tests

* Fix issues in sanity futuremsg tests

* Fix remaining sanity futuremsg tests

* Add proposal.InvalidFullData test

* Fix root in proposal.CurrentRoundPrevNotPrepared

* Fix checks if H(data) != root

* Fix signers in startinstance.PostFutureDecided

* remove full data on marshaling justifications + tests

* fix test import cycle

* fix linting

* partial sig slot validation + tests

* ssv full happy flow spec passes

* Remove irrelevant tests

* Remove irrelevant tests [2]

* Fix futuremsg.InvalidMsg

* Fix processmsg.InvalidIdentifier

* Remove irrelevant tests [3]

* Remove irrelevant tests [4]

* Fix round change message validation for MsgSpecTest type

* Remove messages.RoundChangeDataInvalidPreparedValue

* Fix issues with DecidedVal and lack of RC justifications in latemsg tests

* Fix some startinstance and processmsg tests

* Add a TODO to check InvalidRoundChangeJustificationPrepared test

* validRoundChange->validRoundChangeForData

* Fix roots of some tests; fix missing justification in some proposal tests; add FullData to `TestingPrepareMessageWithParams`

* Fix issues after merging

* Uncomment sanity tests

* Remove duplicated sanity tests

* Fix a comment in proposal.InvalidFullData

* Create helper functions receiving identifiers for all futuremsg tests

* Remove duplicated tests

* Fix root for NotPreparedPreviouslyJustification

* Fix timeout tests

* Fix justification validation for MsgSpecTest

* Simplify identifier usage in testingutils

* Delete messages.RoundChangeDataInvalidPreparedRound()

* Remove messages.SignedMsgSigTooLong and messages.SignedMsgSigTooShort

* Rename testing variables

* Fix generating proposal message with different root and proposal.DuplicateMsgDifferentValue

* Mark tests that have issues other that different instance roots with TODOs

* Remove outdated TODO from startinstance.PostFutureDecided

* Update TODO comments

* Comment out accidentally uncommented tests

* Fix proposal.PreparedPreviouslyNoPrepareJustificationQuorum

* Fix proposal.InvalidPrepareJustificationValue

* Fix proposal.InvalidPrepareJustificationRound

* Delete commit.InvalidCommitData and prepare.InvalidPrepareData

* Mark decided.CurrentInstancePastRound and decided.CurrentInstanceFutureRound as fixed

* Fix decided.CurrentInstance

* Delete roundchange.JustificationInvalidPrepareData

* Delete roundchange.JustificationWrongValue

* Fix decided.CurrentInstance root

* Remove roundchange.InvalidRoundChangeData

* Fix issues in remaining round change tests

* Fix decided.InvalidValCheckData

* Mark decided.InvalidValCheckData as fixed

* Mark recently fixed round change tests as fixed

* Delete proposal.JustificationsValueNotJustified

* Fix ssv sanity tests

* Remove debug print

* Fix DecidingMsgsForHeight

* Fix returned error if no running duty on consensus message processing

* Fix consensus.PostFinish test

* Fix ssv tests

* Fix qbft tests

* Fix preconsensus.InvalidMessageSlot test name

* Generate JSONs

* Fix consensus.NoRunningDuty

* Fix tests in message_container_test.go

* Generate JSONs

* Fix running consensus.PostFinish from TestJSON

* Generate JSONs

* Fix consensus.PostFinish

* Generate JSONs

---------

Co-authored-by: Alon Muroch <alonmuroch@gmail.com>
Co-authored-by: aaron <aaron@blox.io>
Co-authored-by: aaron-blox <123868031+aaron-blox@users.noreply.github.com>

* types encoding tests + json (#169)

* increase test timeout to 25min

---------

Co-authored-by: Alon Muroch <alonmuroch@gmail.com>
Co-authored-by: Nikita Kryuchkov <nkryuchkov10@gmail.com>
Co-authored-by: aaron <aaron@blox.io>
Co-authored-by: aaron-blox <123868031+aaron-blox@users.noreply.github.com>
…#167)

* fix: missing `Slot` in `PartialSignatureMessages` construction

* test for correct slots in `MsgProcessingSpecTest`
* WIP comparable state spec tests

* qbft happy flow with state

* WIP ssv comparison works

* comparables (to be deleted_)

* removed custom diff

* revert changes to pass tests

* helper functions for ssv state comparison

* happy flow sync committee state comparison

* wip happy flow sync committee state comparison

* state comparison struct + separating state comparison to files with suffix "_sc"

* qbft state comparison refactor

* all ssv spec tests
* fixed github pipline + json testing

* fix prev

* fix create json test

* lint fix

* fix prev
* SSV spec tests speed up

* qbft spec tests speed fix

* ssv json spec test sparallel

* revert back to single make test
* message max size fixes + calculation

* regenerate ssz

* increase max SSVMessage data size to accommodate qbtf signed message

* fixes + explanations

* regenerate ssz and json specs (recerted qbft message size to not break)
* copied all changes

* lint fix

* merge fixes

* fixed merge first height future message

* fix no running instance test

* spec test naming issue resolved

* lint fix

* TMP - faster ssv tests

* fixes

* all tests pass + json

* last few fixes

* move isFutureMessage outside of func

* Update qbft/spectest/tests/controller/futuremsg/first_height_not_started.go

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>

* Update qbft/spectest/tests/controller/futuremsg/first_height_started.go

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>

* remvoe cosnensus/no_running_consensus_instance test

In the past it tested cases in which a consensus message is received but no running qbft instance is present.
After a few changes in the code (over the past few months) in such cases it will either be a future message or carrying a pre-consensus in which case a qbft instance will be started.

Essentially it doesn't test anything anymore

* bundled fixes from review

* highest decided comparison readability

* renaming func

* invalid data func comment

* merge fixes

* fix expected error

* Update ssv/spectest/tests/runner/pre_consensus_justifications/invalid_msg_type.go

* Update ssv/spectest/tests/runner/pre_consensus_justifications/invalid_slot.go

* fix comment of auto suggestion

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Fix decided.InvalidFullData and proposal.InvalidValueCheck

* Implement messages.MarshalJustifications, messages.MarshalJustificationsWithFullData, messages.UnmarshalJustifications

* Fix MarshalJustifications and MarshalJustificationsWithFullData

* Fix code review requests

* resolve merge conflicts

* make generate-jsons

---------

Co-authored-by: olegshmuelov <45327364+olegshmuelov@users.noreply.github.com>
Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* move rootgetter interface to types package

* use existing interface & move to independent file

* get rid of RootRegister map global state

* use Root interface everywhere possible
* Implementation

* 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
* ssv comparable state

* use qbft state comparison struct

* rename import pkg name

* add sc to controller spectest

* add sc to controller sync spec test

* Pr/215 ssv comparable state (#2)

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* wrong message type check

* generate json
GalRogozinski and others added 30 commits November 7, 2023 12:28
…318)

* fix validator registration + voluntary exit start duty when prev not finished

* add condition for non-beacon duty

* duplicate_duty_finished.go

* duplicate duty not finished

* change error message

* fix error in tests

* finished.go

* ssv msgs

* TestingValidatorRegistrationBySlot

* VoluntaryExitBySlot

* remove TestingEpoch2

* consensus not started

* finished.go

* fix finished

* remove test one

* tests.json

* fix comment

---------

Co-authored-by: Alon Muroch <alonmuroch@gmail.com>
* Merge with Alon's code for fork support

* Update according to SIP DomainType spec

* Drop controller's domain and update tests

* Drop unnecessary domain argument in controller.

* Fix controller constructors.

* Remove SetIdentifier; json-> ssz encoding.

* Applied comments suggestions

* Update according to comments. Revert ssz

* generate jsons

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* late justification

* different consensus data

* check in round_change.go if proposal was sent

* valid_justification_late_different_cd.go

* late

* finish tests

* use has quorum

* add tests.json

* rename variable

* rename tests

* generate jsons
* ssvmsg test structure [skip ci]

* Msg ID belongs and doesn't belong tests [skip ci]

* Generate tests
* Define spec test [skip ci]

* Drop duplicated test [skip ci]

* Add case in run test [skip ci]

* Add tests

* Drop duplicated test. Change name to encompass 2 scenarios

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Move test spec [skip ci]

* Add test case; drop old test spec [skip ci]

* Move invalid msg test [skip ci]

* Move signer 0 test [skip ci]

* Move no msgs test [skip ci]

* Move valid tests; drop old duplicated signer zero [skip ci]

* Drop duplicate encoding (already exists in types) [skip ci]

* Move valid contribution proof [skip ci]

* Drop ssv run test case [skip ci]

* Add inconsistent signers test [skip ci]

* Fix tests return value

* Fix test name [skip ci]

* Generate type tests [skip ci]

* Generate ssv tests

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* ConsensusData test

* validator registration and voluntary exit tests

* attestation tests

* aggregator tests

* proposer tests

* sync committee tests

* sync committee contribution tests

* invalid duty test

* encoding tests

* generate tests

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Add beacon block option in consensus data

* Update Attestation and fastssz. Generate new ssz [skip ci]

* Add KZGCommitment SSZ

* Add unused generated import just to show in the FastSSZ issue

* Remove unused import using the goimports tool

* Add Deneb beacon node for testing

* Add beacon node testing util

* Add DataVersion due to change of default value

* Add type ssz tests

* Remove Bellatrix objects and use Deneb [skip ci]

* Generate new tests

* Revert ZGCommitments SSZ

* Drop comment about issue

* Drop unused test variables

* Drop unused Transactions function. Catch error.

* deneb block contents adjustments

* return block signing root

* Update SSZ-Max sizes [skip ci]

* Generate ssz encoding with new max values [skip ci]

* Add different BeaconBroadcastedRoot for blinded proposal [skip ci]

* Generate tests

* Revert "Add different BeaconBroadcastedRoot for blinded proposal [skip ci]"

This reverts commit 7dff441.

* fix deneb signed beacon block

* fix submitting signed deneb block

* add deneb tests

* fixed typo

* update json

* remove bellatrix

* Revert "remove bellatrix"

This reverts commit 3f10eea.

* Compare BlockContents root in tests [skip ci]

* SSZ-max adjustment

* Use fixed capellaBlock const

* Generate tests

* revert to bellatrix

* wrong duty type fix

* re generate json tests

* revert sync committee contribution version to bellatrix

* regenerate tests

* Fix testing signed blinded block

* Update ssz-max. Add python code

* Use correct prater fork epoch for deneb

* Adjust szz-max size

---------

Co-authored-by: olegshmuelov <45327364+olegshmuelov@users.noreply.github.com>
Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* increase dout

* explanation of increasing the value
…compatibility (#362)

* Revert "Deneb Support (#324)"

This reverts commit f2d5899.

* Add jsons (#357)

* create jsons

* compare with jsons

* generate jsons for qbft signed message

* compare qbft signed message with json state

* fix lint error

* generate jsons for create msg test

* generate jsons for create msg test

* use correct test type

* use correct test name

* Return deneb with old encoding (#360)

* Revert "Revert "Deneb Support (#324)""

This reverts commit 0a559e2.

* use custom old encodings

* generate-jsons

* Add phase0 version

* Bellatrix -> Capella on a single test

* Generate jsons

* Revert Capella -> Deneb on a single test

---------

Co-authored-by: MatheusFranco99 <48058141+MatheusFranco99@users.noreply.github.com>

---------

Co-authored-by: MatheusFranco99 <48058141+MatheusFranco99@users.noreply.github.com>
* Partial sig container test spec [skip ci]

* Add run test case [skip ci]

* Add tests

* Drop unnecessary expectedSig

* generate-jsons

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Duplicate msg then quorum test

* generate-jsons

* Fix beacon root and generate test

* Update test name and description

* Generate tests

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Nil check

* Add test for future decided no instance

* Apply suggestion

* generate tests
* Add singleton pattern for TestingKeyManager

* Invert lock place

* Use fnv
* Non-duplicated late proposal

* Drop instance data for height 1

* generate-jsons

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Equal height no running instance

* Invalid hash data root [skip ci]

* Invalid Justification Unmarshalling [skip ci]

* Marshal Justifications [skip ci]

* Round change justification unmarshalling [skip ci]

* Prepare justification unmarshalling

* Valid Hash Data Root [skip ci]

* SSZ Marshalling [skip ci]

* Round-Change Prepared

* Fix lint. Get error from unmarshal call

* Check encoded message and message root.

* Extend StartHeight for post state

* add to tests all and generate

* generate-jsons

* generate-jsons

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Invalid then quorum pre consensus test

* Invalid then quorum post consensus test

* Generate tests

* generate-jsons

* Fix blinded proposer runner test

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Wrong duty role

* Wrong duty pubkey

* Generate ssv tests

* generate-jsons

---------

Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* Add SignedSSVMessage

* Add SSZ encoding

* Test structures for SignedSSVMessage

* Test utils and encoding test

* Tests

* Generate tests

* Adapt message validation

* Fix expected error; Bring back commented tests

* Add comment on signature

* Adjust ssz-max in SignedSSVMessage

* Include RSA check in test

* Generate JSONs

* Change SignedSSVMessage encoding

* Generate JSON

* Add message validation interface

* Fix lint. Remove unused functions

* Apply comments

* Apply suggestions
* Add SignedSSVMessage

* Add SSZ encoding

* Test structures for SignedSSVMessage

* Test utils and encoding test

* Tests

* Generate tests

* Adapt message validation

* Fix expected error; Bring back commented tests

* Add comment on signature

* Adjust ssz-max in SignedSSVMessage

* Include RSA check in test

* Generate JSONs

* Optimistic approach in pre-consensus messages

* Extend optimistic approach to pre-consensus

* Extend to post-consensus

* Add approach to validator reg. and exit duties

* Add errors

* Rename fall back function

* Check duplicated signature case

* Add in-committee check

* Fix unknown signer error messages

* Drop expected error in invalid signature since it's deprecated

* Change invalid beacon sig test to trigger error once quorum is reached

* Drop errors in invalid then quorum test

* GenerateTests

* Fall back and verify for all roots

* Test: Invalid quorum then valid quorum

* Test: invalid quorum then valid quorum for pre-consensus

* Fix name

* Generate tests

* Fix lint

* remove commits from signed ssv message branch

* Fix revert issues. Generate tests

* Simplify if clause
* Drop BLS check where redundant

* Check that the message signers belong to the instance committee

* Add signer in committee check for proposal

* Fix tests error msgs. Drop old tests

* Refactor into WithVerification NoVerification functions

* Drop unnecessary config arguments

* Add msg.Validate() tests for round-change

* Remove unused argument

* Add NetworkPubKey to Operator

* Fix roots due to changes in field names in the Operator type

* Generate JSON tests

* Make validator.ProcessMsg receive a SignedSSVMessage; Add SignatureVerifier module to Validator

* Add validation checks to Validator.ProcessMessage

* Testing util for SignedSSVMessage conversion

* Add SignedSSVMessage to tests

* Generate tests JSON

* Add tests for Validator.ProcessMessage

* Generate tests JSONs

* Rename BeaconPubKey to SharePubKey

* Fix roots due to the field name change

* Generate tests JSONs

* Store SignedSSVMessage in broadcaster

* Rename NetworkKey to SSVKey

* Fix tests roots due to name change

* Generate JSON tests

* Rename NoVerification to IgnoreSignature

* Test msg with invalid signature for runner-consensus

* Split signer into SSVShare and SSVOperator. Rename SSVKey to SSVOperatorKey

* Add mutex and fix test roots

* Generate test JSONs

* Fix lock usage

* Drop duplicated check in msg validation

* Verify RSA signatures of broadcasted messages

* Apply suggestions

* Add suggestions

* Change decode and verify order

* Rename SSVOperatorKeys to OperatorKeys in testing util

* Define signature to have 256 bytes

* Rename Network to Operator in tests
* implementation

* generate tests
* implementation

* reorg params

* use GetID for message id
Meta - rename Go module to `ssvlabs` (#385)
* remove ProducesBlindedBlocks from usage

* generate tests.json without producedBlindedBlock

* remove blinded block condition

* generate new tests files

* comment unrelevant tests

* comment unrelevant tests

* comment unrelevant tests

* comment unrelevant tests

* comment unrelevant tests

* remove sig from signedBlock

* remove sig from signedBlock

* add signature

* upgrade go-eth2-client to latest

* add back all tests

* remove generated tests

* generate new tests

* generate new tests

* removed unnecessary variable declerations

* removed unused GetBlindedBeaconBlock

* fix lint by removing unreachable code

* update go-eth2-client to match ssv v0.21.3 and align generate.go to the same version

* update go-eth2-client to match ssv v0.21.3 and align generate.go to the same version

* update go-eth2-client to match ssv v0.21.1 and align generate.go to the same version

* update go-eth2-client to match implementation

* update go-eth2-client to match ssv v0.21.3 and align generate.go to the same version

* return whitespace between imports

---------

Co-authored-by: guy muroch <guym@blox.io>
Co-authored-by: moshe-blox <moshe@blox.io>
* update go

* add .x

* up actions versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet