I tested Tezos

Mathis Selvi
ON-X Blockchain (Chain-Accelerator)
7 min readApr 18, 2019
Tezos Logo

I followed the Documentation from Tezos that you can find here:

https://tezos.gitlab.io/alphanet/index.html

The environment I used

I am using VirtualBox with Debian:

Configuration:

  • OS type : Linux - Debian 64 Bit
  • Disk type : VDI 700 Go (dynamic)
  • Memory : 4 Go
  • Video memory: 32 Mo
  • CD Rom: debian-testing-amd64-netinst.iso

Result:

Tezos VM Specs

Note:

If you need to extend the VDI Size (Windows):

> "D:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "D:\Users\Chain Accelerator\VirtualBox VMs\tezos\tezos.vdi" --resize 700000

My Debian testing (buster)

Lien vers le Gist:

Install Debian:

  • without root password (sudo activated)
  • Default Debian interface
  • No other requirement

Debian first run:

chainacc@tezos:~$ cd ~chainacc@tezos:~$ sudo apt-get updatechainacc@tezos:~$ sudo apt-get upgradechainacc@tezos:~$ sudo apt-get install -y vim emacs ntpdate tree wget git curlchainacc@tezos:~$ sudo ntpdate-debianchainacc@tezos:~$ cd ~

Installing Tezos prerequisites

chainacc@tezos:~$ cd ~chainacc@tezos:~$ sudo apt-get install rsync m4 bubblewrap libev-dev libgmp-dev pkg-config libhidapi-devchainacc@tezos:~$ sudo apt-get install apt-transport-https ca-certificates gnupg-agent software-properties-commonchainacc@tezos:~$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -chainacc@tezos:~$ sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/debian/ $(lsb_release -cs) stable"chainacc@tezos:~$ sudo apt-get updatechainacc@tezos:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-composechainacc@tezos:~$ sudo groupadd dockerchainacc@tezos:~$ sudo usermod -aG docker ${USER}chainacc@tezos:~$ sudo reboot 0

Now that we are done setting up our environment let’s start using Tezos!

Working with Tezos

Lien vers le gist :

Get Tezos

We will be using Tezos’ test network: Alphanet.

chainacc@tezos:~$ wget https://github.com/ocaml/opam/releases/download/2.0.1/opam-2.0.1-x86_64-linuxchainacc@tezos:~$ sudo cp opam-2.0.1-x86_64-linux /usr/local/bin/opamchainacc@tezos:~$ sudo chmod a+x /usr/local/bin/opamchainacc@tezos:~$ git clone https://gitlab.com/tezos/tezos.gitchainacc@tezos:~$ cd tezoschainacc@tezos:~$ git checkout alphanetchainacc@tezos:~$ opam init --barechainacc@tezos:~$ make build-depschainacc@tezos:~$ eval $(opam env)chainacc@tezos:~$ makechainacc@tezos:~$ export PATH=~/tezos:$PATHchainacc@tezos:~$ source ./src/bin_client/bash-completion.shchainacc@tezos:~$ export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y

Use Tezos

To make sure everything went okay, please check that all of the following binaries are available:

  • tezos-node: the tezos daemon itself;
  • tezos-client: a command-line client and basic wallet;
  • tezos-admin-client: administration tool for the node;
  • tezos-{baker,endorser,accuser}-alpha: daemons to bake, endorse and accuse on the Tezos network;
  • tezos-signer: a client to remotely sign operations or blocks;

