Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify CardanoHardForkTriggers #1282

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Simplify CardanoHardForkTriggers #1282

merged 1 commit into from
Oct 16, 2024

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Oct 14, 2024

Closes #1281

Instead of letting the user provide several TriggerHardForks, only let them provide CardanoHardForkTriggers, a restricted version that should make protocolInfoCardano more straightforward and less error-prone.

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.

see the PR and issue description for details
@amesgen amesgen added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 3b8f972 Oct 16, 2024
20 checks passed
@amesgen amesgen deleted the amesgen/cardano-hf-trigger branch October 16, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

protocolInfoCardano: only allow to change the TriggerHardForkAtEpoch HF trigger
2 participants