Remove era prefix from rule names#5859
Conversation
- `ShelleyBBODY` -> `BBODY` - `ShelleyDELEG` -> `DELEG` - `ShelleyDELEGS` -> `DELEGS` - `ShelleyDELPL` -> `DELPL` - `ShelleyEPOCH` -> `EPOCH` - `ShelleyLEDGER` -> `LEDGER` - `ShelleyLEDGERS` -> `LEDGERS` - `ShelleyMIR` -> `MIR` - `ShelleyNEWEPOCH` -> `NEWEPOCH` - `ShelleyNEWPP` -> `NEWPP` - `ShelleyPOOL` -> `POOL` - `ShelleyPOOLREAP` -> `POOLREAP` - `ShelleyPPUP` -> `PPUP` - `ShelleyRUPD` -> `RUPD` - `ShelleySNAP` -> `SNAP` - `ShelleyTICK` -> `TICK` - `ShelleyTICKF` -> `TICKF` - `ShelleyUPEC` -> `UPEC` - `ShelleyUTXO` -> `UTXO` - `ShelleyUTXOW` -> `UTXOW`
- `AllegraUTXO` -> `UTXO` - `AllegraUTXOW` -> `UTXOW`
- `AlonzoBBODY` -> `BBODY` - `AlonzoLEDGER` -> `LEDGER` - `AlonzoUTXO` -> `UTXO` - `AlonzoUTXOS` -> `UTXOS` - `AlonzoUTXOW` -> `UTXOW`
- `BabbageLEDGER` -> `LEDGER` - `BabbageUTXO` -> `UTXO` - `BabbageUTXOS` -> `UTXOS` - `BabbageUTXOW` -> `UTXOW`
- `ConwayBBODY` -> `BBODY` - `ConwayCERT` -> `CERT` - `ConwayCERTS` -> `CERTS` - `ConwayDELEG` -> `DELEG` - `ConwayENACT` -> `ENACT` - `ConwayEPOCH` -> `EPOCH` - `ConwayGOV` -> `GOV` - `ConwayGOVCERT` -> `GOVCERT` - `ConwayHARDFORK` -> `HARDFORK` - `ConwayLEDGER` -> `LEDGER` - `ConwayMEMPOOL` -> `MEMPOOL` - `ConwayNEWEPOCH` -> `NEWEPOCH` - `ConwayRATIFY` -> `RATIFY` - `ConwayTICKF` -> `TICKF` - `ConwayUTXO` -> `UTXO` - `ConwayUTXOS` -> `UTXOS` - `ConwayUTXOW` -> `UTXOW`
- `DijkstraBBODY` -> `BBODY` - `DijkstraCERT` -> `CERT` - `DijkstraGOV` -> `GOV` - `DijkstraGOVCERT` -> `GOVCERT` - `DijkstraLEDGER` -> `LEDGER` - `DijkstraMEMPOOL` -> `MEMPOOL` - `DijkstraSUBCERT` -> `SUBCERT` - `DijkstraSUBCERTS` -> `SUBCERTS` - `DijkstraSUBDELEG` -> `SUBDELEG` - `DijkstraSUBGOV` -> `SUBGOV` - `DijkstraSUBGOVCERT` -> `SUBGOVCERT` - `DijkstraSUBLEDGER` -> `SUBLEDGER` - `DijkstraSUBLEDGERS` -> `SUBLEDGERS` - `DijkstraSUBPOOL` -> `SUBPOOL` - `DijkstraSUBUTXO` -> `SUBUTXO` - `DijkstraSUBUTXOW` -> `SUBUTXOW` - `DijkstraUTXO` -> `UTXO` - `DijkstraUTXOW` -> `UTXOW`
08e8177 to
53e0586
Compare
| tellEvent $ TotalAdaPotsEvent adaPots | ||
| let pd' = ssStakeMarkPoolDistr (esSnapshots es0) | ||
| -- See `ShelleyNEWEPOCH` for details on the implementation | ||
| -- See `NEWEPOCH` for details on the implementation |
There was a problem hiding this comment.
"See Shelley NEWEPOCH..."
There was a problem hiding this comment.
| -- See `NEWEPOCH` for details on the implementation | |
| -- See `Shelley.NEWEPOCH` for details on the implementation |
| import Cardano.Ledger.Babbage.Rules ( | ||
| BabbageUTXO, | ||
| BabbageUtxoPredFailure (..), | ||
| UTXO, | ||
| babbageEvalScriptsTxInvalid, | ||
| expectScriptsToPass, | ||
| ) |
There was a problem hiding this comment.
I guess we should qualify this import as Babbage, right?
There was a problem hiding this comment.
Yes, somehow this snuck in without qualification.
|
Although the ticket suggests that the changes should be carried out in 3 commits, I decided to do 2 commits per era (1 for the renames and 1 for the deprecation helper additions) and one separate commit for the |
lehins
left a comment
There was a problem hiding this comment.
Looks good. Couple of minor suggestions
| import Cardano.Ledger.Babbage.Rules ( | ||
| BabbageUTXO, | ||
| BabbageUtxoPredFailure (..), | ||
| UTXO, | ||
| babbageEvalScriptsTxInvalid, | ||
| expectScriptsToPass, | ||
| ) |
There was a problem hiding this comment.
Yes, somehow this snuck in without qualification.
| tellEvent $ TotalAdaPotsEvent adaPots | ||
| let pd' = ssStakeMarkPoolDistr (esSnapshots es0) | ||
| -- See `ShelleyNEWEPOCH` for details on the implementation | ||
| -- See `NEWEPOCH` for details on the implementation |
There was a problem hiding this comment.
| -- See `NEWEPOCH` for details on the implementation | |
| -- See `Shelley.NEWEPOCH` for details on the implementation |
| data UTXO era | ||
|
|
||
| type AlonzoUTXO = UTXO | ||
|
|
There was a problem hiding this comment.
There should be no newline between deprecation pragma and the type
| import Cardano.Ledger.Shelley.Rules.Deleg as X (DELEG, DelegEnv (..)) | ||
| import Cardano.Ledger.Shelley.Rules.Delegs as X (DELEGS, DelegsEnv (..)) | ||
| import Cardano.Ledger.Shelley.Rules.Delpl as X (DELPL, DelplEnv (..)) | ||
| import Cardano.Ledger.Shelley.Rules.Ledger as X (LEDGER, LedgerEnv (..)) | ||
| import Cardano.Ledger.Shelley.Rules.Ledgers as X (LEDGERS, ShelleyLedgersEnv (..)) | ||
| import Cardano.Ledger.Shelley.Rules.NewEpoch as X (NEWEPOCH) | ||
| import Cardano.Ledger.Shelley.Rules.Pool as X (POOL, PoolEnv (..)) | ||
| import Cardano.Ledger.Shelley.Rules.PoolReap as X (POOLREAP) | ||
| import Cardano.Ledger.Shelley.Rules.Ppup as X (PPUP, PpupEnv (..)) |
There was a problem hiding this comment.
Do not rename re-exports in this module. We want to re-export old deprecated names from here, not the new ones. That's because Cardano.Ledger.Shelley.API will eventually be removed.
This will force you change imports in some other places, which is exactly what we want.
Description
Resolves #5831
Checklist
CHANGELOG.mdfiles updated for packages with externally visible changes.NOTE: New section is never added with the code changes. (See RELEASING.md).
.cabalandCHANGELOG.mdfiles when necessary, according to theversioning process.
.cabalfiles updated when necessary.NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
scripts/fourmolize.sh).scripts/cabal-format.sh).scripts/gen-cddl.sh)hie.yamlupdated (usescripts/gen-hie.sh).