How to Deligate Zopf Tezzies (Tezos’ XTZ) with Pâtissière Awa from Cryptium Bäckerei

Awa Sun Yin
Cryptium Labs
Published in
9 min readJul 17, 2018

Bonjour XTZ connaisseuses et connaisseurs. We are really excited to announce that Cryptium Bäckerei will be open soon!*. It’s been a few days since we released our letter to delegators, but now we are many steps closer to the grand opening and there are some things we need to do before the big day. Following this delicious recipe of traditional Swiss Zopf:

Like any bread, Zopf is best enjoyed on the same day. If you want to prepare it the day before so it’s ready early morning for your breakfast […] — Little Zürich Kitchen

Like an Italian would say, chi dorme non piglia pesci! We gonna call this stage of preparations: Zopf Tezzies’ Pre-Baking. And either you are a current or future delegator or Tezos’ enthusiast, your learning and participation is very important.

*Ehm… In 2–3 weeks starting from yesterday.

What I talk about when I talk about Zopf Tezzies’ Pre-Baking Preparations

While we wait for the grand opening, we have a lot of work to do internally as Cryptium Bäckerei, but also want to prepare delegators for it, share with bakers and community members, so whatever your participation is, you can do it safely, without getting burnt!

This article is the dawn of the Pre-Baking stage: How to Deligate Zopf Tezzies (Tezos’ XTZ) on the Betanet avec moi, pâtissière Awa.

In particular, these are the steps taken:

  1. Checklist for Preparing the MacOS Oven: Installing all the necessary tools on your OS.
  2. Preparing the Ingredients for the Betanet: Compiling Tezos from source.
  3. Running the Betanet Client: Without running your own node and connecting to Cryptium’s Tezos Full Node!
  4. Delegating XTZ From Your Ledger

Now, let’s roll our sleeves up!

Preparing the dough is one of the hardest, yet most important steps in the baking process, it is so time consuming that we suggest other bakers to take 2–3 weeks for training before actual baking time

How to Delegate Zopf Tezzies (Tezos’ XTZ) on the Betanet Using A MacOS Oven

If you have never run any of the testnets, I strongly suggest doing some testing before the real thing. The main reason why I prefer the Zeronet in that case is because the it’s the closest to the Betanet**. Also, most of the steps are the same.

**Zero vs. Alphanet: The Alphanet is running a slightly older version than the Zeronet. It was meant to be the long-running testnet, and to avoid bringing it down, it does not get upgraded as often as the Zeronet.

However, this guideline is for the Betanet, which will turn into Tezos’ Mainnet, as transactions are promised to persist across.

STEP 1: Checklist for Preparing the MacOS Oven

Before starting, make sure you have the following. If you are a developer and have your device’s development environment setup, you can skip this list. Here I am assuming that you might not have all the command line tools installed or updated.

  • Update your MacOS software: (Apple icon → About this Mac → Software Update). This is actually not “necessary”, but it’s good to get used to always keep your software updated.
  • Check that your Terminal or variants such as iTerm are up-to-date

Warning! Code blocks ahead.

Get your coffee ☕ and get comfy ☁️, the upcoming sections are lengthy but worth doing properly to have a smooth dough.

For simplicity, “$” notes the beginning of a command and “→” notes the expected output of the command on your Terminal, and “#” is used for comments.

Then run the following commands on your Terminal and check that your kitchen has all the necessary equipment:

$ xcode-select --install[...]→ xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Let’s check that make has been installed:

$ which make
→ /usr/bin/make
  • Is Homebrew installed and updated? To check if you have brew installed, run the following command on your Terminal:
$ which brew

If brew is installed, the output should look like:

→ /usr/local/bin/brew

If not, you will have to follow the guideliness on installing brew. Everytime I reinstall my Mac, I follow this guidelines: http://sourabhbajaj.com/mac-setup/Homebrew/.

$ brew install wget
→ Updating Homebrew...
[...]→ wget 1.19.4_1 is already installed
  • Is git installed and updated?
$ brew install git
→ Error: git 2.16.3 is already installed
$ which git
→ /usr/local/bin/git
  • What is your current path? Where you install everything does not matter, but it’s helpful to know where the things are installed for navigating and troubleshooting:
$ pwd
→ /Users/<yourusername>

All checked? Yay, you made it! Wash your hands and let’s get them dirty with flour!

