Running a Tezos node on the *alphanet* and the *zeronet* made super-simple (with RPI3)


#21

@glebowski,
ops… there is no need to use the sudo command because it will invoke the root/administrator privilege, and we don’t want that, everything should be carried on as a user (tzuser), just type:
./tz-start.sh


#22

@maxtez-raspbaker For some reason I have to use sudo or I’m getting super confused and need to recheck my reality. I’ll give it another shot later tonight and report back. I’m determined to get my RPi3 on the zeronet. Thanks for all your efforts thus far.


#23

@glebowski
ah ah I don’t know if your sudo drama is for real but sounds a bit funny…
yes please don’t give up now, your RPI3 got already on the alphanet and that was THE big step…


#24

@glebowski
I prepared a summary of the steps to get on the zeronet, it is nothing new, just condensed the same existing material in bullet points.

But first a reminder that Tezos and sudo don’t like each other, all commands related to Tezos should be typed 1) as a user (tzuser) without root/administrator privilege 2) from the default location /home/tzuser 3) in the x-windows environment where multiple terminals will/can be opened.

There are essentially 5 steps to get on the zeronet starting from scratch (blank SD card)

  • write the image of OS+tezos on the SD card (link to the image file, here: github.com/demodun/tezos-rpi3/wiki page [b-1])
  • first time boot: expand the OS to take the full space of the SD card with the command ./resize.sh
  • use wget to retrieve the zip file tz-zero040318.zip and the file tz-switch040318.sh
    (see page [f] with the updates in the wiki site for the links and the exact wget commands)
  • change the permission with chmod 764 tz-switch.sh then type just once ./tz-switch.sh to extract the content of the zip file. The command ./tz-switch.sh
    will put Tezos for the zeronet in the working location (/home/tzuser/tezos) then it will automatically
    extract from the zip file a new “tz-start.sh” file and a new “config.json” file and it will perform
    few other operations. Once it is done the command will also delete the zip file (to save space).
  • the usual commands that were introduced to run the RPI3 on the alphanet network apply for the zeronet as well: ./tz-init.sh (to be used only the first time to create an identity for the RPI3 on the zeronet),
    ./tz-start.sh to start the node and ./tz-stop.sh to stop the node. These script files are all located in /home/tzuser.

Hope it helps…

@wambo any luck getting your RPI3 node up and running?


#25

@maxtez-raspbaker Thanks for putting this together. I haven’t had a chance to revisit this yet but hope to get some time this weekend to take another crack at it. I think you’re probably right though - I was going back and forth off of older and newer sets of instructions.


#26

@maxtez-raspbaker Thank you! Hopefully I can align my multiverses and get my RPi3 on the zeronet tonight!


#27

@maxtez-raspbaker I am still getting confused so I wrote up the below steps to make it simple. I’m still getting “Permission denied” on step 7. Any ideas what I’m doing wrong?

Tezos Zeronet on RPi3
For details: https://github.com/demodun/tezos-RPI3/wiki

Remember: Tezos and sudo don’t like each other, all commands related to Tezos should be typed

  1. as a user (tzuser) without root/administrator privilege
  2. from the default location /home/tzuser
  3. in the x-windows environment where multiple terminals will/can be opened.

