top of page

In collaboration with Filip Rezabek (Algorand Centre of Excellence , TU München)

Step 1 : Installing Algorand tools

➡ To run the commands, copy & paste them one by one in your Terminal application and press enter.

1. Create a folder for the install package and files :

mkdir ~/node

cd ~/node

2. Download the install file in the folder you created :

3. Ensure that your system knows it's an executable file :

chmod 544 update.sh

4. Run the installer :

./update.sh -i -c stable -p ~/node -d ~/node/data -n

Wait while your machine executes the file...

If you get a prompt like shown below, type   y   and press enter.

override r-xr--r--  antoine.admin/staff for /Users/antoine.admin/node/update.sh? (y/n [n])

OPTIONAL : Set the default directory. Doing this spares you from adding  -d ~/node/data  at the end of all future commands. (If you open a new terminal window you will need to do this again.)

export ALGORAND_DATA="$HOME/node/data"

export PATH="$HOME/node:$PATH"

Step 2 : starting the node

1. Start the node

./goal node start -d ~/node/data

Success message :

Algorand node successfully started!

2. Check the node's status

./goal node status -d ~/node/data

Status example :

Last committed block: 1162
Time since last block: 12.3s
Sync Time: 15.1s
Last consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Next consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Round for next consensus protocol: 1163
Next consensus protocol supported: true
Last Catchpoint: 
Genesis ID: mainnet-v1.0
Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=

Step 3 : synchronizing the node

1. Paste the following link in your browser :

2. Copy the line that appears in your browser and paste it in the following command :

./goal node catchup <catchup point> -d ~/node/data

Example:

./goal node catchup 22500000#A6Z7EYO7LSEVG63FEQGSK72OM4OQ6Y27XP523F27UI5Y4NLGMPTQ -d ~/node/data

(It is normal that there is no message following this command)

Step 4 : creating a wallet

1. Your new wallet will contain the Algorand account which will participate in consensus

./goal wallet new <walletname> -d ~/node/data

Example:

./goal wallet new MyWallet -d ~/node/data

If this doesn't work try it with the wallet name between " ".

Then you will get the following message :

Please choose a password for wallet 'NodeWallet': 

 

The password you type will not appear on screen, that is normal.

Please confirm the password: 

 

Type your password again.


Creating wallet...
Created wallet 'MyWallet'
Your new wallet has a backup phrase that can be used for recovery.
Keeping this backup phrase safe is extremely important.
Would you like to see it now? (Y/n): 

Type   to view your wallet's mnemonic and note it on paper.

Step 5 : account setup

Important : the account must contain minimum 0.001 $ALGO

Option A : import an existing account in your newly created wallet.

./goal account import -m "mnemonic phrase" -d ~/node/data

Example:

./goal account import -m "secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret-d ~/node/data

Example success message :

Imported V6JLSCHJKSULQBXF7BW7YMXDOVXXXCAZGJ6YSHV64RZAUYSXFGINDU7KPI

Option B : create new account.

./goal account new -d ~/node/data

Then send minimum 0.001A to the created address.

Step 6 : participation key

Add a participation key to your account

./goal account addpartkey -w "WalletName" -a  "account address" --roundFirstValid <partkey-first-round> --roundLastValid <partkey-last-round> -d ~/node/data

The value for <partkey-first-round> is the last committed block, which you get by checking your node's status :

./goal node status -d ~/node/data

Example status :

Last committed block: 24893163
Sync Time: 0
Catchpoint: 22560000#2YG3TDS7ZAHOXX2LNQ5CU3AIED34HEOIVJ5N44XKSQ2QXAFHJ5BQ
Catchpoint total accounts: 14255165
Catchpoint accounts processed: 2995712
Catchpoint accounts verified: 0
Genesis ID: mainnet-v1.0
Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=

The value for <partkey-last-round> is the first round value plus a number of blocks corresponding to the time you want your participation key to be active. Adding 1 million to the <partkey-first-round> value a a validity period of approximately one year.

Example command :

./goal account addpartkey -a V6JLSCHJKSULQBXF7BW7YMXDOVXXXCAZGJ6YSHV64RZAUYSXFGINDU7KPI --roundFirstValid 24893163 --roundLastValid 25893163 -d ~/node/data

Success message :

Please stand by while generating keys. This might take a few minutes...
/

Participation key generation successful. Participation ID: RTULG52G54ZTPSYNFBS6QROVIB555ITCMWB7FG3G3MAKSF2L2X5A

Optional : list participation key(s) and additional information :

./goal account listpartkeys -d ~/node/data

./goal account partkeyinfo -d ~/node/data

Step 7 : put your node online

1. Create a transaction that changes the node's status to online :

./goal account changeonlinestatus -a <account address> --firstvalid=<first valid round> --lastvalid=<last valid round> --online=true --txfile=online.txn -d ~/node/data

The maximum difference between the first and last valid rounds is 1000. So here just use the first valid round and add 1000 to get the last valid round.

Example command :

./goal account changeonlinestatus -a V6JLSCHJKSULQBXF7BW7YMXDOVXXXCAZGJ6YSHV64RZAUYSXFGINDU7KPI --firstvalid=24893163 --lastvalid=24894163 --online=true --txfile=online.txn -d ~/node/data

2. Sign the transaction :

./goal clerk sign --infile="online.txn" --outfile="online.stxn" -d ~/node/data

3. Send the transaction to the network :

./goal clerk rawsend -f online.stxn -d ~/node/data

Congratulations, your account is online !

You can verify your account's status here :

https://algoexplorer.io/address/ACCOUNT

https://app.metrika.co/account/algorand/ACCOUNT

Best practices : it is important for the network that you set your node to offline every time you turn off your computer.

1. Create a transaction that changes the node's status to online :

./goal account changeonlinestatus -a <account address> --online=false --txfile=offline.txn -d ~/node/data

2. Sign the transaction :

./goal clerk sign --infile="offline.txn" --outfile="offline.stxn" -d data

3. Send the transaction to the network :

./goal clerk rawsend -f offline.stxn -d data

If you have any question, reach out to the community on Discord !

bottom of page