From c6596dcf9f1597290af472526ba2e9b175b77c64 Mon Sep 17 00:00:00 2001 From: Duncan Coutts Date: Mon, 22 Jun 2020 19:36:05 +0100 Subject: [PATCH] Work in progress on a test setup for Byron;Shelley node testing Modeled on the shelley-from-genesis setup script, but now for a Byron;Shelley setup. This is more complicated as we need a full Byron setup and most of a Shelley setup too, and appropriately aligned between the two so we can start block producing nodes in Byron mode and switch over to Shelley. --- scripts/byron-shelley/mkfiles.sh | 438 +++++++++++++++++++++++++++++++ 1 file changed, 438 insertions(+) create mode 100755 scripts/byron-shelley/mkfiles.sh diff --git a/scripts/byron-shelley/mkfiles.sh b/scripts/byron-shelley/mkfiles.sh new file mode 100755 index 00000000000..45ccaa7ab25 --- /dev/null +++ b/scripts/byron-shelley/mkfiles.sh @@ -0,0 +1,438 @@ +#!/usr/bin/env bash + +set -e +#set -x + +ROOT=example + +BFT_NODES="node-bft1 node-bft2" +BFT_NODES_N="1 2" +NUM_BFT_NODES=2 + +POOL_NODES="node-pool1" + +ALL_NODES="${BFT_NODES} ${POOL_NODES}" + +NUM_UTXO_KEYS=1 +MAX_SUPPLY=1000000000 +INIT_SUPPLY=1000000000 + + +NETWORK_MAGIC=42 +SECURITY_PARAM=10 + +START_TIME=$(ghc -e 'fmap ((+30) . floor) Data.Time.Clock.POSIX.getPOSIXTime') + + +if ! mkdir "${ROOT}"; then + echo "The ${ROOT} directory already exists, please move or remove it" + exit +fi + +# copy and tweak the configuration +cp configuration/defaults/byron-mainnet/configuration.yaml ${ROOT}/ +sed -i ${ROOT}/configuration.yaml \ + -e 's/Protocol: RealPBFT/Protocol: Cardano/' \ + -e '/Protocol/ aPBftSignatureThreshold: 0.6' \ + -e 's/minSeverity: Info/minSeverity: Debug/' \ + -e 's|GenesisFile: genesis.json|ByronGenesisFile: byron/genesis.json|' \ + -e '/ByronGenesisFile/ aShelleyGenesisFile: shelley/genesis.json' \ + -e 's/RequiresNoMagic/RequiresMagic/' + +pushd ${ROOT} + +# create the node directories +for NODE in ${ALL_NODES}; do + + mkdir ${NODE} ${NODE}/byron ${NODE}/shelley + +done + +# Make topology files +#TODO generalise this over the N BFT nodes and pool nodes +cat > node-bft1/topology.json < node-bft1/port + +cat > node-bft2/topology.json < node-bft2/port + +cat > node-pool1/topology.json < node-pool1/port + + +cat > byron.genesis.spec.json <