-
Notifications
You must be signed in to change notification settings - Fork 156
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
Implement EraTransition #3737
Merged
Merged
Implement EraTransition #3737
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e18b499
to
a2e0c5f
Compare
89a81dd
to
cf0db87
Compare
aniketd
reviewed
Sep 20, 2023
aniketd
reviewed
Sep 20, 2023
aniketd
reviewed
Sep 20, 2023
aniketd
reviewed
Sep 20, 2023
aniketd
reviewed
Sep 20, 2023
teodanciu
reviewed
Sep 20, 2023
teodanciu
reviewed
Sep 20, 2023
teodanciu
reviewed
Sep 20, 2023
aniketd
approved these changes
Sep 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🙌
ea5e4f3
to
37a86d9
Compare
* `EraTransition` type class can be used to deal with cumulative configuration necessary for getting to a particular era * It can also be used for testing and benchmarking to inject initial staking and funds into the initial state as well as fast forward the state into any era by translating it and upgrading PParams. This was done by migrating `registerInitialFunds` and `registerInitialStaking` functions from consensus: * Also additions to the `cardano-ledger-api`: * Add `LatestKnownEra` * Export `EraTransition` interface * Add `mkLatestTransitionConfig` that works for `LatestKnownEra`
8b1686d
to
38bc965
Compare
lehins
commented
Sep 22, 2023
amesgen
added a commit
to IntersectMBO/cardano-api
that referenced
this pull request
Sep 26, 2023
mostly propagating the new Ledger `TransitionConfig` concept, see IntersectMBO/cardano-ledger#3737
github-merge-queue bot
pushed a commit
to IntersectMBO/ouroboros-consensus
that referenced
this pull request
Sep 27, 2023
Next major ledger release should be soon-ish and will likely be not too different from what is being integrated here. - Most of the diff is due to integrating the new `TransitionConfig` concept from Ledger, see IntersectMBO/cardano-ledger#3737. - Every Shelley-based era `XEra c` has a `TransitionConfig (XEra c)` that contains all Genesis information up until this era. In particular, one can get all previous `TranslationContext`s and `TransitionConfig`s up until this era from it. - They can be used to register initial funds and staking (benchmarking features whose implementation has now been moved to Ledger), and to create initial Shelley ledger states for pure Shelley-based chains. - We could keep the current interface to `protocolInfoCardano` the same (by assembling a Conway `TransitionConfig` from the given `TranslationContext`s), but Ledger wants to push the construction of the `TransitionConfig` downwards to Node etc (eg in order to be able to add more information to it, or even consolidate all Genesis files into one). This also actually makes things easier on our end, as this allows us to simplify the `ProtocolTransitionParams`. - Ledger state serialization and the Conway Genesis file format changed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Era Transition defines all of the configuration that is needed to transition from Shelley to a current era.
EraTransition
type class can be used to deal with cumulativeconfiguration necessary for getting to a particular era
staking and funds into the initial state as well as fast forward the
state into any era by translating it and upgrading PParams.
This was done by migrating
registerInitialFunds
andregisterInitialStaking
functions from consensus:cardano-ledger-api
:LatestKnownEra
EraTransition
interfacemkLatestTransitionConfig
that works forLatestKnownEra
Fixes #3337
Checklist
.cabal
andCHANGELOG.md
files according to theversioning process.
.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)CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)