(Directly from https://tezos.gitlab.io/alphanet/introduction/howtouse.html)

Generate your Node Identity:

chainacc@tezos:~$ ./tezos-node identity generate

/!\ It may take several minutes.

You can now run your node with the following command:

chainacc@tezos:~$ ./tezos-node run --rpc-addr 127.0.0.1

BE CAREFUL. It takes time to actually sync the node. Avoid using a HDD and rather use a SSD instead.

To know if your node synced, simply do the following command and see if the dates match or are very close. If not, it means that your node is not done syncing yet.

chainacc@tezos:~$ ./tezos-client get timestamp && date -u -Isec

Run Tezos (Use Case)

Bob wants to delegate some coins to Alice, a Baker.

  • Creating Alice and Bob wallets

Let’s go to Alphanet Faucet here: https://faucet.tzalpha.net/ and grab some Tezos. Once you have the .JSON file (preserve it), simply create Alice account:

./tezos-client activate account Alice with FILE_HERE.JSON

(Replace FILE_HERE.JSON with your file.json from the faucet)

Got ꜩ 10448.944029 for Alice.

Warning:

This is NOT the Tezos Mainnet.

The node you are connecting to claims to be running on the
Tezos Alphanet DEVELOPMENT NETWORK.
Do NOT use your fundraiser keys on this network.
Alphanet is a testing network, with free tokens.
Node is bootstrapped, ready for injecting operations.
Operation successfully injected in the node.
Operation hash is 'opL11AupQHVemGLywLVLgfcnR9zHmNg6xCSruC2xxK7nFCP2Hj4'
Waiting for the operation to be included...
Operation found in block: BLbrAQgd31WDfG98LhCWbFULwQHrYq7HEbZcCDgZQ5CLNjDza6q (pass: 2, offset: 0)
This sequence of operations was run:
Genesis account activation:
Account: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
Balance updates:
tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx ... +ꜩ10448.944029
The operation has only been included 0 blocks ago.
We recommend to wait more.
Use command
tezos-client wait for opL11AupQHVemGLywLVLgfcnR9zHmNg6xCSruC2xxK7nFCP2Hj4 to be included --confirmations 30 --branch BLHZ6LpZx8629kGH58Xm5prs9Sg8ubjhqAznL6pHVsqnKFTqgSF
and/or an external block explorer.
Account Alice (tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx) activated with ꜩ10448.944029.

Let’s do the same for Bob. Go back to the faucet and grab another one.

./tezos-client activate account Bob with FILE_HERE.JSON

Node is bootstrapped, ready for injecting operations.
Operation successfully injected in the node.
Operation hash is 'onhVo1x5BahKxSixipFc5sdbnqeB2b6JkBiruuSDNeP3pahJzhT'
Waiting for the operation to be included...
Operation found in block: BLhQW7Mwj5ct1bF6n6XD6EnEcHiU78ScYm5C5PQezW9UQLYQxg8 (pass: 2, offset: 0)
This sequence of operations was run:
Genesis account activation:
Account: tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ
Balance updates:
tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ ... +ꜩ298.57736
The operation has only been included 0 blocks ago.
We recommend to wait more.
Use command
tezos-client wait for onhVo1x5BahKxSixipFc5sdbnqeB2b6JkBiruuSDNeP3pahJzhT to be included --confirmations 30 --branch BMMUEEa1pRUJb9krdKQL4j6GwSTSStYSNK6SM31yEK3kY16Jdbc
and/or an external block explorer.
Account Bob (tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ) activated with ꜩ298.57736.
  • Running a delegate

We just need a little more Tez to cover security deposits and such, so to avoid missing funds, we’ll just create another account from the faucet and transfer the tez to Alice.

./tezos-client activate account ChainAcc with FILE_HERE.JSON

And then:

./tezos-client transfer 9000 from ChainAcc to Alice --fee 1

Node is bootstrapped, ready for injecting operations.
Estimated gas: 10100 units (will add 100 for safety)
Estimated storage: no bytes added
Operation successfully injected in the node.
Operation hash is 'oosWqwUkvxBGujbvDBGcu7QHk6AAEVVjik8eR6xAm48Ay7DXCve'
Waiting for the operation to be included...
Operation found in block: BLKYiyAdcPqytJb62oyFh8tZG1La4kYmgY6FF3hsMq2eTVE44it (pass: 3, offset: 0)
This sequence of operations was run:
Manager signed operations:
From: tz1Y4Qy4W4TVg7R4gDGZ19kf3cX7mGui6QUs
Fee to the baker: ꜩ0
Expected counter: 36913
Gas limit: 10000
Storage limit: 0 bytes
Revelation of manager public key:
Contract: tz1Y4Qy4W4TVg7R4gDGZ19kf3cX7mGui6QUs
Key: edpkuNfgjCZzzYaZKYvNjytzd2aT5m3NCuvSbm3nG7y2a61NkUo3vQ
This revelation was successfully applied
Consumed gas: 10000
Manager signed operations:
From: tz1Y4Qy4W4TVg7R4gDGZ19kf3cX7mGui6QUs
Fee to the baker: ꜩ1
Expected counter: 36914
Gas limit: 10200
Storage limit: 0 bytes
Balance updates:
tz1Y4Qy4W4TVg7R4gDGZ19kf3cX7mGui6QUs ............. -ꜩ1
fees(tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5,149) ... +ꜩ1
Transaction:
Amount: ꜩ9000
From: tz1Y4Qy4W4TVg7R4gDGZ19kf3cX7mGui6QUs
To: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
This transaction was successfully applied
Consumed gas: 10100
Balance updates:
tz1Y4Qy4W4TVg7R4gDGZ19kf3cX7mGui6QUs ... -ꜩ9000
tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx ... +ꜩ9000
The operation has only been included 0 blocks ago.
We recommend to wait more.
Use command
tezos-client wait for oosWqwUkvxBGujbvDBGcu7QHk6AAEVVjik8eR6xAm48Ay7DXCve to be included --confirmations 30 --branch BKwVBhoaaQSwRycbSqh6o9EgBQ8ca97FgS9cwqgLifaikNQAin9
and/or an external block explorer.

Let’s check Alice’s new balance:

./tezos-client get balance for Alice

And we get 19448.944029 ꜩ (you need at least ONE roll to bake, 1 roll being 10k ꜩ).

We can now run a delegate.

./tezos-client register key Alice as delegate

Node is bootstrapped, ready for injecting operations.
Estimated gas: 10000 units (will add 100 for safety)
Operation successfully injected in the node.
Operation hash is 'opCe8bm1WBbFmAJezdA6rTZevAsJeqJJo5BQVwe9vdatx6jQ8oc'
Waiting for the operation to be included...
Operation found in block: BKpQmuDigMFBAGmwFF1NDA7J3YJ1R15bEyVkeAB9EGR9N9uqF2B (pass: 3, offset: 0)
This sequence of operations was run:
Manager signed operations:
From: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
Fee to the baker: ꜩ0.00126
Expected counter: 36898
Gas limit: 10000
Storage limit: 0 bytes
Balance updates:
tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx ............. -ꜩ0.00126
fees(tz1SAAYjCwU5TGHZkigrG8iFSm3uhN2hHzfp,149) ... +ꜩ0.00126
Revelation of manager public key:
Contract: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
Key: edpkvCTJfXDKx99BWg3Zi2CbRvBYo27xJrzA9fkhWb1GnKSaLvNh2i
This revelation was successfully applied
Consumed gas: 10000
Manager signed operations:
From: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
Fee to the baker: ꜩ0.001163
Expected counter: 36899
Gas limit: 10100
Storage limit: 0 bytes
Balance updates:
tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx ............. -ꜩ0.001163
fees(tz1SAAYjCwU5TGHZkigrG8iFSm3uhN2hHzfp,149) ... +ꜩ0.001163
Delegation:
Contract: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
To: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
This delegation was successfully applied
Consumed gas: 10000
The operation has only been included 0 blocks ago.
We recommend to wait more.
Use command
tezos-client wait for opCe8bm1WBbFmAJezdA6rTZevAsJeqJJo5BQVwe9vdatx6jQ8oc to be included --confirmations 30 --branch BKrrovgFMsYTat9FaQXMuA235x6JduWQwNagh2MdYvmdgucj5Ww
and/or an external block explorer.

Alice is now a delegate. We can now start baking. Please note that the part in bold can be different for you.

./tezos-baker-003-PsddFKi3 run with local node ~/.tezos-node Alice

Waiting for the node to be synchronized with its peers...
Node synchronized.
Baker started.

Now Bob wants to delegate to Alice, here is how:

./tezos-client originate account bob_del for Bob transferring 250 from Bob --delegate Alice

Error here:

Node is bootstrapped, ready for injecting operations.
Fatal error:
The operation will burn ꜩ0.257 which is higher than the configured burn cap (ꜩ0).
Use `--burn-cap 0.257` to emit this operation.

To fix this, we just follow the instructions:

./tezos-client originate account bob_del for Bob transferring 250 from Bob --delegate Alice --burn-cap 0.257

Aaaaand it works!

Node is bootstrapped, ready for injecting operations.
Estimated gas: 10000 units (will add 100 for safety)
Estimated storage: 257 bytes added (will add 20 for safety)
Operation successfully injected in the node.
Operation hash is 'op3Ksw1rbZaxz3VTDgKoAEt8kR56cZLCqMivDdFNMVNQcWF8d9Y'
Waiting for the operation to be included...
Operation found in block: BKtjbMXmHy4jd8p7r6rgQ6J6ZmQWkNSm7kkSdznE2ECAfUH5XYs (pass: 3, offset: 0)
This sequence of operations was run:
Manager signed operations:
From: tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ
Fee to the baker: ꜩ0.00126
Expected counter: 36913
Gas limit: 10000
Storage limit: 0 bytes
Balance updates:
tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ ............. -ꜩ0.00126
fees(tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5,151) ... +ꜩ0.00126
Revelation of manager public key:
Contract: tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ
Key: edpkurdcvBDdJJUxTG3SecwgqEDqmyYedCqwQok7GCPqfZML8qPZM3
This revelation was successfully applied
Consumed gas: 10000
Manager signed operations:
From: tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ
Fee to the baker: ꜩ0.001192
Expected counter: 36914
Gas limit: 10100
Storage limit: 277 bytes
Balance updates:
tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ ............. -ꜩ0.001192
fees(tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5,151) ... +ꜩ0.001192
Origination:
From: tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ
For: tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ
Credit: ꜩ250
No script (accepts all transactions)
Delegate: tz1VFgcWrcLvxpWcMvKnzFZpLjWxNT4wuosx
Spendable by the manager
This origination was successfully applied
Originated contracts:
KT1C9UTY9fVXWaEpUxLfxaxdZKi2uuoFjRa1
Consumed gas: 10000
Balance updates:
tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ ... -ꜩ0.257
tz1hBT7dx9aaiZTEsSJUnB8fKQ76EswyTLgZ ... -ꜩ250
KT1C9UTY9fVXWaEpUxLfxaxdZKi2uuoFjRa1 ... +ꜩ250
New contract KT1C9UTY9fVXWaEpUxLfxaxdZKi2uuoFjRa1 originated.
The operation has only been included 0 blocks ago.
We recommend to wait more.
Use command
tezos-client wait for op3Ksw1rbZaxz3VTDgKoAEt8kR56cZLCqMivDdFNMVNQcWF8d9Y to be included --confirmations 30 --branch BLyL2RWNczdSLYJozjVVuG1AEJrv87Uv2dA9Pr2pNNiaJNAtGcu
and/or an external block explorer.
Contract memorized as bob_del.

If we go on https://alphanet.tzscan.io/ and check for Alice’s account, we see this:

Alice’s Balance

Alice has a balance of ꜩ 19 448 but her staking balance has ꜩ 250 more (these were delegated by Bob).

Let us know which offer you are interested in and apply here => this form.

Don’t forget to follow us on social medias : twitter, telegram, slack

--

--

Mathis Selvi
ON-X Blockchain (Chain-Accelerator)

🛠️ Working on Tezos 👟 Fashion Enthusiast 💿 Music Lover