How to bake and endorse with your Trezor (alpha version)

Juraj Selep
TezEdge
Published in
7 min readMar 19, 2019

Welcome to the TezEdge Medium!

We’re a team of developers who are working on improving Tezos and we are currently focused on integrating Tezos support for the Trezor hardware wallet.

This guide will show you how to:

  • upload the baking firmware onto your Trezor T
  • set up the Trezor Remote Signer for the Tezos zeronet
  • bake and endorse on the Tezos zeronet

Be aware that this is not the final version. If you want a bug free experience, please wait a few weeks while we work on completing our baking support for Tezos. In the meantime, we invite you to play around with our alpha version. All of your comments and feedback will be welcome as they help us develop the best product possible.

Necessary pre-requisites:

  • Have Ubuntu installed on your PC
  • Have a Trezor T
  • Have a running Tezos zeronet node
  1. Download and install Docker and Docker Compose

Go to the Docker website and register as a new user, then download Docker for Ubuntu:

Download and install Docker Compose:

2. Download the Trezor Remote Signer

Open shell and type this code into the command line and then press Enter:

git clone https://github.com/tezedge/trezor-remote-signer.git
cd ./trezor-remote-signer

3. Run the Trezor Remote Signer

You can now run the Remote Signer. You can view a list of the Remote Signer’s commands by typing this into the command line and pressing Enter.

./run.sh --help

A list of tools for baking will display, as pictured in the screenshot below:

4. Make a backup of the data on your Trezor T

If you have a new Trezor T that has never been used before, the screen pictured below will appear. In that case, you do not need to make a backup, and you can go to step 5.

Important: make a backup of your data (the seed phrase, also known as the mnemonic).

Be aware that uploading new firmware onto your Trezor will necessitate a complete wipe of the Trezor. You should back up all of your data before proceeding.

Visit the Trezor Wallet website. Go to the Advanced tab and scroll down until you locate the orange Wipe Device button. After you’ve made sure that you have backed your data up, click on the Wipe Device button.

5. Run bootloader mode on your Trezor T

While connecting the cable from your PC into your Trezor T device, swipe your finger across the screen multiple times until the bootloader screen appears. You can view this animation on how to do it:

This should appear on the screen of your Trezor T. Press the green tick button to connect the Trezor T to your PC.

You can check if your Trezor T is connected to your PC through the USB cable by typing this into the command line and pressing Enter.

lsusb -d 1209:53c0

If your Trezor T is connected, this should appear:

If nothing happens, you may need to provide an udev rule. Visit the Trezor Wiki for instructions on how to do it.

After pressing the green tick button, this screen should appear on your Trezor T. This means the device is ready to receive the firmware upload.

6. Upload the Tezos baking firmware for Trezor T

Type this into the command line and then press Enter:

./run.sh --upload-firmware

Wait until the process is finished, it will take several minutes to complete. Once it has finished compiling the firmware, this screen will appear:

6. Confirm the firmware update

The screen will display the following warning:

This warning appears because the firmware has not yet been authorized by Satoshi Labs (the company behind Trezor). The production-ready version of the firmware will be authorized.

Confirm the new firmware by pressing the green tick button. A circular loading screen will appear, as pictured below:

Wait until the bar has filled up completely and a check mark appears on your Trezor T screen:

The Trezor will restart automatically and display this warning message:

Again, the warning appears because the firmware has not yet been authorized. Do not worry, the device is safe to use for testing purposes.

7. Download test wallets from the Tezos Faucet

Visit the Tezos Faucet to receive your free Tezos zeronet tokens. Solve the captcha and then click on Get Alphanet ꜩ. This will download a file through your browser. Each file will contain a wallet with a random amount of test-purpose tokens. Download at least four files so that you will have a minimum of 10,000 tokens.

Move the downloaded files from your default download folder into the Tezos Client Faucet by typing the following command and pressing Enter.

cp ~/Downloads/*.json ./tezos-client/faucet

8. Set up your baking

In the Remote Signer console, type the following command and press Enter

./run.sh --initialize

This will initiate a series of commands that you need to authorize on your Trezor T screen. They are the following:

  • Creation of a wallet
Confirm by pressing green tick button.
  • Creation of the wallet’s PIN
Confirm by pressing green tick button.
Type a new PIN, then type it again to confirm it.
  • The activated tokens will be automatically transferred to your Trezor baking address.
  • Registration as a baker

9. Start endorsing and baking

Edit the config.baking.env file and set its environment variable TEZOS_NODE_DATA_PATH to Tezos node data directory (SHOME/tezos-node).

In case the Remote Signer cannot access the data directory, the baking will not start but the endorsement will.

Entering this into the command line will initialize endorsing and baking.

Your Trezor will display this screen:

Hold the green button until this screen appears:

Important: After you see the screen pictured above, you will have to wait a grace period of 7 cycles. Each cycle on zeronet takes approximately 40 minutes, 7 cycles should take about 5 hours. After this grace period has passed, you will start baking and endorsing.

When your Trezor T is set to baking mode, you cannot transfer, originate nor delegate Tezos tokens. While in baking mode, you can only perform endorsing and baking operations.

If everything works out correctly, your Trezor T screen should display the following:

On the Remote Signer, you should see this message:

If you’ve succeeded in setting up baking, your Trezor T should display this screen:

Your Remote Signer should display this:

10. Stop baking and endorsing

Press Ctrl + C to stop the baking and endorsing process.

In order to transfer, originate and delegate Tezos tokens, you need to switch off baking mode on your Trezor T. Do it by typing this into the command line and press Enter

./run.sh --stop

Enter your PIN to stop baking. This is a security measure that prevents adversaries from accessing your tokens while your Trezor T is in baking mode.

Be aware that this is a development version. The production version will be more user friendly and simpler to navigate.

We are working on direct Trezor T support for the OCaml-based Tezos client that will not require a Remote Signer or any the 3rd party software to bake and endorse.

I appreciate all of your messages. If you have any trouble following these instructions or you want to leave any comments, please contact me at jurajselep@viablesystems.io. You can also help shape the Tezos Rust node by filling out the survey.

--

--