Skip to content

Commit

Permalink
Merge #449
Browse files Browse the repository at this point in the history
449: Update to latest version of dependencies r=dcoutts a=dcoutts

A few code changes needed to be compatible with the latest version of `ouroboros-consensus`.

Co-authored-by: Duncan Coutts <[email protected]>
  • Loading branch information
iohk-bors[bot] and dcoutts authored Jan 3, 2020
2 parents 085e7b7 + e6d99f7 commit d24cefd
Show file tree
Hide file tree
Showing 23 changed files with 73 additions and 66 deletions.
38 changes: 19 additions & 19 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,30 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: f9f902091aec25d52dd3590980a9b2a8447bbcc5
tag: d8e06467844f8612b167f25214f243e02560468b
subdir: byron/chain/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: f9f902091aec25d52dd3590980a9b2a8447bbcc5
tag: d8e06467844f8612b167f25214f243e02560468b
subdir: byron/ledger/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: f9f902091aec25d52dd3590980a9b2a8447bbcc5
tag: d8e06467844f8612b167f25214f243e02560468b
subdir: byron/semantics/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: 7099318744ddd10b76e50eae73f005efd2c7195c
tag: 00487726c4bc21b4744e59d913334ebfeac7d68e

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: 7099318744ddd10b76e50eae73f005efd2c7195c
tag: 00487726c4bc21b4744e59d913334ebfeac7d68e
subdir: test

source-repository-package
Expand All @@ -110,49 +110,49 @@ source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: iohk-monitoring
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: contra-tracer
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: plugins/scribe-systemd
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: plugins/backend-aggregation
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: plugins/backend-editor
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: plugins/backend-ekg
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: plugins/backend-monitoring
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: tracer-transformers
tag: 156391afaafca6b00d027fb9c03e1bd7a1f03003
tag: dbd932704fa4520bc24e45b2c00407c5f437c12a

-- dependencies of iohk-monitoring
source-repository-package
Expand All @@ -163,37 +163,37 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: a7b3055c1a4ccc26455939910a6283d8947c108e
tag: 408f3a3fc8be601075ee2bacdb7b7b9ebac9d2c2
subdir: ouroboros-network

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: a7b3055c1a4ccc26455939910a6283d8947c108e
tag: 408f3a3fc8be601075ee2bacdb7b7b9ebac9d2c2
subdir: ouroboros-consensus

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: a7b3055c1a4ccc26455939910a6283d8947c108e
tag: 408f3a3fc8be601075ee2bacdb7b7b9ebac9d2c2
subdir: typed-protocols

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: a7b3055c1a4ccc26455939910a6283d8947c108e
tag: 408f3a3fc8be601075ee2bacdb7b7b9ebac9d2c2
subdir: typed-protocols-cbor

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: a7b3055c1a4ccc26455939910a6283d8947c108e
tag: 408f3a3fc8be601075ee2bacdb7b7b9ebac9d2c2
subdir: network-mux

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: a7b3055c1a4ccc26455939910a6283d8947c108e
tag: 408f3a3fc8be601075ee2bacdb7b7b9ebac9d2c2
subdir: io-sim-classes

source-repository-package
Expand Down
11 changes: 8 additions & 3 deletions cardano-config/src/Cardano/Config/Protocol.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ import Cardano.Crypto (RequiresNetworkMagic, decodeHash)
import qualified Cardano.Crypto.Signing as Signing

import Ouroboros.Consensus.Block (Header)
import Ouroboros.Consensus.BlockchainTime (slotLengthFromSec)
import Ouroboros.Consensus.BlockchainTime
(SlotLength, slotLengthFromSec,
SlotLengths, singletonSlotLengths)
import Ouroboros.Consensus.Mempool.API (ApplyTxErr, GenTx, GenTxId)
import Ouroboros.Consensus.Node.ProtocolInfo (NumCoreNodes (..),
PBftLeaderCredentials,
Expand Down Expand Up @@ -86,9 +88,12 @@ type TraceConstraints blk =
mockSecurityParam :: SecurityParam
mockSecurityParam = SecurityParam 5

mockSlotLength :: Consensus.SlotLength
mockSlotLength :: SlotLength
mockSlotLength = slotLengthFromSec 20

mockSlotLengths :: SlotLengths
mockSlotLengths = singletonSlotLengths mockSlotLength

-- | Helper for creating a 'SomeProtocol' for a mock protocol that needs the
-- 'CoreNodeId' and NumCoreNodes'. If one of them is missing from the
-- 'CardanoConfiguration', a 'MissingNodeInfo' exception is thrown.
Expand Down Expand Up @@ -138,7 +143,7 @@ fromProtocol _ _ _ _ _ _ _ _ _ ByronLegacy =
left ByronLegacyProtocolNotImplemented
fromProtocol _ nId mNumCoreNodes _ _ _ _ _ _ BFT =
hoistEither $ mockSomeProtocol nId mNumCoreNodes $ \cid numCoreNodes ->
Consensus.ProtocolMockBFT numCoreNodes cid mockSecurityParam mockSlotLength
Consensus.ProtocolMockBFT numCoreNodes cid mockSecurityParam mockSlotLengths
fromProtocol _ nId mNumCoreNodes _ _ _ _ _ _ Praos =
hoistEither $ mockSomeProtocol nId mNumCoreNodes $ \cid numCoreNodes ->
Consensus.ProtocolMockPraos numCoreNodes cid PraosParams {
Expand Down
3 changes: 2 additions & 1 deletion cardano-node/src/Cardano/Node/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ handleSimpleNode p trace nodeTracers nCli nc = do
-- Watch the tip of the chain and store it in @varTip@ so we can include
-- it in trace messages.
let chainDB = getChainDB nodeKernel
onEachChange registry id Nothing (ChainDB.getTipPoint chainDB) $ \tip ->
void $ onEachChange registry id Nothing
(ChainDB.getTipPoint chainDB) $ \tip ->
atomically $ writeTVar varTip tip
where
nid :: Int
Expand Down
4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-prelude-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-prelude.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/contra-tracer.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/cs-blockchain.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/cs-ledger.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/io-sim-classes.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/iohk-monitoring.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/lobemo-backend-aggregation.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/lobemo-backend-editor.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/lobemo-backend-ekg.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/lobemo-backend-monitoring.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/lobemo-scribe-systemd.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/network-mux.nix

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

5 changes: 3 additions & 2 deletions nix/.stack.nix/ouroboros-consensus.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/ouroboros-network.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/small-steps.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/tracer-transformers.nix

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

Loading

0 comments on commit d24cefd

Please sign in to comment.