Avalon (dtube) testnet Leader node Tutorial

in DTube4 years ago


Note: if you already know how to make a leader node on mainnet, you need to watch only for the first 5 minutes.

Let me know if you have any questions or problems, I'll try to help.

requirements (this depends on OS and distro, also some of these packages are not strictly needed, you need any LTS nodejs):

sudo apt update
sudo apt install mongodb-org-server mongodb-org-shell mongodb-org-tools nodejs ntpd git unzip

Now the node code:


mv avalon avalon-testnet
cd avalon-testnet
git checkout tipped-vote-testnet
npm igit clone https://github.com/techcoderx/avalon

wget https://gist.githubusercontent.com/MrFasolo97/54dd17bfd70c50c915993b10d60e4d4d/raw/05bfaaaad20b9e346f25127f39612166005c39e7/start_dtube_testnet.sh

change these on the start script if needed:
export DB_NAME=avalon_testnet (if more testnet nodes are connecting to the same MongoDB)

export HTTP_PORT=3010 (this should be simple, and should be ok, if you need help with the ports just let me know, also, don’t expose it on the internet, not directly at least.)
export P2P_PORT=6010 (same as above, this one could be exposed)
export DB_URL=mongodb://localhost:27017 (Change this one if the MongoDB server is on another computer or your computer doesn’t resolve localhost)

For you to be a miner, you need to have an account registered on testnet blockchain, currently, the test chain have all the accounts from mainnet, so you can use the mainnet account, but then you will be using the same public/private key which may not be desired
Ask one of the leaders already on testnet to make an account for you if needed.

ALWAYS run src/cli.js with export HTTP_PORT=YOUR_TESTNET_PORT if you are running also the mainnet on this machine, you could broadcast that transaction on mainnet by mistake.
Example: export API_PORT=3010; node src/cli.js enable-node test_leader_node_pubkey -F test_leader_node_key.json -M your_username_on_testnet

change these:
export NODE_OWNER=your_username_on_testnet
export NODE_OWNER_PUB=Your public key from your node on testnet enabled with the testnet’s account key.
export NODE_OWNER_PRIV=The private key of the same keypair as the key above


▶️ DTube
▶️ IPFS