From 61bf2d7f53914d1ca2e6155a455c7cb62504d03c Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Thu, 28 Nov 2019 18:38:29 -0400 Subject: [PATCH] Update Scripts --- cardano-config/src/Cardano/Config/Topology.hs | 2 +- .../simple-topology-real-pbft-node-0.json | 15 +++++++++++++++ .../simple-topology-real-pbft-node-1.json | 14 ++++++++++++++ .../simple-topology-real-pbft-node-2.json | 14 ++++++++++++++ .../{ => realPBFT}/topology-proxy-follower.json | 2 +- scripts/lib-node.sh | 6 +++--- scripts/shelley-testnet.sh | 6 +++--- 7 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 configuration/realPBFT/simple-topology-real-pbft-node-0.json create mode 100644 configuration/realPBFT/simple-topology-real-pbft-node-1.json create mode 100644 configuration/realPBFT/simple-topology-real-pbft-node-2.json rename configuration/{ => realPBFT}/topology-proxy-follower.json (83%) diff --git a/cardano-config/src/Cardano/Config/Topology.hs b/cardano-config/src/Cardano/Config/Topology.hs index 114099b883f..cbb0aa90402 100644 --- a/cardano-config/src/Cardano/Config/Topology.hs +++ b/cardano-config/src/Cardano/Config/Topology.hs @@ -140,7 +140,7 @@ data RealNodeTopology = RealNodeTopology { rProducers :: ![RemoteAddress] } instance FromJSON RealNodeTopology where parseJSON = withObject "RealNodeTopology" $ \v -> RealNodeTopology - <$> v .: "rProducers" + <$> v .: "Producers" instance FromJSON NodeId where parseJSON v = CoreId <$> parseJSON v diff --git a/configuration/realPBFT/simple-topology-real-pbft-node-0.json b/configuration/realPBFT/simple-topology-real-pbft-node-0.json new file mode 100644 index 00000000000..95902077560 --- /dev/null +++ b/configuration/realPBFT/simple-topology-real-pbft-node-0.json @@ -0,0 +1,15 @@ + + { + "Producers":[ + { + "addr":"127.0.0.1", + "port":3001, + "valency":1 + }, + { + "addr":"127.0.0.1", + "port":3002, + "valency":1 + } + ] + } diff --git a/configuration/realPBFT/simple-topology-real-pbft-node-1.json b/configuration/realPBFT/simple-topology-real-pbft-node-1.json new file mode 100644 index 00000000000..a64ebe10a66 --- /dev/null +++ b/configuration/realPBFT/simple-topology-real-pbft-node-1.json @@ -0,0 +1,14 @@ +{ + "Producers":[ + { + "addr":"127.0.0.1", + "port":3000, + "valency":1 + }, + { + "addr":"127.0.0.1", + "port":3002, + "valency":1 + } + ] +} diff --git a/configuration/realPBFT/simple-topology-real-pbft-node-2.json b/configuration/realPBFT/simple-topology-real-pbft-node-2.json new file mode 100644 index 00000000000..a762a3e8f19 --- /dev/null +++ b/configuration/realPBFT/simple-topology-real-pbft-node-2.json @@ -0,0 +1,14 @@ +{ + "Producers":[ + { + "addr":"127.0.0.1", + "port":3000, + "valency":1 + }, + { + "addr":"127.0.0.1", + "port":3001, + "valency":1 + } + ] +} diff --git a/configuration/topology-proxy-follower.json b/configuration/realPBFT/topology-proxy-follower.json similarity index 83% rename from configuration/topology-proxy-follower.json rename to configuration/realPBFT/topology-proxy-follower.json index cadb8d0e9f5..0349c8a8b05 100644 --- a/configuration/topology-proxy-follower.json +++ b/configuration/realPBFT/topology-proxy-follower.json @@ -1,5 +1,5 @@ { - "rProducers": [ + "Producers": [ { "addr": "18.185.45.45", "port": 3001, diff --git a/scripts/lib-node.sh b/scripts/lib-node.sh index 38da8102539..c170a67ab13 100644 --- a/scripts/lib-node.sh +++ b/scripts/lib-node.sh @@ -18,10 +18,10 @@ function dlgcert () { printf -- "--delegation-certificate ${genesis_root}/delegation-cert.%03d.json " "$1" } function commonargs() { - printf -- "--topology configuration/simple-topology.json " - printf -- "--database-path ./db/node-$1 " + printf -- "--topology configuration/realPBFT/simple-topology-real-pbft-node-$1.json " + printf -- "--database-path ./node-$1 " printf -- "--genesis-file ${genesis_file} " - printf -- "--socket-path ./socket/$1 " + printf -- "--socket-path ./socket/node-core-$1.socket " } function acceptorargs() { diff --git a/scripts/shelley-testnet.sh b/scripts/shelley-testnet.sh index 1f037b7215b..6eab89df918 100755 --- a/scripts/shelley-testnet.sh +++ b/scripts/shelley-testnet.sh @@ -54,8 +54,8 @@ tmux select-pane -t 4 tmux send-keys "cd '${PWD}'; ${CMD} trace-acceptor $(acceptorargs)" C-m sleep 2 tmux select-pane -t 1 -tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node $(nodeargs 0 "${ALGO} $(echo -n ${EXTRA})") " C-m +tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node run $(nodeargs 0 "${ALGO} $(echo -n ${EXTRA})") " C-m tmux select-pane -t 2 -tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node $(nodeargs 1 "${ALGO} $(echo -n ${EXTRA})") " C-m +tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node run $(nodeargs 1 "${ALGO} $(echo -n ${EXTRA})") " C-m tmux select-pane -t 3 -tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node $(nodeargs 2 "${ALGO} $(echo -n ${EXTRA})") " C-m +tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node run $(nodeargs 2 "${ALGO} $(echo -n ${EXTRA})") " C-m