Skip to content

Instantly share code, notes, and snippets.

@cayblood
Last active December 9, 2020 23:47
Show Gist options
  • Save cayblood/b63ab7bc415fbf5c0af4a1f25c3a52ed to your computer and use it in GitHub Desktop.
Save cayblood/b63ab7bc415fbf5c0af4a1f25c3a52ed to your computer and use it in GitHub Desktop.
How to set up a tezos baker on EC2 ubuntu 18.04
###############################################################
# TEZOS BAKING SETUP
#
# Technical overview: http://tezos.gitlab.io/mainnet/whitedoc/proof_of_stake.html
#
# other tools: https://github.com/bakechain/bakechain
# https://github.com/Cryptonomic/Deployments/wiki/Galleon:-Releases
#
# short link: http://bit.ly/tezos-baker
#
# select t2.small or t3.small, 300 GB so you have plenty of space to store the blockchain
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y rsync git m4 build-essential patch unzip bubblewrap wget libev-dev libgmp-dev pkg-config libhidapi-dev
wget https://github.com/ocaml/opam/releases/download/2.0.0/opam-2.0.0-x86_64-linux
sudo cp opam-2.0.0-x86_64-linux /usr/local/bin/opam
sudo chmod a+x /usr/local/bin/opam
git clone https://gitlab.com/tezos/tezos.git
cd tezos
git checkout mainnet
opam init --bare
make build-deps
eval $(opam env)
make
export PATH=~/tezos:$PATH
source ./src/bin_client/bash-completion.sh
export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y
./tezos-node identity generate
# if you want to import an account:
./tezos-client add address my_account <pubkey>
./tezos-client activate fundraiser account fundraiser with <activation_key>
./tezos-client import fundraiser secret key my_account
./tezos-client get balance for my_account
# if you have enough XTZ and want to set up your account as a delegate (baker):
./tezos-client register key my_account as delegate
# run the node as a background process
./tezos-node run --private-mode --rpc-addr 127.0.0.1:8732 --connections 5 >> ~/.tezos-node.log 2>&1 &
# run this command to see how close you are to downloading the whole blockchain
./tezos-client bootstrapped
# wait for blockchain sync
# ...
# in separate screen sessions
./tezos-baker-002-<sdgsdg> run with local node ~/.tezos-node
./tezos-endorser-002-<sdgsdg> run
./tezos-accuser-002-<sdgsdg> run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment