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

Update dependencies #2149

Merged
merged 3 commits into from
Dec 2, 2020
Merged

Update dependencies #2149

merged 3 commits into from
Dec 2, 2020

Conversation

Copy link
Contributor Author

@mrBliss mrBliss left a comment

Choose a reason for hiding this comment

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

Draft because there are still some ledger changes that have to be propagated to the API.

@@ -182,7 +182,6 @@ constraints:
-- systemd-2.3.0 requires at least network 3.1.1.0 but it doesn't declare
-- that dependency
, network >= 3.1.1.0
, streaming-bytestring < 0.1.7
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No longer needed 🙂

Comment on lines 161 to 174
-- TODO: Could not deduce: Cardano.Ledger.Core.Metadata ledgerera ~ Shelley.MetaData
--
-- The ledger has turned Metadata in a type family.
-- 'TxMetadata' is a newtype around 'Shelley.MetaData', which is what the type
-- family instance Core.Metadata (ShelleyEra c) will reduce to.
--
-- The result type of this function is parametric in @ledgerera@ (btw, why not
-- @ledgerEra@? @ledgerera@ is confusing to read and write), while the
-- 'TxMetadata' is specific to the Shelley era. This can no longer remain the
-- case. Either the result type must be fixed to the Shelley era or the
-- 'TxMetadata' type must be generalised to any era (the right thing to do IMO).
toShelleyMetadataHash :: () -- TODO Shelley.ValidateMetadata ledgerera
=> TxMetadata -> Shelley.MetaDataHash ledgerera
toShelleyMetadataHash (TxMetadataShelley m) = Shelley.hashMetaData m
toShelleyMetadataHash = undefined -- (TxMetadataShelley m) = Shelley.hashMetadata m
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can somebody from the node cli team take care of this? There are more type errors because of this change.

@dcoutts dcoutts force-pushed the mrBliss/update-dependencies-20201201 branch from d882f3a to e1178ac Compare December 1, 2020 15:29
@dcoutts dcoutts marked this pull request as ready for review December 1, 2020 15:41
@dcoutts dcoutts force-pushed the mrBliss/update-dependencies-20201201 branch from 2779d9e to a6829f3 Compare December 1, 2020 19:11
@dcoutts
Copy link
Contributor

dcoutts commented Dec 1, 2020

bors merge

iohk-bors bot added a commit that referenced this pull request Dec 1, 2020
2149: Update dependencies r=dcoutts a=mrBliss

Visible changes:
* IntersectMBO/cardano-ledger#1993
* IntersectMBO/cardano-ledger#2021

Co-authored-by: Thomas Winant <thomas@well-typed.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 1, 2020

Build failed:

@intricate intricate force-pushed the mrBliss/update-dependencies-20201201 branch from a2742cd to 31e4fe4 Compare December 1, 2020 22:58
Copy link
Contributor

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

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

Generator changes look fine.

mrBliss and others added 3 commits December 1, 2020 23:12
Visible changes:
* IntersectMBO/cardano-ledger#1993
* IntersectMBO/cardano-ledger#2021

One of the changes in Allegra over Shelley is the notion of transaction
auxiliary data. We retrospectively define tx metadata to be part of the
auxiliary data where in the Shelley era this consists only of the
existing tx metadata.

But from the Allegra era the auxiliary data contains both the tx
metadata and also auxiliary scripts. So where we previously hashed the
tx metadata, we now hash the auxiliary data.

Take the opportunity to refactor the tx metadata representation and
conversion functions to fit better with the new scheme.

Also take the opportunity to tidy up the imports in the Query module
since we have some very similarly-named type classes.

Co-authored-by: Duncan Coutts <duncan@well-typed.com>
Doing a number of TODOs.

The tests were generating invalid tx bodies, e.g. with negative tx outs,
which ought to be caught by the validation in the API rather than in the
ledger serialisation.

This does not yet adjust the generators to make only valid tx bodies.
@dcoutts dcoutts force-pushed the mrBliss/update-dependencies-20201201 branch from 31e4fe4 to 52092c9 Compare December 1, 2020 23:13
@dcoutts
Copy link
Contributor

dcoutts commented Dec 1, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 2, 2020

@iohk-bors iohk-bors bot merged commit 99023c9 into master Dec 2, 2020
@iohk-bors iohk-bors bot deleted the mrBliss/update-dependencies-20201201 branch December 2, 2020 00:21
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.

None yet

3 participants