Skip to content

Commit

Permalink
Merge #1630
Browse files Browse the repository at this point in the history
1630: Bump cardano-ledger to incorporate API fixes r=nc6 a=nc6

Closes #1622

Incorporates IntersectMBO/cardano-ledger#722

Co-authored-by: Nicholas Clarke <[email protected]>
  • Loading branch information
iohk-bors[bot] and nc6 authored Feb 12, 2020
2 parents 5bdaf7c + 194da25 commit 8d4b340
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 20 deletions.
8 changes: 4 additions & 4 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,25 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: e8475e33772e7408e83ff22e4406673ea73f93fd
tag: 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0
subdir: cardano-ledger

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: e8475e33772e7408e83ff22e4406673ea73f93fd
tag: 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0
subdir: crypto

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: e8475e33772e7408e83ff22e4406673ea73f93fd
tag: 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0
subdir: cardano-ledger/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: e8475e33772e7408e83ff22e4406673ea73f93fd
tag: 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0
subdir: crypto/test

-- version number matching the one specified in the stack resolver file
Expand Down
4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-crypto-test.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-crypto-wrapper.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-ledger-test.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-ledger.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/typed-protocols-examples.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import qualified Cardano.Chain.ValidationMode as CC

import Ouroboros.Consensus.Ledger.Abstract
import Ouroboros.Consensus.Ledger.Byron.Block
import Ouroboros.Consensus.Ledger.Byron.Conversions (toByronSlotNo)
import Ouroboros.Consensus.Ledger.Byron.Ledger
import Ouroboros.Consensus.Ledger.Byron.Orphans ()
import Ouroboros.Consensus.Mempool.API
Expand Down Expand Up @@ -193,6 +194,7 @@ applyByronGenTx validationMode cfg genTx (TickedLedgerState slot st) =
CC.applyMempoolPayload
validationMode
(unByronLedgerConfig cfg)
(toByronSlotNo slot)
(toMempoolPayload genTx)
(byronLedgerState st)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import Cardano.Binary (Annotated)
import Cardano.Crypto.DSIGN

import qualified Cardano.Chain.Block as CC
import qualified Cardano.Chain.Byron.API as CC
import qualified Cardano.Chain.Delegation as Delegation

import Ouroboros.Network.Block (HasHeader (..))
Expand Down
4 changes: 2 additions & 2 deletions ouroboros-consensus/src/Ouroboros/Consensus/Node/Run/Byron.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ instance RunNode ByronBlock where
nodeBlockMatchesHeader = verifyBlockMatchesHeader
nodeBlockFetchSize = const 2000 -- TODO #593
nodeIsEBB = \hdr -> case byronHeaderRaw hdr of
API.ABOBBlockHdr _ -> Nothing
API.ABOBBoundaryHdr bhdr -> Just
Cardano.Block.ABOBBlockHdr _ -> Nothing
Cardano.Block.ABOBBoundaryHdr bhdr -> Just
. EpochNo
. Cardano.Block.boundaryEpoch
$ bhdr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import qualified Data.ByteString.Lazy.Char8 as Lazy8
import qualified Data.Sequence.Strict as Seq

import Cardano.Binary (fromCBOR, toCBOR)
import Cardano.Chain.Block (ABlockOrBoundary (..))
import Cardano.Chain.Block (ABlockOrBoundary (..), ABlockOrBoundaryHdr(..))
import qualified Cardano.Chain.Block as CC.Block
import qualified Cardano.Chain.Byron.API as API
import Cardano.Chain.Common (KeyHash)
Expand Down Expand Up @@ -455,14 +455,14 @@ instance Arbitrary (Header ByronBlock) where
where
genHeader :: Gen (Header ByronBlock)
genHeader =
mkByronHeader epochSlots . API.ABOBBlockHdr .
mkByronHeader epochSlots . ABOBBlockHdr .
API.reAnnotateUsing
(CC.Block.toCBORHeader epochSlots)
(CC.Block.fromCBORAHeader epochSlots) <$>
hedgehog (CC.genHeader protocolMagicId epochSlots)
genBoundaryHeader :: Gen (Header ByronBlock)
genBoundaryHeader =
mkByronHeader epochSlots . API.ABOBBoundaryHdr .
mkByronHeader epochSlots . ABOBBoundaryHdr .
API.reAnnotateUsing
(CC.Block.toCBORABoundaryHeader protocolMagicId)
CC.Block.fromCBORABoundaryHeader <$>
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extra-deps:
- gray-code-0.3.1

- git: https://github.com/input-output-hk/cardano-ledger
commit: e8475e33772e7408e83ff22e4406673ea73f93fd
commit: 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0
subdirs:
- cardano-ledger
- cardano-ledger/test
Expand Down

0 comments on commit 8d4b340

Please sign in to comment.