-
Notifications
You must be signed in to change notification settings - Fork 86
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
Allow skipping a prefix of the eras in Cardano mode #2811
Merged
Merged
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
mrBliss
commented
Dec 14, 2020
ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Node.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Node.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Node.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Node.hs
Outdated
Show resolved
Hide resolved
Introduce and use the new `injectInitialExtLedgerState` function that will execute all hard forks scheduled at epoch 0 using `TriggerHardForkAtEpoch`. The initial ledger state will then be in the right era. This allows a node to skip one or more initial eras. For example, this can be used to let a Cardano node start from the Shelley, Allegra, or Mary era.
Previously, the HFC would initialise the ChainDB using the first era's initialisation method. This meant that we always try to add a Byron genesis EBB. When one or more hard forks are statically configured to take place at the start, we would add a Byron EBB while already in the Shelley, Allegra, or Mary era. The Byron EBB would be considered an invalid block and our ThreadNet tests would fail and report the unexpected block rejection. Instead of using the first era's method to initialise the ChainDB, we now use the current era's method. When starting in Shelley, Allegra, or Mary, we won't try to add the invalid Byron EBB. To make this possible, we replace the `addBlockIfEmpty` method of `InitChainDB` with `addBlock` and `getCurrentLedger`. The latter is used to determine the current era. We lose the `Contravariant` instance, but add a custom `map` function in its place.
mrBliss
force-pushed
the
mrBliss/skippable-first-eras
branch
2 times, most recently
from
December 14, 2020 18:08
653521e
to
40ff99c
Compare
mrBliss
commented
Dec 15, 2020
ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Node.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Node.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Node.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Node.hs
Outdated
Show resolved
Hide resolved
edsko
approved these changes
Dec 15, 2020
deepfire
approved these changes
Dec 15, 2020
So that we can reuse it elsewhere.
When the initial ledger state of Cardano mode is not in the Byron era, register the initial staking and initial funds (if provided in the genesis config) in the ledger state. This will only happen when configured to skip the Byron era and hard fork immediately to Shelley or a later era using `TriggerHardForkAtEpoch 0`.
mrBliss
force-pushed
the
mrBliss/skippable-first-eras
branch
from
December 15, 2020 10:31
40ff99c
to
e54cc01
Compare
bors merge |
Build succeeded: |
17 tasks
mrBliss
added a commit
that referenced
this pull request
Dec 22, 2020
`ProtocolCardano` can now be used by the benchmarking team instead, after the last commit and #2811.
mrBliss
added a commit
that referenced
this pull request
Dec 22, 2020
`ProtocolCardano` can now be used by the benchmarking team instead, after the last commit and #2811.
mrBliss
added a commit
that referenced
this pull request
Dec 22, 2020
`ProtocolCardano` can now be used by the benchmarking team instead, after the last commit and #2811.
mrBliss
added a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 12, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832
mrBliss
added a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 12, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832
coot
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 13, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 17, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 17, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 17, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 17, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
erikd
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 18, 2021
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
iohk-bors bot
added a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Jan 19, 2021
2274: Update dependencies r=kderme a=mrBliss Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 Co-authored-by: Thomas Winant <thomas@well-typed.com> Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
newhoggy
pushed a commit
to IntersectMBO/cardano-api
that referenced
this pull request
May 23, 2023
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
newhoggy
pushed a commit
to IntersectMBO/cardano-cli
that referenced
this pull request
May 24, 2023
Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 network tracers: moved ToObject TxSubmission instance network tracers: added ToObjcet TxSubmission2 instance Update cabal.project index-state value
newhoggy
pushed a commit
to IntersectMBO/cardano-cli
that referenced
this pull request
May 24, 2023
2274: Update dependencies r=kderme a=mrBliss Note that this does not incorporate the latest changes in cardano-ledger-specs. Notable changes: * IntersectMBO/ouroboros-network#2807 * IntersectMBO/ouroboros-network#2811 * IntersectMBO/ouroboros-network#2832 Co-authored-by: Thomas Winant <thomas@well-typed.com> Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
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.
Add support for immediately executing one or more hard forks during initialisation, when configured using
TriggerHardForkAtEpoch 0
. This will allow starting a node in Cardano mode directly in the Shelley, Allegra, or Mary era without having to spend an epoch in each preceding era.For example, to start a Cardano node in the Mary era, add the following to your
cardano-node
configuration:Registering initial staking and funds is also allowed in Cardano mode, but will only take effect if configured to skip at least the Byron era.