baker

Once you are connected to your machine where you want to run the baker (ssh or physically ) This guide doesn't take into account how to secure your machine ( OS and access to your machine ) you can procceed with steps below once you are ready

Setting up the Ledger Nano S

To install the Tezos Baking app:

On your PC/Mac, open

Ledger Live and go to Settings

Under ‘Experimental features’ enable ‘Developer mode’

You will now see 2 apps in the manager if you search for ‘Tezos’

Install both Tezos Wallet and Tezos Baking

Enabling access to the Ledger On Baker's computer

To interact with the Ledger in a Linux environment, you need to run the script from the Ledger devs below.

(you can verify it by comparing with the one shown on ledger.com, under ‘Linux’)

Go to the ‘tezos’ folder in Terminal and download the script.

wget https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh

Change permissions to make it executable.

chmod a+x add_udev_rules.sh

Run the script as root user.

sudo ./add_udev_rules.sh

Importing your Ledger’s secret key and alias Now you need to ‘pair’ the Tezos node and the Ledger.

Plug the Ledger into the baker, and open the Tezos Wallet app on the Ledger.

run this command in Terminal while in the ‘tezos’ folder:

./octez-client list connected ledgers

You’ll see 4 possible commands looking something like octez-client import secret key ledger_baker “ledger://weird-words-and-animals/ed25519/0h/0h”’

Copy the command with ‘ed25519’ in it, and add ‘./’ in front of it before pasting into the command line.

Run the command — it should look like this, but with your own ‘weird-words-and-animals’.

./tezos-client import secret key ledger_baker “ledger://weird-words-and-animals/ed25519/0h/0h”

You will need to confirm this on the Ledger. Check that the public key hash (tz-address) matches the one you are expecting to bake from.

Registering your baking address

With the node up to date and running, and the Ledger connected and set up, you need to register the address you imported to be a baker on the Tezos blockchain.

Keep the Tezos Wallet app open on the Ledger, and run the following command in Terminal on the Pi (replace ‘ledger_baker’ if you chose a different alias above).

./octez-client register key ledger_baker as delegate
Go to tzkt.io/[your-baker-tz-address] and look under “Delegations” to see if it has been done correctly. It should say something like “Registered as baker with 0.00035 XTZ fee”.

Setting up the Ledger for baking

Quit the Tezos Wallet app and open the Tezos Baking app.

Find the chain ID and number.

In Terminal, run the command below.

Again, change ‘ledger_baker’ if you gave it another alias.

./octez-client setup ledger to bake for ledger_baker --main-chain-id [CHAIN ID]

Confirm on the Ledger.

Baker installation

Install screen and Read about it usage 

Ubuntu installation

Wikipédia Screen

You need to know how to :

create screen :

screen -S SCREENNAME

list running screen :

screen -r

enter/attach screen by replacing SCREENAME by your:

screen -r SCREENNAME

detach a screen :

CTRL + A + D

Create a folder named tezos on home folder:

mkdir tezos

Enter tezos folder

cd tezos

We need to retrieve binary files from tezos gitlab gitlab tezos then click on binairies

Inside Release Binairies you should see two archives folder

( linux-arm64.tar.gz and linux-x86_64.tar.gz )

Right click to copy the link of the one corresponding to your computer ( x86_64 or arm64 to replace YYYY below ) then type

wget -cO -https://gitlab.com/tezos/tezos/-/package_files/XXX/download tezos-XX.X-linux-YYYY.tar.gz

( replace XX.X by current version and gitlab link by the one you copy )

unzip file once downloaded

tar -xf tezos-XX.X-linux-YYYY.tar.gz

enter into unzip folder

cd octez-arm64 or cd octez-x86_64

copy and move these file to tezos folder

octez-client octez-node octez-accuser octez-baker

inside tezos folder enable execution scripts rights

chmod a+x octez-client octez-node octez-accuser octez-baker

installing zcash parameter ( since EDO upgrade Tezos have Zcash's privacy tech )

Download the script

  wget https://raw.githubusercontent.com/zcash/zcash/master/zcutil/fetch-params.sh

Change permission to make the file executable

chmod a+x fetch-params.sh

Then run it ( without sudo )

./fetch-params.sh

Download Rolling Snapshot from https://xtz-shots.io/mainnet/

wget LINKSNAPSHOT

Once Download , import snapshot

./octez-node snapshot import XXX.rolling

NBA process ( Node , Baker, Accuser )

Running the node

Start Screen for node process

screen -S node

Start your node

./octez-node run --rpc-addr 127.0.0.1:8732

detach screen

CTRL + A + D

In order to verify if your node is bootstrapped

./octez-client bootstrapped

Message : node bootstrapped should appear to inform that your node is ready

Important do not run process octez-baker more than one at same time, check your screens in case of update

At this step verify that your ledger is connected and Tezos Baking app is running and you have alias ledger_baker existing

Check

./octez-client list known addresses

Start Screen for baker process :

screen -S baker

Start baker :

./octez-baker run with local node ~/.octez-node ledger_baker

Detach screen baker :

CTRL + A + D

Start Screen for accuser process :

screen -S accuser

Start accuser :

./octez-accuser run 

Detach screen accuser :

CTRL + A + D

List All Screens :

screen -r

That's it , you should be able to reenter each screen and monitor your baker in next section

Congratulations, you are now baking safely on Tezos with your Ledger !