-
Notifications
You must be signed in to change notification settings - Fork 87
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
Update to the newest ledger #4349
Conversation
2bac21b
to
aa8ec69
Compare
dc85175
to
85d20b3
Compare
ouroboros-consensus-cardano-tools/src/Cardano/Tools/DBAnalyser/Block/Cardano.hs
Show resolved
Hide resolved
9ad99e1
to
db06e19
Compare
db06e19
to
f8247e7
Compare
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.
I've reviewed this and while long, i don't see anything controversial. It's mainly adopting to the new pparams syntax and the changes to enc/Dec serialization functions for the versioned cbor. While i agree not touching the odd protver in tools is smart, please do open a GH issue to track the oddity so the team can fix it at a later date or clarify why the numbers vary in older eras.
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.
Thank you for the great PR description 🙌
LGTM. However, I can't answer @lehins 's questions.
ouroboros-consensus-cardano-test/src/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano-tools/src/Cardano/Node/Protocol/Cardano.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Node/TPraos.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Node/TPraos.hs
Show resolved
Hide resolved
ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/ShelleyHFC.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-test/test-consensus/Test/Consensus/BlockchainTime/Simple.hs
Show resolved
Hide resolved
4975d7a
to
8981498
Compare
dad1400
to
3214721
Compare
240bbf0
to
31a34a3
Compare
* Update iohk-nix sources to get latest `libsodium` needed for `cardano-crypto-praos` * Account for introduction of versioned CBOR in ledger. The new interface `EncCBOR`/`DecCBOR` is very similar to the plain `ToCBOR`/`FromCBOR`, with helper functions to go between them. * Remove usage of `MemoBytes` for `Header`, since `Header` cannot be parameterized on `era` and `MemoBytes` now requires it. * Account for addition of Shelley translation context: `FromByronTranslationContext` * Account for change of parametrization of `ShelleyGenesis` from `era` to `crypto` * Account for switch of `PParams` and other types from `HasFields` to lenses * Account for various fields getting renamed * Account for the fact that ConwayGenesis has to also include AlonzoGenesis fields, because otherwise `CanStartFromGenesis` can't work. We need to figure out the whole business of TranslationContext and Genesis, it is a bit messy right now IMHO. * Update golden tests, which were needed due to: * Fixes to PParams serialization * Changes of default protocol versions in emptyPParams in order eras * Fixes to test examples * Addition of a new field with deposits to the ledger state * Fix to `ExtLedgerState` serialization * Changes to Conway types * Remove some arbitrary instances (such as Slotting for example), since they are now imported from ledger. Notable instances are also `UTCTime` and `NominalDiffTime`, that now are imported from `quickcheck-instances`. In order to preserve older semantics standalone generators for those types were retained and used in `delayNextSlot` property test. Also guarded that against an "infinite" loop with `within`.
dc3c027
to
cb15887
Compare
bors r+ |
4349: Update to the newest ledger r=lehins a=lehins # Description Fixes invalid `ExtLedgerState` serialization. Produced CBOR encoding contained a list without a length, thus it was not decodable as arbitrary CBOR. Integration of latest `cardano-ledger` and `cardano-base`. * Update iohk-nix sources to get latest `libsodium` needed for `cardano-crypto-praos` * Account for introduction of versioned CBOR in ledger. The new interface `EncCBOR`/`DecCBOR` is very similar to the plain `ToCBOR`/`FromCBOR`, with helper functions to go between them. * Remove usage of `MemoBytes` for `Header`, since `Header` cannot be parameterized on `era` and `MemoBytes` now requires it. * Account for addition of Shelley translation context: `FromByronTranslationContext` * Account for change of parametrization of `ShelleyGenesis` from `era` to `crypto` * Account for switch of `PParams` and other types from `HasFields` to lenses * Account for various fields getting renamed * Account for the fact that ConwayGenesis has to also include AlonzoGenesis fields, because otherwise `CanStartFromGenesis` can't work. We need to figure out the whole business of TranslationContext and Genesis, it is a bit messy right now IMHO. * Update golden tests, which were needed due to: * Fixes to PParams serialization * Changes of default protocol versions in emptyPParams in order eras * Fixes to test examples * Addition of a new field with deposits to the ledger state * Fix to `ExtLedgerState` serialization * Changes to Conway types * Remove some arbitrary instances (such as Slotting for example), since they are now imported from ledger. Notable instances are also `UTCTime` and `NominalDiffTime`, that now are imported from `quickcheck-instances`. In order to preserve older semantics standalone generators for those types were retained and used in `delayNextSlot` property test. Also guarded that against an "infinite" loop with `within`. Blocked by IntersectMBO/cardano-ledger#3282 and CHaPS releases Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io> Co-authored-by: teodanciu <teodora.danciu@tweag.io>
Timed out. |
bors r+ |
IntersectMBO/ouroboros-network#4349 changed/fixed the encoding of `PParams`, which broke compatibility of older clients with Node 8.0. This PR restores compatibility, by making the en-/decoding version-dependent. See the commit message for some implementation details. Also, note how the golden files changed due to this PR: - Pre-Alonzo serialization did not change. - Alonzo and Babbage changed, but only for `CardanoNodeToClientVersion <= 10`; these are enabled by `NodeToClient <= 14`, which are the currently released node-to-client versions. - Note that no golden files changed for `CardanoNodeToClientVersion{11,12}` (which are enabled by `NodeToClientV_{15,16}`). `NodeToClientV_15` will be released in Node 8.1, and indeed, we want to use the new and fixed encoding when this version is negotiated.
Description
Fixes invalid
ExtLedgerState
serialization. Produced CBOR encoding contained a list without a length, thus it was not decodable as arbitrary CBOR.Integration of latest
cardano-ledger
andcardano-base
.libsodium
needed forcardano-crypto-praos
EncCBOR
/DecCBOR
is very similar to the plainToCBOR
/FromCBOR
, with helper functions to go between them.MemoBytes
forHeader
, sinceHeader
cannot be parameterized onera
andMemoBytes
now requires it.FromByronTranslationContext
ShelleyGenesis
fromera
tocrypto
PParams
and other types fromHasFields
to lensesCanStartFromGenesis
can't work. We need to figure out the whole business of TranslationContext and Genesis, it is a bit messy right now IMHO.ExtLedgerState
serializationUTCTime
andNominalDiffTime
, that now are imported fromquickcheck-instances
. In order to preserve older semantics standalone generators for those types were retained and used indelayNextSlot
property test. Also guarded that against an "infinite" loop withwithin
.Blocked by IntersectMBO/cardano-ledger#3282 and CHaPS releases
Checklist
changelog.d
directory created usingscriv
. If in doubt, see the Consensus release process.interface-CHANGELOG.md