-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify
CardanoHardForkTriggers
(#1282)
Closes #1281 Instead of letting the user provide several `TriggerHardFork`s, only let them provide `CardanoHardForkTrigger`s, a restricted version that should make `protocolInfoCardano` more straightforward and less error-prone. ```haskell data CardanoHardForkTrigger blk = -- | Trigger the hard fork when the ledger protocol version is updated to -- the default for that era (@'L.eraProtVerLow' \@('ShelleyBlockLedgerEra' -- blk)@). Also see 'TriggerHardForkAtVersion'. CardanoTriggerHardForkAtDefaultVersion | -- | Trigger the hard fork at the given epoch. For testing only. Also see -- 'TriggerHardForkAtEpoch'. CardanoTriggerHardForkAtEpoch EpochNo ``` It is (intentionally) no longer possible to directly (though still manually, also see the changelog entry) to use a non-default version trigger. However, this feature was used in the Cardano ThreadNet test (as Byron had an intra-era HF), which we resolve by modifying the initial Byron protocol version (see the corresponding Haddocks). In the node, this will result in the removal of the (unused) `TestXxxHardForkAtVersion` config fields.
- Loading branch information
Showing
10 changed files
with
167 additions
and
249 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...ensus-cardano/changelog.d/20241014_170244_alexander.esgen_cardano_hf_trigger.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
### Breaking | ||
|
||
- Changed `CardanoHardTriggers` to contain `CardanoHardForkTrigger`s which are a | ||
simpler version of the previous `TriggerHardForkAt`. In particular, this will | ||
affect call sites of `protocolInfoCardano`. | ||
|
||
Migration notes: | ||
|
||
- Change `TriggerHardForkAtEpoch` to `CardanoTriggerHardForkAtEpoch`. | ||
- Change `TriggerHardForkAtVersion` to `CardanoTriggerHardForkAtDefaultVersion`. | ||
|
||
This constructor does not take a version argument, but rather defaults to | ||
the corresponding first ledger protocol version. We are not aware of any | ||
use case that requires a different value, but if there is, it is still | ||
possible to manually modify the returned `LedgerConfig`s of | ||
`protocolInfoCardano` directly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.