Skip to content

Commit

Permalink
Merge #71
Browse files Browse the repository at this point in the history
71: Update cardano-ledger r=nc6 a=nc6

This bumps a bunch of dependencies, and updates the code to work with cardano-shell again. The way in which this is done involved a partial pattern match - I expect a proper updating to arrive with #60

As a consequence, this fixes the `--real-pbft` demo.

Co-authored-by: Nicholas Clarke <nick@topos.org.uk>
Co-authored-by: Marcin Szamotulski <profunctor@pm.me>
  • Loading branch information
3 people committed Jul 22, 2019
2 parents 3a8b5f0 + 6f50ea1 commit 8b54597
Show file tree
Hide file tree
Showing 29 changed files with 110 additions and 89 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ dist/
result*
launch-*
.stack-to-nix.cache
/genesis.*
stack.yaml.lock
/genesis.*
3 changes: 2 additions & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Cardano.Shell.Features.Logging (LoggingCLIArguments (..),
LoggingLayer (..),
createLoggingFeature,
loggingParser)
import Cardano.Shell.Configuration.Lib (finaliseCardanoConfiguration)
import Cardano.Shell.Lib (runCardanoApplicationWithFeatures)
import Cardano.Shell.Presets (mainnetConfiguration)
import Cardano.Shell.Types (ApplicationEnvironment (Development),
Expand Down Expand Up @@ -49,7 +50,7 @@ opts = info (commandLineParser <**> helper)
main :: IO ()
main = do

let cardanoConfiguration = mainnetConfiguration
let Right cardanoConfiguration = finaliseCardanoConfiguration mainnetConfiguration
cardanoEnvironment <- initializeCardanoEnvironment

logConfig <- execParser opts
Expand Down
6 changes: 3 additions & 3 deletions app/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ handleSimpleNode p NodeCLIArguments{..} myNodeAddress (TopologyInfo myNodeId top
myLocalAddr
Peer
(\(DictVersion _) -> acceptEq)
(muxLocalResponderNetworkApplication <$> networkAppNodeToClient)
(localResponderNetworkApplication <$> networkAppNodeToClient)
wait

-- serve downstream nodes
Expand All @@ -355,7 +355,7 @@ handleSimpleNode p NodeCLIArguments{..} myNodeAddress (TopologyInfo myNodeId top
myAddr
Peer
(\(DictVersion _) -> acceptEq)
(muxResponderNetworkApplication <$> networkAppNodeToNode)
(responderNetworkApplication <$> networkAppNodeToNode)
wait

-- ip subscription manager
Expand All @@ -381,7 +381,7 @@ handleSimpleNode p NodeCLIArguments{..} myNodeAddress (TopologyInfo myNodeId top
(\(DictVersion codec) -> encodeTerm codec)
(\(DictVersion codec) -> decodeTerm codec)
Peer
(muxInitiatorNetworkApplication <$> networkAppNodeToNode) sock)
(initiatorNetworkApplication <$> networkAppNodeToNode) sock)
wait

void $ Async.waitAny [localServer, peerServer, subManager]
Expand Down
14 changes: 7 additions & 7 deletions app/TxSubmission.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import Ouroboros.Consensus.Util.Condense

import Network.TypedProtocol.Driver
import Network.TypedProtocol.Codec.Cbor
import Network.Mux.Interface
import Ouroboros.Network.Mux
import Ouroboros.Network.Block (Point)
import qualified Ouroboros.Network.Block as Block
import Ouroboros.Network.Protocol.LocalTxSubmission.Type
Expand Down Expand Up @@ -143,28 +143,28 @@ submitTx :: RunDemo blk
submitTx pInfoConfig nodeId tx tracer =
connectTo
(,)
(muxLocalInitiatorNetworkApplication tracer pInfoConfig tx)
(localInitiatorNetworkApplication tracer pInfoConfig tx)
Nothing
addr
where
addr = localSocketAddrInfo (localSocketFilePath nodeId)

muxLocalInitiatorNetworkApplication
localInitiatorNetworkApplication
:: forall blk m peer.
(RunDemo blk, MonadST m, MonadThrow m, MonadTimer m)
=> Tracer m String
-> NodeConfig (BlockProtocol blk)
-> GenTx blk
-> Versions NodeToClientVersion DictVersion
(MuxApplication InitiatorApp peer NodeToClientProtocols
m ByteString () Void)
muxLocalInitiatorNetworkApplication tracer pInfoConfig tx =
(OuroborosApplication InitiatorApp peer NodeToClientProtocols
m ByteString () Void)
localInitiatorNetworkApplication tracer pInfoConfig tx =
simpleSingletonVersions
NodeToClientV_1
(NodeToClientVersionData { networkMagic = 0 })
(DictVersion nodeToClientCodecCBORTerm)

$ MuxInitiatorApplication $ \peer ptcl -> case ptcl of
$ OuroborosInitiatorApplication $ \peer ptcl -> case ptcl of
LocalTxSubmissionPtcl -> \channel -> do
traceWith tracer ("Submitting transaction: " {-++ show tx-})
result <- runPeer
Expand Down
38 changes: 19 additions & 19 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ package cardano-node
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 501d91e426ae84ce0ae056be38bd3db594af9fc2
tag: 6b808ad5506cb097cdf5832e1cd5cad0c83c58d6
subdir: binary

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 501d91e426ae84ce0ae056be38bd3db594af9fc2
tag: 6b808ad5506cb097cdf5832e1cd5cad0c83c58d6
subdir: binary/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 501d91e426ae84ce0ae056be38bd3db594af9fc2
tag: 6b808ad5506cb097cdf5832e1cd5cad0c83c58d6
subdir: cardano-crypto-class

source-repository-package
Expand All @@ -29,94 +29,94 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: 5241971fe563c90ea82b20af344116d46d672835
tag: 7d9fd48f4d8e4cd0658c7839a4d02c44d5706ac7
subdir: cardano-ledger

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: 5241971fe563c90ea82b20af344116d46d672835
tag: 7d9fd48f4d8e4cd0658c7839a4d02c44d5706ac7
subdir: crypto

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: 5241971fe563c90ea82b20af344116d46d672835
tag: 7d9fd48f4d8e4cd0658c7839a4d02c44d5706ac7
subdir: cardano-ledger/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: 5241971fe563c90ea82b20af344116d46d672835
tag: 7d9fd48f4d8e4cd0658c7839a4d02c44d5706ac7
subdir: crypto/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: a21f83d9407b2955fbaea4ce8a79b262361112aa
tag: 3084f8b8514d93970415e895b241691b80c7b9ee

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: a21f83d9407b2955fbaea4ce8a79b262361112aa
tag: 3084f8b8514d93970415e895b241691b80c7b9ee
subdir: test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-shell
tag: 71fb36665338491e92d3ef14c20ae38ad6882c94
tag: 71a8257bfea837ddef716d8c81e436aa3273345e

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-sl-x509
tag: e8bfc1294e088f90e5ae0b4aedbc82ee46ac5ee4
tag: ec96c64c665b741c17b4e38f611315bae9b0b054

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
subdir: iohk-monitoring
tag: b2022cf7f5925e486f9e0a31f6f6d02145d5ebda
tag: bd31cd2f3922010ddb76bb869f29c4e63bb8001b

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

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 0fb0db07e8c3fdd60aa8e22492782f2afcf74788
tag: ca270835199406a06be590d2391bd87b072e7537
subdir: ouroboros-network

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 0fb0db07e8c3fdd60aa8e22492782f2afcf74788
tag: ca270835199406a06be590d2391bd87b072e7537
subdir: ouroboros-consensus

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 0fb0db07e8c3fdd60aa8e22492782f2afcf74788
tag: ca270835199406a06be590d2391bd87b072e7537
subdir: typed-protocols

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 0fb0db07e8c3fdd60aa8e22492782f2afcf74788
tag: ca270835199406a06be590d2391bd87b072e7537
subdir: typed-protocols-cbor

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 0fb0db07e8c3fdd60aa8e22492782f2afcf74788
tag: ca270835199406a06be590d2391bd87b072e7537
subdir: network-mux

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 0fb0db07e8c3fdd60aa8e22492782f2afcf74788
tag: ca270835199406a06be590d2391bd87b072e7537
subdir: io-sim-classes

source-repository-package
Expand Down
1 change: 1 addition & 0 deletions cardano-node/Cardano/Node/CLI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ type TraceConstraints blk =
, Show (ApplyTxErr blk)
, Show (GenTx blk)
, Show blk
, Show (Header blk)
)

data SomeProtocol where
Expand Down
4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-binary-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-binary.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-class.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-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.

5 changes: 3 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.

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.

5 changes: 3 additions & 2 deletions nix/.stack.nix/cardano-shell.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.

0 comments on commit 8b54597

Please sign in to comment.