IntersectMBO / IntersectMBO/formal-ledger-specifications

Conformance failure: delegate and unregister after a hardfork

Open
#1,249 0 comments 0 reactions 0 assignees View on GitHub
conformance era: conway
Dominant language
Agda
Stars
52
Forks
20
Avg merge
6d 14h
Merged PRs (30d)
7

Description

The test `/Conformance/Conway/Imp/DELEG/Delegate vote/Delegate vote and unregister after hardfork/` fails in conformance.

The failure seems to be caused by how the implementation and the specification update the protocol version.

In the specification, the EPOCH rule replaces the EnactState altogether by the EnactState contained in the RatifyState. In the implementation, however, seems that only part of the RatifyState is used. In particular, the protocol parameters are not taken from there. The relevant lines in the implementation are in [Cardano.Ledger.Conway.Epoch](https://github.com/IntersectMBO/cardano-ledger/blob/18e0b29ee45a1cde441d087038c6d1e456bc8ca0/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Epoch.hs#L318):

```haskell
-- Apply the values from the computed EnactState to the GovState
govState1 =
govState0
& cgsProposalsL .~ newProposals
& cgsCommitteeL .~ ensCommittee
& cgsConstitutionL .~ ensConstitution
& cgsCurPParamsL .~ nextEpochPParams govState0
& cgsPrevPParamsL .~ curPParams
& cgsFuturePParamsL .~ PotentialPParamsUpdate Nothing
```

Contributor guide

Open the contributing guide

Research direction

Start with the failing conformance test `/Conformance/Conway/Imp/DELEG/Delegate vote/Delegate vote and unregister after hardfork/`, then inspect `eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Epoch.hs` around line 318. Compare how the specification's EPOCH rule replaces EnactState with the RatifyState EnactState against how the implementation updates protocol parameters. Done means the conformance test passes with the implementation and specification applying the same protocol version update.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.