Skip to content

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.

@amesgen amesgen self-assigned this Oct 14, 2024
@amesgen amesgen force-pushed the amesgen/cardano-hf-trigger branch from fdcd2e4 to 56c2ae8 Compare October 14, 2024 15:20
see the PR and issue description for details
@amesgen amesgen force-pushed the amesgen/cardano-hf-trigger branch from 56c2ae8 to c600f30 Compare October 15, 2024 08:19
@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