IntersectMBO / IntersectMBO/cardano-ledger
Move `ConwayTreasuryValueMismatch` into `UTXO` rule
- Dominant language
- Haskell
- Stars
- 295
- Forks
- 179
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 29
Description
Placing `ConwayTreasuryValueMismatch` was suboptimal for two reasons:
* [Formal spec places it into the `UTXO` rule, instead of `LEDGER`](https://github.com/IntersectMBO/formal-ledger-specifications/blob/155d8808fec4bc0d5fd17562fe32f9b7f46c970a/src/Ledger/Utxo.lagda#L466)
* Monetary checks like these really do belong in UTXO rules morally
* `ConwayTreasuryValueMismatch` predicate is not checked for phase2 invalid transactions. This is not a danger by any means, since we always initially assume all transactions are phase2 valid, until proven otherwis. Therefore such transaction will always be rejected from mempool regardless of the flag. But, even if it wasn't rejected for a phase2 invalid transaction, we already allow many parts of phase2 invalid transactions to be contain phase1 inconsistencies. That being said, conformance tests are likely to be affected.
Contributor guide
Research direction
Start by comparing the current placement of ConwayTreasuryValueMismatch with the formal specification's Utxo.lagda UTXO rule at the linked location. Locate the predicate and affected conformance tests, then verify it is handled under UTXO rather than LEDGER, including the noted phase2-invalid transaction behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100