Skip to content

Conversation

@isovector
Copy link
Member

Description

This PR generalizes all uses of unnecessarily-specified TestBlocks to instead be parametric blks.

@isovector isovector requested a review from nfrisby as a code owner January 6, 2026 16:37
@isovector isovector marked this pull request as draft January 6, 2026 16:37
@isovector isovector removed the request for review from nfrisby January 6, 2026 16:37
@isovector isovector force-pushed the isovector/more-detest branch from ac2dc3b to 65a4b82 Compare January 6, 2026 16:58
@isovector isovector force-pushed the isovector/more-detest branch 2 times, most recently from 8dbfbed to a89a58b Compare January 9, 2026 17:38
@isovector isovector marked this pull request as ready for review January 12, 2026 20:15
Copy link
Collaborator

@ninioArtillero ninioArtillero left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this piece 👌

Just left a question.

prop_chainSyncKillsBlockFetch :: Property
prop_chainSyncKillsBlockFetch = do
forAllGenesisTest
forAllGenesisTest @TestBlock
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need the TestBlock type application here (and in the other properties/calls to forAllGenesistest)? I see that ghc does complain about ambiguity, but I don't understand why that is; perhaps this is pointing to future work to run this tests with cardano blocks? Shouldn't the parametrization introduced by the PR be enough for this to be resolved at runtime?

Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out there's nothing anywhere in this test that pins down the block type. Which is a pretty good thing---it means this test doesn't actually depend on TestBlock.

Copy link
Member

@nbloomf nbloomf left a comment

Choose a reason for hiding this comment

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

This looks good to me. Do we know anything about the handful of tests that are currently failing? Does that situation predate this project or did we break something?

@isovector
Copy link
Member Author

@nbloomf my guess is it's the error calls since #26 hasn't landed yet.

isovector and others added 5 commits January 12, 2026 15:15
# Description

This PR fixes `hashForkNo` as previous behavior uniquely identified
branches by fork number and the new parameterized implementation did
not. This seems relevant because otherwise `BlockTreeBranch`es forking
from the same block in the trunk would end up with the same fork number.
As it turns out, these _fork numbers_ are not related to the order in
which forking takes place. Related documentation was added.

This seem to be related to an apparent mismatch. On the one hand, the
`Test.Util.TestBlock.TestHash` documentation states that multiple
branches can steem from a single node in a tree and _suggests_ that the
fork number indexes branches in an orderly way. On the other hand, the
implementation of `GenesisTest` generation in
`Test.Consensus.Genesis.Setup.GenChains` assigns fork numbers to
branches in an arbitrary way.
@isovector isovector force-pushed the isovector/more-detest branch from a2a6456 to 0668a9d Compare January 12, 2026 23:16
@isovector isovector merged commit b01ade5 into conformance-testing Jan 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants