Last active
December 11, 2019 22:29
-
-
Save knabben/016afa1c97949eb13ee9e8fb9bee172d to your computer and use it in GitHub Desktop.
Sawtooth setup
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
#!/bin/bash | |
# Generate user keygen | |
sawtooth keygen vagrant --force | |
# Generate validator key pair | |
sudo sawadm keygen --force | |
# Cleanup sawtooth repo | |
sudo rm -fr /var/lib/sawtooth/; sudo mkdir -p /var/lib/sawtooth ; sudo chown sawtooth /var/lib/sawtooth | |
# Initial configuration for sawtooth genesis | |
sudo sawset genesis --key /etc/sawtooth/keys/validator.priv -o /var/lib/sawtooth/config-genesis.batch | |
# Set propose for family and version | |
sudo sawset proposal create --key /etc/sawtooth/keys/validator.priv sawtooth.consensus.algorithm.name=Devmode sawtooth.consensus.algorithm.version=0.1 -o /var/lib/sawtooth/config.batch | |
# Create initial genesis batch | |
sudo -u sawtooth sawadm genesis /var/lib/sawtooth/config-genesis.batch /var/lib/sawtooth/config.batch -o /var/lib/sawtooth/genesis.batch | |
SAWTOOTH_VALIDATOR="sudo -u sawtooth sawtooth-validator -vv" | |
SAWTOOTH_SETTINGS="sudo -u sawtooth settings-tp -vv" | |
SAWTOOTH_RESTAPI="sudo -u sawtooth sawtooth-rest-api -v" | |
SAWTOOTH_DEVMODE="sudo -u sawtooth devmode-engine-rust -vv --connect tcp://localhost:5050" | |
SAWTOOTH_INTKEY="sudo -u sawtooth intkey-tp-python -vv" | |
TEST_NODE="sawtooth block list" | |
tmux new-session \; \ | |
split-window -v \; \ | |
split-window -v \; \ | |
split-window -h \; \ | |
split-window -v \; \ | |
send-keys -t 0 "$SAWTOOTH_RESTAPI" Enter \; \ | |
send-keys -t 1 "$SAWTOOTH_SETTINGS" Enter \; \ | |
send-keys -t 2 "$SAWTOOTH_VALIDATOR" Enter \; \ | |
send-keys -t 3 "$SAWTOOTH_DEVMODE" Enter \; \ | |
send-keys -t 4 "$SAWTOOTH_INTKEY" Enter \; \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment