Getting Tezos set up

To get a Tezos network up and running I found the only way was to use Docker. The installation was riddled with bugs (probably due to an OSX update I did). Anyway, follow the 'how to get' instructions and follow the first section - Docker images.

If you want to give it a go, here are the steps:

wget https://github.com/ocaml/opam/releases/download/2.0.0/opam-2.0.0-x86_64-darwin
sudo mv opam-2.0.0-x86_64-darwin /usr/local/bin/opam
sudo chmod a+x /usr/local/bin/opam
opam
opam init --compiler=4.06.1
eval $(opam env)
git clone -b alphanet https://gitlab.com/tezos/tezos.git
cd tezos/
make build-deps
eval $(opam env)
make
./tezos-node identity generate
./tezos-node run --rpc-addr 127.0.0.1:8732 --connections 10

Once you have downloaded and converted the .sh files to executable (`chmod +x [file.sh]), start all processes with:

./babylonnet.sh

Add --help for more informations about the script.

Every command to the tezos-client can be equivalently executed using:

./babylonnet.sh client [command]

Similary, tezos-admin-client can be executed using:

./babylonnet.sh admin-client [command]

With the files above, you can use:

  • [bash file] node
  • [bash file] client
  • [bash file] admin-client
  • [bash file] {baker,endorser,accuser}-alpha

For example:

./alphanet.sh node status

or

./babylonnet.sh client man -v 3

With babylonnet you can get Tez from the Alpha faucet. Download the json file to the same location as the shell script and run something like:

./babylonnet.sh client activate account alice with "container:[name of downloaded faucet file].json"

Then check the balance:

./babylonnet.sh client get balance for alice

Which returns 0 ꜩ.

You will have to wait for the blockchain to download, took a couple of days for me.

Next, when you are building dapps locally, you might get a cors error. Utterly frustrating and I couldn't find any info in the docco. To fix it I ran docker using:

./babylonnet.sh start --rpc-port 127.0.0.1:8732 --cors-origin=http://localhost:8000 --cors-origin=node:8732 --cors-origin=localhost:8732