From 8f54f602a7967206791e09c185a421a311bbaa85 Mon Sep 17 00:00:00 2001 From: Thomas Winant Date: Wed, 17 Jun 2020 15:14:30 +0200 Subject: [PATCH] Bump dependency on cardano-ledger-specs after #1563 --- cabal.project | 40 +++++++++---------- .../src/Test/Consensus/Byron/Generators.hs | 17 ++++++++ .../ThreadNet/Infra/Byron/TrackUpdates.hs | 3 +- .../test/Test/Consensus/Byron/Golden.hs | 12 +++--- stack.yaml | 2 +- 5 files changed, 47 insertions(+), 27 deletions(-) diff --git a/cabal.project b/cabal.project index 2f97e3c6b4e..ca3cbbb0b24 100644 --- a/cabal.project +++ b/cabal.project @@ -163,71 +163,71 @@ source-repository-package source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: semantics/executable-spec source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: byron/ledger/executable-spec source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: byron/ledger/impl source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: byron/ledger/impl/test source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: byron/crypto source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: byron/crypto/test source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: byron/chain/executable-spec source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: shelley/chain-and-ledger/dependencies/non-integer source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: shelley/chain-and-ledger/executable-spec source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger-specs - tag: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 - --sha256: 1127svs82f9k7ldps4qpbl6kq6gzix0rbn8jir7a5p9xdj4dyszv + tag: 481e95541d10d90c49a93318895d388446384ce4 + --sha256: 1kmizhqssijp2lagpixg6qvszx8nfw4lihhq60xjvxpribbgcbdy subdir: shelley/chain-and-ledger/executable-spec/test source-repository-package diff --git a/ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs b/ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs index 1e0f008a414..3836a6e25cc 100644 --- a/ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs +++ b/ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs @@ -30,6 +30,7 @@ import Cardano.Chain.Slotting (EpochNumber, EpochSlots (..), SlotNumber) import qualified Cardano.Chain.Update as CC.Update import qualified Cardano.Chain.Update.Validation.Interface as CC.UPI +import qualified Cardano.Chain.Update.Validation.Registration as CC.Reg import qualified Cardano.Chain.UTxO as CC.UTxO import Cardano.Crypto (ProtocolMagicId (..)) import Cardano.Crypto.Hashing (Hash) @@ -189,6 +190,22 @@ instance Arbitrary CC.Update.ProtocolParameters where instance Arbitrary CC.Update.SoftwareVersion where arbitrary = hedgehog UG.genSoftwareVersion +instance Arbitrary CC.Reg.ProtocolUpdateProposal where + arbitrary = CC.Reg.ProtocolUpdateProposal + <$> arbitrary + <*> arbitrary + +instance Arbitrary CC.Reg.SoftwareUpdateProposal where + arbitrary = CC.Reg.SoftwareUpdateProposal + <$> arbitrary + <*> arbitrary + +instance Arbitrary CC.Reg.ApplicationVersion where + arbitrary = CC.Reg.ApplicationVersion + <$> arbitrary + <*> arbitrary + <*> arbitrary + instance Arbitrary CC.UPI.State where arbitrary = CC.UPI.State <$> arbitrary diff --git a/ouroboros-consensus-byron-test/src/Test/ThreadNet/Infra/Byron/TrackUpdates.hs b/ouroboros-consensus-byron-test/src/Test/ThreadNet/Infra/Byron/TrackUpdates.hs index 64b3b6af3f6..ef51111e517 100644 --- a/ouroboros-consensus-byron-test/src/Test/ThreadNet/Infra/Byron/TrackUpdates.hs +++ b/ouroboros-consensus-byron-test/src/Test/ThreadNet/Infra/Byron/TrackUpdates.hs @@ -33,6 +33,7 @@ import qualified Cardano.Chain.Update as Update import Cardano.Chain.Update.Proposal (AProposal) import qualified Cardano.Chain.Update.Proposal as Proposal import qualified Cardano.Chain.Update.Validation.Interface as Update +import qualified Cardano.Chain.Update.Validation.Registration as Registration import Cardano.Chain.Update.Vote (AVote) import qualified Cardano.Chain.Update.Vote as Vote import qualified Cardano.Crypto as Crypto @@ -255,7 +256,7 @@ mkUpdateLabels params numSlots genesisConfig nodeJoinPlan topology result svuLabel = SoftwareVersionUpdateLabel { svuObserved = fromMaybe False $ do let nm = Update.svAppName theProposedSoftwareVersion - (vn, _slot, _metadata) <- Map.lookup nm $ + (Registration.ApplicationVersion vn _slot _metadata) <- Map.lookup nm $ Update.appVersions $ Block.cvsUpdateState $ -- unlike for protocol version updates, there is no need to tick diff --git a/ouroboros-consensus-byron-test/test/Test/Consensus/Byron/Golden.hs b/ouroboros-consensus-byron-test/test/Test/Consensus/Byron/Golden.hs index 43fcf2ece7e..e8f5da3c2cc 100644 --- a/ouroboros-consensus-byron-test/test/Test/Consensus/Byron/Golden.hs +++ b/ouroboros-consensus-byron-test/test/Test/Consensus/Byron/Golden.hs @@ -988,19 +988,21 @@ test_golden_Result = goldenTestCBOR applicationVersions :: CC.ApplicationVersions applicationVersions = Map.singleton (CC.ApplicationName "Golden-Test") - (0, 0, Map.empty) + (CC.ApplicationVersion 0 0 Map.empty) protocolUpdateProposals :: CC.ProtocolUpdateProposals protocolUpdateProposals = Map.singleton CC.exampleUpId - (CC.exampleProtocolVersion, CC.exampleProtocolParameters) + (CC.ProtocolUpdateProposal + CC.exampleProtocolVersion + CC.exampleProtocolParameters) softwareUpdateProposals :: CC.SoftwareUpdateProposals softwareUpdateProposals = Map.singleton CC.exampleUpId - ( CC.exampleSoftwareVersion - , Map.singleton CC.exampleSystemTag CC.exampleInstallerHash - ) + (CC.SoftwareUpdateProposal + CC.exampleSoftwareVersion + (Map.singleton CC.exampleSystemTag CC.exampleInstallerHash)) endorsement :: CC.Endorsement endorsement = CC.Endorsement diff --git a/stack.yaml b/stack.yaml index c5b92618ba7..6e262b00dfd 100644 --- a/stack.yaml +++ b/stack.yaml @@ -49,7 +49,7 @@ extra-deps: - slotting - git: https://github.com/input-output-hk/cardano-ledger-specs - commit: 0e56f809ecae067cf2fb42379cc5cf9ac5ef10b9 + commit: 481e95541d10d90c49a93318895d388446384ce4 subdirs: - byron/chain/executable-spec - byron/ledger/executable-spec