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

UTxO-HD targeting main #6068

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

UTxO-HD targeting main #6068

wants to merge 18 commits into from

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 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
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.

@@ -302,20 +299,9 @@ findAllUtxos
-> ShelleyBasedEra era
-> 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants