This repository was archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 631
CBR-504: Fix/improve block validation tests #4081
Merged
Merged
Conversation
This file contains hidden or 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
The existing tests failed to test the validity of the key signing each block and there were no other tests for that. Since we are in the process of adding two new consensus validation algorithms (OBDT strict and lenient) we should add this now.
tatyanavych
reviewed
Feb 18, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add CHANGELOG entry in OBFT Features subsection?
intricate
approved these changes
Feb 18, 2019
@@ -186,6 +188,7 @@ verifyHeader pm VerifyHeaderParams {..} h = | |||
] | |||
|
|||
-- CHECK: Checks that the block leader is the expected one. | |||
relatedToLeaders :: ConsensusEraLeaders -> [(Bool, Text)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to add these type sigs!
-- | This type is used to generate a valid blockheader and associated header | ||
-- verification params. With regards to the block header function | ||
-- 'Pos.Types.Blocks.Functions.verifyHeader', the blockheaders that may be | ||
-- part of the verification parameters are guaranteed to be valid, as are the | ||
-- slot leaders and the current slot. | ||
newtype HeaderAndParams = HAndP | ||
{ getHAndP :: (Block.VerifyHeaderParams, Block.BlockHeader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@@ -2,7 +2,6 @@ | |||
{-# LANGUAGE RankNTypes #-} | |||
{-# LANGUAGE TupleSections #-} | |||
{-# LANGUAGE TypeApplications #-} | |||
{-# LANGUAGE ViewPatterns #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@tatyanavych said
Not as part of this PR, but probably as part of CBR482. |
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
Feb 18, 2019
4081: CBR-504: Fix/improve block validation tests r=erikd a=erikd Co-authored-by: Erik de Castro Lopo <[email protected]> Co-authored-by: Luke Nadur <[email protected]>
Build succeeded |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.