Repository navigation
Speed up SubTx serialisation tests and update Cabal caching - #1401
Draft
carbolymer wants to merge 1 commit into
Draft
carbolymer wants to merge 1 commit into
carbolymer wants to merge 1 commit into
Conversation
carbolymer
force-pushed
the
mgalazyn/feature/haskell-ci-performance
branch
from
October 29, 2026 15:21
faaebc8 to
d86fd8f
Compare
| prop_roundtrip_sub_tx_coin_boundaries :: Property | ||
| prop_roundtrip_sub_tx_coin_boundaries = H.propertyOnce $ do | ||
| let amounts :: [Integer] | ||
| amounts = [0, 1, 23, 24, 255, 256, 65535, 65536, 4294967295, 4294967296] |
| prop_roundtrip_sub_tx_coin_boundaries :: Property | ||
| prop_roundtrip_sub_tx_coin_boundaries = H.propertyOnce $ do | ||
| let amounts :: [Integer] | ||
| amounts = [0, 1, 23, 24, 255, 256, 65535, 65536, 4294967295, 4294967296] |
| prop_roundtrip_sub_tx_coin_boundaries :: Property | ||
| prop_roundtrip_sub_tx_coin_boundaries = H.propertyOnce $ do | ||
| let amounts :: [Integer] | ||
| amounts = [0, 1, 23, 24, 255, 256, 65535, 65536, 4294967295, 4294967296] |
| prop_roundtrip_sub_tx_coin_boundaries :: Property | ||
| prop_roundtrip_sub_tx_coin_boundaries = H.propertyOnce $ do | ||
| let amounts :: [Integer] | ||
| amounts = [0, 1, 23, 24, 255, 256, 65535, 65536, 4294967295, 4294967296] |
carbolymer
force-pushed
the
mgalazyn/feature/haskell-ci-performance
branch
from
October 29, 2026 15:36
d86fd8f to
4922c41
Compare
Run each of the four codec properties for 50 independent trials across the original 0-99 size range. Keep the shared generators unchanged and add deterministic guard-count and Coin-width boundary cases. Use cabal-cache 0.0.1.1 to avoid redundant saves after exact restores. Document the reduced random sample count in the maintenance fragment.
carbolymer
force-pushed
the
mgalazyn/feature/haskell-ci-performance
branch
from
October 29, 2026 15:44
4922c41 to
4de7e7d
Compare
This branch has not been deployed
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
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.
Context
Detailed Haddock and changelog explanation prepared locally at
4de7e7daf; awaiting push.This halves the random codec sample count from 400 to 200. The original generators and the 0–99 size range remain, but the previous statistical coverage is not preserved.
Reducing the random sample count lowers the chance of detecting rare serialisation regressions, including bugs triggered by unusual combinations of transaction fields. Regressions that the larger sample would catch may pass CI. The fixed boundary inputs do not compensate for the reduced chance of finding bugs in other transactions.
Run each of the four independent SubTx codec properties for 50 trials. Map Hedgehog sizes 0–49 to
floor(99 * size / 49), capped at 99, so the 50 sampled sizes span 0–99. These are not the original size distribution or the same original samples. The shared generators and package dependencies match the baseline; signing and other properties remain unchanged.Add two deterministic guard-count cases and one deterministic Coin case that iterates ten donation amounts. The inputs target these exact encoding changes:
Each input checks the actual guard count and donation value, then all four signed/unsigned CBOR and TextEnvelope roundtrips. These are roundtrip fixtures, with no independent golden-byte or ledger-validity assertion. They do not replace the 200 removed random trials.
Update the Cabal cache action to
cabal-cache-0.0.1.1, which skips saving after an exact cache hit.How to trust this PR
Local measurements with GHC 9.6.7:
The SubTx rows compare the original four 100-trial properties with the revised four 50-trial properties plus the three deterministic unit tests. Each targeted before/after pair uses the same replay seed, one test thread, one RTS capability and CPU affinity 0–1. Compiler and external dependency derivations match the baseline. The full-suite before/after pair also uses an identical replay seed, with four test threads and four capabilities per suite and CPU affinity 0–3.
All 347 API tests and 171 RPC tests passed. Measurements exclude builds and setup; no GitHub workflow duration was measured.
Checklist
.changes/