-
Notifications
You must be signed in to change notification settings - Fork 158
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
add a more coherent (less random) block generator #2280
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
JaredCorduan
commented
May 12, 2021
...er/shelley-spec-ledger-test/src/Test/Shelley/Spec/Ledger/Serialisation/EraIndepGenerators.hs
Show resolved
Hide resolved
nfrisby
approved these changes
May 12, 2021
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 integrated this into my ouroboros-network
branch and now the tests are passing again! 👍
Thank you for the rapid response!
In 7447dd7 we changed genBlock to produce blocks with more noise. This turns out to have broken some tests in the consensus layer that relied on some coherency in the block. See IntersectMBO/ouroboros-network#3134 To fix this, we add a new block generator genCoherentBlock, which is almost exactly like the previous genBlock, but does not require the PreAlonzo constraint.
JaredCorduan
force-pushed
the
jc/genCoherentBlock
branch
from
May 12, 2021 19:50
53b4100
to
a50b834
Compare
nfrisby
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
May 13, 2021
This commit hash matches and the sources.json content matches-or-exceeds that of the first cardano-ledger-specs commit that provides everything we require for our initial Alonzo integration (ie no serialization tests, but a Mary-to-Alonzo HF ThreadNet test). We needed to introduce the `Coherent` QuickCheck modifier because PR IntersectMBO/cardano-ledger#2274 loosened the `Arbitrary` instance for Shelley blocks. We have a few tests that assumed the arbitrary blocks would pass "integrity" checks and that the header's claim for the block body's size was mostly correct. The follow-up IntersectMBO/cardano-ledger#2280 re-introduced the generator for coherent header-body pairs, and the new `Coherent` modifier lets us select that for the requisite properties.
nfrisby
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
May 13, 2021
This commit hash matches and the sources.json content matches-or-exceeds that of the first cardano-ledger-specs commit that provides everything we require for our initial Alonzo integration (ie no serialization tests, but a Mary-to-Alonzo HF ThreadNet test). We needed to introduce the `Coherent` QuickCheck modifier because PR IntersectMBO/cardano-ledger#2274 loosened the `Arbitrary` instance for Shelley blocks. We have a few tests that assumed the arbitrary blocks would pass "integrity" checks and that the header's claim for the block body's size was mostly correct. The follow-up IntersectMBO/cardano-ledger#2280 re-introduced the generator for coherent header-body pairs, and the new `Coherent` modifier lets us select that for the requisite properties.
nfrisby
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
May 13, 2021
This commit hash matches and the sources.json content matches-or-exceeds that of the first cardano-ledger-specs commit that provides everything we require for our initial Alonzo integration (ie no serialization tests, but a Mary-to-Alonzo HF ThreadNet test). We needed to introduce the `Coherent` QuickCheck modifier because PR IntersectMBO/cardano-ledger#2274 loosened the `Arbitrary` instance for Shelley blocks. We have a few tests that assumed the arbitrary blocks would pass "integrity" checks and that the header's claim for the block body's size was mostly correct. The follow-up IntersectMBO/cardano-ledger#2280 re-introduced the generator for coherent header-body pairs, and the new `Coherent` modifier lets us select that for the requisite properties.
nfrisby
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
May 13, 2021
This commit hash matches and the sources.json content matches-or-exceeds that of the first cardano-ledger-specs commit that provides everything we require for our initial Alonzo integration (ie no serialization tests, but a Mary-to-Alonzo HF ThreadNet test). We needed to introduce the `Coherent` QuickCheck modifier because PR IntersectMBO/cardano-ledger#2274 loosened the `Arbitrary` instance for Shelley blocks. We have a few tests that assumed the arbitrary blocks would pass "integrity" checks and that the header's claim for the block body's size was mostly correct. The follow-up IntersectMBO/cardano-ledger#2280 re-introduced the generator for coherent header-body pairs, and the new `Coherent` modifier lets us select that for the requisite properties.
nfrisby
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
May 13, 2021
This commit hash matches and the sources.json content matches-or-exceeds that of the first cardano-ledger-specs commit that provides everything we require for our initial Alonzo integration (ie no serialization tests, but a Mary-to-Alonzo HF ThreadNet test). We needed to introduce the `Coherent` QuickCheck modifier because PR IntersectMBO/cardano-ledger#2274 loosened the `Arbitrary` instance for Shelley blocks. We have a few tests that assumed the arbitrary blocks would pass "integrity" checks and that the header's claim for the block body's size was mostly correct. The follow-up IntersectMBO/cardano-ledger#2280 re-introduced the generator for coherent header-body pairs, and the new `Coherent` modifier lets us select that for the requisite properties.
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.
In 7447dd7 we changed genBlock to
produce blocks with more noise. This turns out to have broken some tests
in the consensus layer that relied on some coherency in the block.
See IntersectMBO/ouroboros-network#3134
To fix this, we add a new block generator
genCoherentBlock
, which isalmost exactly like the previous
genBlock
, but does not require thePreAlonzo
constraint.The only difference (besides constraints) between the previous
genBlock
andgenCoherentBlock
is replacingwith