Adjust the constrained-generators to precisely capture exact structural and interrelational requirements for inputs, only. Remember that the conformance tests should allow all inputs that do and do not result in PredicateFailures, so that the implementation and specification agree on when to pass and when to fail, identically.
Review by a team member other than the one who adjusted the generators. The reviewer should pay particular attention to whether the generators are over constrained and also whether the translations are omitting something important.
Everything under src/Ledger/Foreign/ is important, it pays to be
familiar with it, as all the intermediate data-types and rule-runners
are defined there. The translations import the common data types qualified
under an `F` for Foreign.
AGDA
-------------- conformsToImpl: read and understand -----------------------------
HASKELL
In each of our haskell modules, mostly,
we import
from cardano-ledger-executable-spec
- module `Lib` qualified under the name `Agda`
- This gives us the intermediate/common data-types that we need to
translate our Haskell types to
from constrained-generators
- module `Constrained` to use the constrained generators framework
- This is just to generate the values to run the tests
from cardano-ledger-conformance
- module `Test.Cardano.Ledger.Conformance` for the classes we need to
make instances for
- class ExecSpecRule
- Implement everything you need by understanding the data
dependencies between the env, state and signal for a given rule
- class SpecTranslate
- Implement the translations from Haskell data types to
Agda/intermediate/common data-types
- These classes form the test framework that we should write our
conformance tests using
from cardano-ledger-test
- module `Test.Cardano.Ledger.Constrained.Conway`
- to get the constrained generators already written by
@Max for most of the rules
Tracking issue for Conway conformance
Here we attempt to consolidate coverage for all testable rule transitions, starting from the "leaves" of the transition graph.
For each of the rules below, we should follow these steps:
xprop
,xit
,xdescribe
, etc.PredicateFailure
s, so that the implementation and specification agree on when to pass and when to fail, identically.The "levels" are ordered by their dependencies.
Some more
TODO
are captured here https://github.com/IntersectMBO/cardano-ledger/issues/3914, but we can use this issue to track them all. Please feel free to edit this issue to keep it up-to-date.Blocks branch
Level 1
DELEG
GOVCERT
POOL
Level 2
CERT
CERTS
GOV
Level 3
UTXOS
UTXO
(babbage)UTXOW
(babbage)Level 4
LEDGER
https://github.com/IntersectMBO/cardano-ledger/issues/4380Ticks branch
Level 1ENACT
PlumbingTranslateAdjustReviewPOOLREAP
(shelley)PlumbingTranslateAdjustReviewSNAP
(shelley)PlumbingTranslateAdjustqReviewLevel 2
RATIFY
Level 3
EPOCH
#4381Level 4
NEWEPOCH
https://github.com/IntersectMBO/cardano-ledger/issues/4379How-to