STEP 2: Preparing the Ingredients for the Betanet

If you look at Tezos’ documentation on the different versions, you will see two paths: Docker and from source files. Let’s avoid Docker, for now.

The tools in the previous section are generic development tools that are handy to have either you want to run Tezos or not. In this section,the command line tools that are specific to Tezos. These are OCaml 🐫 which you might have never heard of unless you’re a French PhD student, and OPAM, its package manager.

  • Install OCaml (the required version is 4.06.1 but brew will install a newer version) and OPAM:
$ brew install ocaml$ brew switch ocaml 4.06.1 
# if you already installed a newest, this will switch to the correct version
→ Error: ocaml 4.06.1 is already installed$ brew install opam
→ Error: opam 1.2.2_4 is already installed
  • Get the Tezos repository (remember what path you are at):
$ git clone https://gitlab.com/tezos/tezos.git
→ Cloning into 'tezos'...
remote: Counting objects: 48874, done.
remote: Compressing objects: 100% (13087/13087), done.
remote: Total 48874 (delta 38804), reused 43483 (delta 35565)
Receiving objects: 100% (48874/48874), 26.20 MiB | 1.03 MiB/s, done.
Resolving deltas: 100% (38804/38804), done.

Now you have a folder called tezos in your path, so if:

$ cd tezos/$ pwd→ /Users/<yourusername>/tezos

Note that you are by default in the master branch (master version of Tezos). Now, let’s checkout to the Betanet branch (Betanet version of Tezos):

$ git checkout betanet

Look how the green word master changes to betanet:

Switching Tezos branches or versions
  • Pull the latest version from git, making sure that all files are up-to-date:
$ git pull
  • Install dependencies (it can take a while, so get some entertainment while observing the Terminal):
$ make build-deps
→ Processing 1/1: [tezos: git]
[tezos] Initialised
[...]<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-base-compiler.4.06.1
∗ installed ocaml.4.06.1
Done.
[...]To globally enable AFL instrumentation, use an OCaml switch such as
4.04.0+afl.

Phew, now compile it (it’s pretty quick):

$ make 
→ Done: 2006/2835 (jobs: 4)
[...]

And, voilà, this should produce a bunch of binaries:

$ ls 
→ [some other files]
tezos-admin-client
tezos-client
tezos-node
tezos-protocol-compiler
tezos-signer

Binaries are programs, software ready to run. The name sounds pretty intimidating, but they are just like the apps you have on your computer, which you open when you double-click on the logo.

Phew, in the next section, we will be testing the most rellevant binaries!

STEP 3: Running the Betanet Client: Baking Mix and the Art of German-Swiss Kneten

When following these steps, imagine a German-Swiss looking baker kneading the baking mix and forming the dough.

Remember the binaries you obtained from the previous step? In MacOS ovens, you can run binaries by adding “./” in front. Let’s analyse the following command without running it:

$ ./tezos-node identity --help

Where ./tezos-node is the binary, identity is the command, and --help is a flag. When running this it displays the documentation for identity:

NAME
tezos-node-identity — Manage node identities
SYNOPSIS
tezos-node identity [OPTION]… [OPERATION] [DIFFICULTY]
DESCRIPTION
The identity command is meant to create and manage node identities. An identity uniquely identifies a peer on the network and consists of a cryptographic key pair as well as a proof-of-work stamp that certifies that enough CPU time has been dedicated to produce the identity, to avoid sybil attacks. An identity with enough proof-of-work is required
[...]

Let’s check that the client binary is ready by:

$ ./tezos-client
→ [shows documentation]

Now, you don’t need to generate a node identity for delegation because you don’t need to run your own node. We maintain a full node for our community**. Which means that you don't have to sync one from scratch:

# the full node is located at:
fullnode.tezos.cryptium.ch

** We know that this might be DDoS’ed, we just want to believe in the good faith of our community (◕‿◕✿)

To tell your client to connect to our full node whenever you run a command that requires connection to a node:

$ ./tezos-client -A fullnode.tezos.cryptium.ch# all commands should be ran with the -A flag

Ah! We recommend using Tz Scan as the default block explorer. You can check the address of Cryptium Bäckerei: https://tzscan.io/tz1eEnQhbwf6trb8Q8mPb2RaPkNk2rN7BKi8

