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

Add a function registerInState to EraTransition #4023

Conversation

dnadales
Copy link
Member

@dnadales dnadales commented Jan 29, 2024

... which allows to inject transition configuration data in the given NewEpochState.

This change allows the Ledger to define this logic in this component without needing to do it in the Consensus layer. In this way, we improve the separation of concerns.

Part of IntersectMBO/ouroboros-consensus#899

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@dnadales dnadales self-assigned this Jan 29, 2024
@dnadales dnadales requested a review from amesgen January 29, 2024 17:12
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Looks good so far. These changes totally make sense and I also agree with @amesgen comments.

@dnadales dnadales force-pushed the dnadales/consensus/899-factor-out-application-of-transition-config branch from 8ee3dda to 8aaffc5 Compare January 30, 2024 14:33
@dnadales dnadales marked this pull request as ready for review January 30, 2024 17:39
@dnadales dnadales force-pushed the dnadales/consensus/899-factor-out-application-of-transition-config branch from 3911457 to ff608c6 Compare January 30, 2024 17:42
@dnadales dnadales force-pushed the dnadales/consensus/899-factor-out-application-of-transition-config branch from ff608c6 to 6a85fc0 Compare January 31, 2024 10:39
@dnadales dnadales changed the title Add a new function registerInState to EraTransition Add a function registerInState to EraTransition Jan 31, 2024
@dnadales dnadales force-pushed the dnadales/consensus/899-factor-out-application-of-transition-config branch from 193254c to e36ed8f Compare January 31, 2024 12:37
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

PR looks great. Just some changelog entries and version+bounds adjustments.

Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Thank you!! This looks great.
Makes me happy to see improvements to this interface

dnadales and others added 6 commits January 31, 2024 18:23
... which allows to inject transition configuration data in the given
`NewEpochState`.

This change allows the Ledger to define this logic in this component
without needing to do it in the Consensus layer. In this way, we
improve the separation of concerns.
This allows the `ThreadNet` tests in Consensus to use
`injectIntoTestState` after creating the initial state.
... stating that no funds or delegates are registered by this function.
Functions `registerInitialFunds`, `registerInitialStaking`,
`registerInitialDReps`, and `registerDelegs` were used by the
Consensus code, which now relies on `injectIntoTestState`.
@lehins lehins force-pushed the dnadales/consensus/899-factor-out-application-of-transition-config branch from 105b848 to ba5a9dd Compare January 31, 2024 17:23
@lehins lehins enabled auto-merge January 31, 2024 17:23
@lehins lehins disabled auto-merge January 31, 2024 17:26
@lehins lehins enabled auto-merge (squash) January 31, 2024 17:28
@lehins lehins merged commit b05ba36 into master Jan 31, 2024
10 of 29 checks passed
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.

3 participants