IntersectMBO / IntersectMBO/cardano-ledger

Increase test-coverage for queries

Open
#5,722 1 comment 0 reactions 0 assignees View on GitHub
:credit_card: technical-debt :detective: testing :slot_machine: property test cddl ledger-state-query maintenance serialization
Dominant language
Haskell
Stars
295
Forks
179
Avg merge
4d 7h
Merged PRs (30d)
29

Description

- [ ] `cuddle` tests with `antigen`.
- [ ] `ImpTests` for all query functions, especially those requiring accumulated state: `queryCurrentPParams`, `queryFuturePParams`, `queryRatifyState`, `queryProposals`, `queryStakePoolDefaultVote`, `queryGovState`, `queryConstitution`, `queryConstitutionHash`, `queryChainAccountState`, `queryDRepStakeDistr`, `queryRegisteredDRepStakeDistr`, `querySPOStakeDistr`, `queryStakePoolDelegsAndRewards`, `queryPoolState`, `queryPoolParameters`.
- [ ] Test queries before and after epoch transitions, especially `queryFuturePParams`, `queryStakeSnapshots` (`mark`, `set`, `go` rotation), and `queryCommitteeMembersState` (`NextEpochChange` predictions).
- [ ] Property tests (extraction + consistency): Add `QuickCheck` properties verifying each query extracts the correct subset of `NewEpochState`, following the patterns in `queryStakeSnapshotsSpec` and `committeeMembersStateSpec` in `Test.Cardano.Ledger.Api.State.QuerySpec`. Include cross-query consistency checks (e.g. `queryPoolState` restricted to current params should agree with `queryPoolParameters`).
- [ ] ~~Verify era-polymorphic queries produce correct results across Shelley through Dijkstra, not just Conway+Dijkstra.~~

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.