STEP 4: Delegating Your Tezzies (XTZ) to Cryptium Bäckerei

As the Mainnet is not live yet, there are limited sources of the Tezzies (XTZ) you’re holding. On a separate article, we will write about how to delegate for each of the 4 possible situations:

a) Fundraiser Tezzies and No Ledger

b) Fundraiser Tezzies and Ledger

c) Exchange or OTC Tezzies and No Ledger

d) Exchange or OTC Tezzies and Ledger

There are slight differences on each of these paths, e.g. Fundraiser Tezzies require account activation or Ledger usage will include extra steps on how to keep the Ledger up-to-date and access the Tezos Ledger App.

For simplicity, in this article, we will assume that you have your XTZ accessible in your Ledger, meaning that you managed to generate an account on Ledger and got XTZ transferred to your account.

Delegating XTZ from Your Ledger

Before continuing, let’s review the account types in Tezos. There are three types of accounts:

  • Implicit accounts registered as delegates (bakers): Yes to baking yourself.
  • Implicit accounts not registered as delegates (bakers): No to baking.
  • Originated accounts and contracts: Yes to baking, if they have a delegate account set and this baker is actually baking (delegation).

Okay, before continuing, remember to connect your Ledger and open the Tezos App.

First, after navigating to where your Tezos Betanet binaries are, register the Cryptium Bäckerei address as a known baker. Double check that the address is `tz1eEnQhbwf6trb8Q8mPb2RaPkNk2rN7BKi8`:

$ ./tezos-client -A fullnode.tezos.cryptium.ch add address cryptium_labs_baker tz1eEnQhbwf6trb8Q8mPb2RaPkNk2rN7BKi8# before pressing enter, triple-check that the address is:
tz1eEnQhbwf6trb8Q8mPb2RaPkNk2rN7BKi8
# before pressing enter, quadru-check that the address is:
tz1eEnQhbwf6trb8Q8mPb2RaPkNk2rN7BKi8

We need to generate an <originated> account. The <my_account> you had before is an implicit account, which you can use for baking if you want, but for delegating we need an originated account:

$ ./tezos-client -A fullnode.tezos.cryptium.ch originate account <originated> for <my_account> transferring <qty> from <my_account> --delegate cryptium_labs_baker --fee 0.00

Where:

  • -A fullnode.tezos.cryptium.chis connecting to Crytium’s Tezos Full Node, and in this case for transferring you would either need to run your own node on the background or connect to one as a service.
  • <originated> is the name you give to your newly account of originated type.
  • <my_account> is the name of your the account you generated using the Ledger, of implicit type. If you imported the key set generated by Ed25519, then the name of your account looks like ledger_<username>_ed
  • <qty> is the amount of XTZ you want to delegate
  • --delegate cryptium_labs_baker works because you ran the previous step of adding Cryotium Bäckerei as a known baker address
  • --fee 0.00

For instance, this is how my command looked like:

$ ./tezos-client -A fullnode.tezos.cryptium.ch originate account ledger_awa_ed_originated for ledger_awa_ed transferring 0.2 from ledger_awa_ed --delegate cryptium_labs_baker 
--fee 0.0

Once you run this command for delegation, check your connected Ledger, it will request you to sign this transaction. Then the Terminal will show:

→ Waiting for the node to be bootstrapped before injection…
Current head: BMC1HtXczrbL (timestamp: 2018–MM–DDTHH:MM:SSZ, validation: 2018–MM–DDTHH:MM:SSZ)
Node is bootstrapped, ready for injecting operations.
Estimated storage: no bytes added
Operation successfully injected in the node.
[details of the tx]New contract <contract> originated.
The operation has only been included 0 blocks ago.
We recommend to wait more.
Use command tezos-client wait for <tx hash> to be included --confirmations 30 and/or an external block explorer.

Finally, you should be able to see your delegation on the block explorer: https://tzscan.io/tz1eEnQhbwf6trb8Q8mPb2RaPkNk2rN7BKi8

Phew… (*wipes sweat*). You made it! ( ˘▽˘)っ♨

This article was getting so long that I decided to break down the delegation guidelines to a separate article so we can treat each of the cases with detail.

If you’re struggling with anything, non avere peli sulla lingua! Join our Bäckerei group on Telegram, where we answer questions from our community.

Talk later!

--

--