Skip to content

Commit

Permalink
Merge #1492
Browse files Browse the repository at this point in the history
1492: Update consensus and network dep r=erikd a=dcoutts



Co-authored-by: Duncan Coutts <[email protected]>
  • Loading branch information
iohk-bors[bot] and dcoutts authored Jul 18, 2020
2 parents e7d7951 + 2089bf9 commit e28c1d3
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 33 deletions.
52 changes: 26 additions & 26 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -319,92 +319,92 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: ouroboros-network

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: io-sim

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: ouroboros-consensus

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: ouroboros-consensus/ouroboros-consensus-mock

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: ouroboros-consensus-byron

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: ouroboros-consensus-shelley

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: ouroboros-consensus-cardano

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: typed-protocols

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: typed-protocols-examples

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: ouroboros-network-framework

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: network-mux

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: io-sim-classes

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 17d5199fd4415a0258c22982a099744adbfd2489
--sha256: 1vpyq6c6249ji18valmwqd85vrjj80p1ck6jdsdxiapqqi4br90k
tag: 1c8924b856baf809f193798ff686cdb2c0ed25d2
--sha256: 1ird981gi7wbj21g8d65jqv4q4iwch2akky4r8pf8r2w3b3767pv
subdir: Win32-network

source-repository-package
Expand Down
8 changes: 6 additions & 2 deletions cardano-api/src/Cardano/Api/LocalChainSync.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ import Control.Concurrent.STM
import Cardano.Api.Typed

import Ouroboros.Network.Block (Tip)
import Ouroboros.Network.Util.ShowProxy (ShowProxy)
import Ouroboros.Network.Protocol.ChainSync.Client
(ChainSyncClient(..), ClientStIdle(..), ClientStNext(..))
import Ouroboros.Consensus.Ledger.SupportsMempool (ApplyTxErr)
import Ouroboros.Consensus.Ledger.SupportsMempool (ApplyTxErr, GenTx)
import Ouroboros.Consensus.Ledger.Abstract (Query)


-- | Get the node's tip using the local chain sync protocol.
getLocalTip :: (Typeable block, Typeable (ApplyTxErr block))
getLocalTip :: (Typeable block, Typeable (ApplyTxErr block),
ShowProxy block, ShowProxy (ApplyTxErr block),
ShowProxy (Query block), ShowProxy (GenTx block))
=> LocalNodeConnectInfo mode block -> IO (Tip block)
getLocalTip connctInfo = do
resultVar <- newEmptyTMVarIO
Expand Down
18 changes: 14 additions & 4 deletions cardano-api/src/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ import Ouroboros.Network.NodeToClient
import Ouroboros.Network.Mux
(MuxMode(InitiatorMode), MuxPeer(..),
RunMiniProtocol(InitiatorProtocolOnly))
import Ouroboros.Network.Util.ShowProxy (ShowProxy)

-- TODO: it'd be nice if the consensus imports needed were a bit more coherent
import Ouroboros.Consensus.Cardano
Expand Down Expand Up @@ -2389,7 +2390,12 @@ nullLocalNodeClientProtocols =
-- handlers.
--
connectToLocalNode :: forall mode block.
(Typeable block, Typeable (ApplyTxErr block))
(Typeable block, Typeable (ApplyTxErr block),
ShowProxy block, ShowProxy (ApplyTxErr block),
ShowProxy (Query block), ShowProxy (GenTx block))
--TODO: too many constraints! we should pass
-- a single protocol to run, not all of them, until we
-- have the more flexible interface to run any combo
=> LocalNodeConnectInfo mode block
-> LocalNodeClientProtocols block
-> IO ()
Expand Down Expand Up @@ -2476,7 +2482,9 @@ connectToLocalNode LocalNodeConnectInfo {
-- local state query protocol.
--
queryNodeLocalState :: forall mode block result.
(Typeable block, Typeable (ApplyTxErr block))
(Typeable block, Typeable (ApplyTxErr block),
ShowProxy block, ShowProxy (ApplyTxErr block),
ShowProxy (Query block), ShowProxy (GenTx block))
=> LocalNodeConnectInfo mode block
-> (Point block, Query block result)
-> IO (Either AcquireFailure result)
Expand Down Expand Up @@ -2506,7 +2514,7 @@ queryNodeLocalState connctInfo pointAndQuery = do
-- writing into an mvar
atomically $ putTMVar resultVar (Right result)
pure $ SendMsgRelease $
StateQuery.SendMsgDone ()
pure $ StateQuery.SendMsgDone ()
}
, recvMsgFailure = \failure -> do
--TODO: return the result via the SendMsgDone rather than
Expand All @@ -2516,7 +2524,9 @@ queryNodeLocalState connctInfo pointAndQuery = do
}

submitTxToNodeLocal :: forall mode block.
(Typeable block, Typeable (ApplyTxErr block))
(Typeable block, Typeable (ApplyTxErr block),
ShowProxy block, ShowProxy (ApplyTxErr block),
ShowProxy (Query block), ShowProxy (GenTx block))
=> LocalNodeConnectInfo mode block
-> GenTx block
-> IO (SubmitResult (ApplyTxErr block))
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ extra-deps:
#Ouroboros-network dependencies

- git: https://github.com/input-output-hk/ouroboros-network
commit: 17d5199fd4415a0258c22982a099744adbfd2489
commit: 1c8924b856baf809f193798ff686cdb2c0ed25d2
subdirs:
- io-sim
- io-sim-classes
Expand Down

0 comments on commit e28c1d3

Please sign in to comment.