Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

CBR-504: Fix/improve block validation tests #4081

Merged
merged 7 commits into from
Feb 18, 2019
Merged

Conversation

erikd
Copy link
Member

@erikd erikd commented Feb 18, 2019

No description provided.

@erikd erikd requested review from mhuesch and intricate February 18, 2019 07:19
erikd and others added 2 commits February 18, 2019 19:35
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.
Copy link
Contributor

@tatyanavych tatyanavych left a 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?

@@ -186,6 +188,7 @@ verifyHeader pm VerifyHeaderParams {..} h =
]

-- CHECK: Checks that the block leader is the expected one.
relatedToLeaders :: ConsensusEraLeaders -> [(Bool, Text)]
Copy link
Contributor

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)
Copy link
Contributor

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 #-}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@erikd
Copy link
Member Author

erikd commented Feb 18, 2019

@tatyanavych said

Do we need to add CHANGELOG entry in OBFT Features subsection?

Not as part of this PR, but probably as part of CBR482.

@erikd
Copy link
Member Author

erikd commented Feb 18, 2019

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]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 18, 2019

@iohk-bors iohk-bors bot merged commit 71f9d8e into develop Feb 18, 2019
@iohk-bors iohk-bors bot deleted the erikd/CBR-504 branch February 18, 2019 19:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants