-
Notifications
You must be signed in to change notification settings - Fork 24
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
types encoding tests + json #169
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liorrutenberg
pushed a commit
that referenced
this pull request
Mar 12, 2023
* 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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP encoding tests