Created
September 21, 2017 15:19
-
-
Save Qaezel/4afd8dfec0be0387af87282429eeb5f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
REPO_URL="https://github.com/input-output-hk/cardano-sl.git" | |
REPO_PATH="$HOME/cardano-sl" | |
BRANCH="cardano-sl-1.0-genesis-json2" | |
AVVM_SEED_COUNT="3" | |
IOHK_NODES=(0 1 2) | |
SGG_NODES=(3 4) | |
CF_NODES=(5 6) | |
ALL_NODES="${IOHK_NODES[*]} ${SGG_NODES[*]} ${CF_NODES[*]}" | |
KEY_PATH="${REPO_PATH}/keys" | |
DELEGATE="${KEY_PATH}/delegate" | |
STAKEHOLDER="${KEY_PATH}/stakeholder" | |
NODES="${IOHK_NODES[*]}" | |
echo "Generating stakeholder keys..." | |
pushd "$REPO_PATH" | |
for i in $NODES; do | |
stack exec --nix -- cardano-keygen --configuration-file node/configuration.mainnet.yaml --configuration-key mainnet_dryrun_base generate-key --path "${STAKEHOLDER}${i}.key" | |
stack exec --nix -- cardano-keygen --configuration-file node/configuration.mainnet.yaml --configuration-key mainnet_dryrun_base read-key --path "${STAKEHOLDER}${i}.key" | |
done | |
popd | |
echo "Generating delegation certificates..." | |
pushd "$REPO_PATH" | |
for i in $NODES; do | |
stack exec --nix -- cardano-keygen --configuration-file node/configuration.mainnet.yaml --configuration-key mainnet_dryrun_base rearrange --mask "${STAKEHOLDER}${i}.key" | |
pushd auxx | |
stack exec --nix -- cardano-auxx --configuration-file ../node/configuration.mainnet.yaml --configuration-key mainnet_dryrun_base cmd --commands "add-key ${STAKEHOLDER}${i}.key" | |
popd | |
done | |
pushd auxx | |
stack exec --nix -- cardano-auxx --configuration-file ../node/configuration.mainnet.yaml --configuration-key mainnet_dryrun_base cmd --commands 'listaddr' | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment