Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cardano-testnet/cardano-testnet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ library
Parsers.Run
Testnet.Blockfrost
Testnet.Components.Configuration
Testnet.Components.EpochStateView
Testnet.Components.Query
Testnet.Defaults
Testnet.EpochStateProcessing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Maintenance

- Unified retry/wait functions in `Testnet.Components.Query` by factoring out a common `retryUntilRightM` core.
`retryUntilJustM` and `retryUntilM` are now thin wrappers over this shared primitive, eliminating duplicated timeout/polling logic.
- Removed `watchEpochStateUpdate` and migrated all call sites to `retryUntilJustM`/`retryUntilM`.
- Simplified `waitForBlocks` (dropped `MonadCatch` constraint, eliminated `EpochInterval maxBound` hack).
Now mirrors `waitForEpochs`: relies solely on the shared retry loop's timeout instead of an outer block-count predicate, avoiding the drift between two independent snapshots of the starting block number.
- Simplified `checkDRepState` by replacing direct `foldEpochState` usage with `EpochStateView` polling.
- Simplified `assertNewEpochState` by replacing `watchEpochStateUpdate` with `retryUntilRightM`.
- Removed unused `nodeConfigPath` and `socketPath` fields from `EpochStateView`.
- Added `maybeExtractGovernanceActionExpiry` in `Testnet.EpochStateProcessing`, which reads a proposal's `gasExpiresAfter` epoch from the gov state.
- Rewrote the `Gov Action Timeout` integration test to derive its wait target from the proposal's actual expiry epoch, removing the race window caused by not knowing which epoch the proposal was recorded in.
The check now waits one full epoch past the removal boundary so the RATIFY-produced state is @k@-deep stable and cannot be invalidated by a chain rollback.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Maintenance

- Retries in `EpochStateView` wake immediately on each epoch state update instead of polling.
Multiple threads waiting on the same view wake up together.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Maintenance

- Extracted `EpochStateView` and its retry loops from `Testnet.Components.Query`
into a new module `Testnet.Components.EpochStateView` with a haddock overview
of how the writer thread, version counter, and STM-based wait primitive fit
together. `Testnet.Components.Query` re-exports the public API so existing
callers are unaffected.
1 change: 1 addition & 0 deletions cardano-testnet/src/Cardano/Testnet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module Cardano.Testnet (

-- * EpochState processsing helper functions
maybeExtractGovernanceActionIndex,
maybeExtractGovernanceActionExpiry,

-- * Processes
procChairman,
Expand Down
Loading
Loading