There are essentially 8 steps to get your RPi3 on the Tezos zeronet starting from scratch (blank SD card) (16GB minimum size)

  1. Download the Tezos RPi3 image
    https://drive.google.com/file/d/18uPhwxTQEebZZFP2nJmt1mmgqBdUOgiF

  2. Using Etcher (https://etcher.io), write the Tezos RPi3 image to your SD card

First time boot:
3. Check to make sure you are in the right folder
type “pwd” (it should return: /home/tzuser)

  1. Expand the Tezos OS to take the full space of the SD card
    ./resize.sh

  2. Use wget to retrieve the zip file tz-zero040318.zip and the file tz-switch040318.sh
    wget https://www.dropbox.com/s/k9hp0vygufk987j/tz-zero040318.zip
    wget -NO /home/tzuser/tz-switch.sh https://www.dropbox.com/s/wyb5qihpj5vbpd7/tz-switch040318.sh

  3. Change the permission on the downloaded file to unzip in next step
    chmod 764 tz-switch.sh

  4. Type just once to extract the content of the zip file
    ./tz-switch.sh

The command ./tz-switch.sh will put Tezos for the zeronet in the working location (/home/tzuser/tezos) then it will automatically
extract from the zip file a new “tz-start.sh” file and a new “config.json” file and it will perform
few other operations. Once it is done the command will also delete the zip file (to save space)

  1. The usual commands that were introduced to run the RPI3 on the alphanet network apply for the zeronet as well:
    ./tz-init.sh (to be used only the first time to create an identity for the RPI3 on the zeronet)

./tz-start.sh to start the node
./tz-stop.sh to stop the node

These script files are all located in /home/tzuser.


#28

@glebowski
thanks for the detail report, now I understand the issue and how to fix it.
I agree that it could have been simpler, the way it started from the alphanet then switching to zeronet keeping both on the RPI3, maybe I should have simply erased the alphanet. Although it seems that soon the zeronet will be promoted to alphanet status. It is getting a bit convoluted but no worries in one way or another I’ll make it working for anyone with RPI3.

Back to your report. It is all perfect up to point 7., the command chmod 775 tz-start.sh is not necessary. The command itself does not do any harm but somehow in your procedure overshadows the command chmod 764 tz-switch.sh which is absolutely necessary. You can see that chmod 764 tz-switch.sh is listed on the first post of this thread but regrettably I forgot to mention about it in my post yesterday (bullet points). I edited the bullet points post to include the correction.

Bottom line, all you need to do is just type:
chmod 764 tz-switch.sh
then
./tz-switch.sh
and this is the day your RPI3 will fly on the zeronet (with the commands you listed in point 8).


#29

@maxtez-raspbaker I remember the other chmod 764 command but wasn’t sure how it fit in. Thanks for the clarification. Hopefully this will make it easier for others to experiment with their RPi3 which is what we all want. I’ll try and write up a similar, simple to follow steps on creating accounts, delegating and baking as well if I get time. Will get my RPi3 working later this evening.


#30

My RPi3 is on the zeronet although not sure if the zeronet is online…


#31

@glebowski
well done!
my guess is that you have no connections, right? the reason is that bootstrapping relies on active nodes on the zeronet which are listed in the file config.json. If those nodes are disconnected then…you have no way to get in the network. To fix this you have two options:

option I) edit the file config.json in the folder /home/tzuser/.tezos-node and replace some of the ip addresses you see there. The new ip addresses should be taken from active nodes on the zeronet, you can find them here tzscan.io/network

option II) grab a new config.json that I uploaded today. It should be ok but it is not guarantee
wget -NO /home/tzuser/.tezos-node/config.json https://www.dropbox.com/s/hb08tcutxpe3y49/config041318.json

Once you start seeing the RPI3 connecting with “validator.peer”, I don’t want to spoil your moment but keep an eye in case the node unexpectedly crushes. This is something that came up yesterday (04/13/18), please go to the wiki site (https://github.com/demodun/tezos-rpi3/wiki), in the update page you’ll find a remedy. Nothing new in terms of procedure just upload a new zip file (precompiled tezos) and a new tz-switch.sh file.

It is never ending…and we still have to go through the alphanet (again), betanet and finally mainnet,
but it will be worth it!!


#32

@maxtez-raspbaker Sorry for not getting back sooner. Haven’t had a chance to trouble shoot my RPi3 yet but will soon. I ran across this Asus Tinker board reading through some of my tech feeds and wondered if it may work with your Tezos RPi3 image. Seems a little more powerful than the RPi3 and with 2 GB memory. What do you think?

http://www.shopblt.com/item/asus-tinker-board-2gb-sbc-rk3288-soc-1.8ghz/asus_tinkerboard2gb.html


#33

no problem, there have been some recent changes on the zeronet (see the wiki page), even if you had the node running, a new update is required (new zip file and tz-switch.sh file).

yes I saw the Asus Tinker somewhere, the main plus feature is the 2GB ram memory and perhaps also the 3.0 slot for the SD card. The question is the OS support. At the moment according to the Asus info page there is only one option, that is a Debian-based distribution. The only way to find out whether Tezos can run on it is just try. But I don’t see why it shouldn’t…


#34

Ok, thanks. Will get the new updates for my RPi3 this weekend. Will probably get the ASUS Tinker as well since I can’t help buying cool tech items.


#35

ah ah, I see, let me know if the toy is worth playing with…