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 #719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

UTxO-HD targeting main #719

wants to merge 1 commit into from

Conversation

jasagredo
Copy link
Contributor

@jasagredo jasagredo commented Jan 9, 2025

Changelog

- description: |
    Implement the changes required for UTxO-HD. See the documentation https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/Overview.
    - Augment `Cardano.Api.LedgerState.LedgerState` with Cardano `LedgerTables`.
    - Require `SingI` for `QueryFootprint`s in Consensus queries
# uncomment types applicable to the change:
  type:
  - feature        # introduces a new feature
  - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Integrates the UTxO-HD changes in cardano-api. See the documentation for an extensive discussion on what the changes are and their implications.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@@ -2200,7 +2391,7 @@ foldEpochState nodeConfigFilePath socketPath validationMode terminationEpoch ini
let !err = Just e
in clientIdle_DoneNwithMaybeError n err
Right lState -> do
let newEpochState = AnyNewEpochState sbe lState
let newEpochState = AnyNewEpochState sbe lState (clsTables newLedgerState)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will only return UTxOs in memory correct? I.e there may be UTxOs on disk that will not be returned in newEpochState.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cardano.Api.LedgerState.LedgerState is a purely in-memory ledger state. There are no UTxOs on the disk. If we were to have UTxOs on disk, we would have to have a LedgerDB that takes care of managing that disk storage. foldEpochState carries a single LedgerState thus the decision of making it in-memory.

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.

2 participants