-
Notifications
You must be signed in to change notification settings - Fork 87
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
Test promptness of tentative followers #3857
Conversation
3e0dac6
to
3f1b16b
Compare
3f1b16b
to
0c6b2b7
Compare
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.
I found some typos in the comments, and made a few comment/layout suggestions. Approved! Really nice. As you say, there's a good bit of ceremony in the setup, but it seems minimal and tenable.
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Show resolved
Hide resolved
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Show resolved
Hide resolved
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Show resolved
Hide resolved
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Show resolved
Hide resolved
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Outdated
Show resolved
Hide resolved
|
||
instance Arbitrary FollowerPromptnessTestSetup where | ||
arbitrary = do | ||
chainUpdates <- genChainUpdates TentativeChainBehavior securityParam 20 |
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.
Are there any properties of genChainUpdates
that we're assuming here?
I just noticed it doesn't have a comment on it :(
EG, at a glance, it looks like it can generate SwitchFork n bs
where length bs == n
, but I didn't see anything ensuring that in that case the last bs
is preferred to the youngest rolled back block. Thus these ChainUpdate
s do not necessarily monotonically improve the chain tip 🤔
That might not matter to this test, but perhaps a one line comment here clarifying the extent to which it does or doesn't would be worthwhile.
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.
Yes, it is not guaranteed that every chain update will result in a tentative header, but this is not important for/orthogonal to this test, as we still mainly get pipelined blocks. I am adding a comment stressing this 👍
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.
Discussed on a call.
-
Esgen pointed out that this
TestBlock(With)
uses theBft
protocol, which has no tie-breaker. And solength bs == n
will never cause a switch (with no tiebreaker, the behavior is just to keep the chain you already have). -
We'll open a ticket to enrich other tentative header tests specifically with interesting tiebreaker behaviors. But for this promptness test, it's a bit off-topic:
AddBlock
will trigger the tentative pathway.
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/FollowerPromptness.hs
Outdated
Show resolved
Hide resolved
0c6b2b7
to
2cb9db2
Compare
bors merge |
Description
Closes CAD-4195
See the module description for motivation/approach.
Checklist
interface-CHANGELOG.md
interface-CHANGELOG.md