Skip to content

Conversation

@jasagredo
Copy link
Contributor

@jasagredo jasagredo commented Jan 9, 2025

Description

Implements the changes required for UTxO-HD Consensus feature. See the documentation for an extensive explanation on what changed and the implications.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

@jasagredo jasagredo requested a review from a team January 9, 2025 12:05
@jasagredo jasagredo requested review from a team as code owners January 9, 2025 12:05
@jasagredo jasagredo mentioned this pull request Jan 9, 2025
9 tasks
@jasagredo jasagredo force-pushed the utxo-hd-main branch 4 times, most recently from ea5ecaa to af2e523 Compare January 10, 2025 15:56
npcTestAlonzoHardForkAtEpoch,
npcTestAlonzoHardForkAtVersion,
npcTestBabbageHardForkAtEpoch,
npcTestBabbageHardForkAtVersion,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Nothing -> Consensus.TriggerHardForkAtVersion
(maybe 4 fromIntegral npcTestMaryHardForkAtVersion)
Just epochNo -> Consensus.TriggerHardForkAtEpoch epochNo
Nothing -> Consensus.CardanoTriggerHardForkAtDefaultVersion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can abstract this out as a function but this is not a blocker.

"Praos"
-> pure $ NodeConsensusMode PraosMode
_ -> fail "Parsing NodeConsensusMode failed: can be either 'Genesis' or 'Praos'"
parseJSON _ = fail "Parsing NodeConsensusMode failed"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning the unexpected JSON will help with debugging.

-> m (Map TxIn (TxOut CtxUTxO era))
findAllUtxos epochStateView sbe = withFrozenCallStack $ do
AnyNewEpochState sbe' newEpochState <- getEpochState epochStateView
AnyNewEpochState sbe' _ tbs <- getEpochState epochStateView
Copy link
Contributor

@Jimbo4350 Jimbo4350 Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasagredo jasagredo force-pushed the utxo-hd-main branch 3 times, most recently from fcd6d20 to f99dd7f Compare January 13, 2025 09:28
@jasagredo jasagredo force-pushed the utxo-hd-main branch 2 times, most recently from 4f66f3a to 6844b37 Compare January 21, 2025 16:10
@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale label Apr 27, 2025
@jasagredo jasagredo closed this Apr 28, 2025
@jasagredo jasagredo deleted the utxo-hd-main branch April 28, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants