Repository navigation
Conversation
| ShelleyLedgerEra MaryEra = Consensus.StandardMary | ||
| ShelleyLedgerEra AlonzoEra = Consensus.StandardAlonzo | ||
| ShelleyLedgerEra BabbageEra = Consensus.StandardBabbage | ||
| ShelleyLedgerEra ConwayEra = Consensus.StandardConway |
There was a problem hiding this comment.
Delete this. Use LedgerEra instead.
| LedgerEra MaryEra = L.MaryEra L.StandardCrypto | ||
| LedgerEra AlonzoEra = L.AlonzoEra L.StandardCrypto | ||
| LedgerEra BabbageEra = L.BabbageEra L.StandardCrypto | ||
| LedgerEra ConwayEra = L.ConwayEra L.StandardCrypto |
There was a problem hiding this comment.
Rename CardanoLedgerEra which is never used to LedgerEra which we use everywhere in place of ShelleyLedgerEra.
There was a problem hiding this comment.
I think the change is pretty harmless, but can you check if anything breaks in cardano-cli?
There was a problem hiding this comment.
Yep. Already checked.
22599ef to
2c209ce
Compare
There was a problem hiding this comment.
This is not the direction we are taking cardano-api in. We do not care about all the eras, only mainnet and the upcoming era. The first step in this is to factor out the Byron era and only be concerned with shelley based eras. Consolidating the shelley based eras with cardano eras is moving in the wrong direction and prolongs this eventual separation.
|
It's worth noting that this PR doesn't commit us to a particular direction. On it's own it serves as a straightforward simplification. with the only impact on the rest of the code being a rename to a shorter one and removing a type we don't use anywhere. |
2c209ce to
7f48bfa
Compare
|
What type is Byron type is being implied that doesn't exist? |
Changelog
Context
We previously defined two separate type families
ShelleyLedgerEraandCardanoLedgerErabut never useCardanoLedgerEraanywhere.ShelleyLedgerErais basically the same asCardanoLedgerEraexcept Byron is missing.There is no reason to have two type families because
CardanoLedgerEraworks everywhereShelleyLedgerEracurrently does.This PR merges the two type families into the one
LedgerEratype family (which includes Byron) which shortens the commonly used name.Doing this opens the possibility of unifying Byron with the other eras for the minimal set of operations we care to maintain for hard forking purposes.
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behaviour, describe them.
Checklist