Last build for Massa testnet Episode 10 release 10.1
Build a massa-node container This image include a script named "/massa-guard/massa-guard.sh" to:
- Autobuy 1 roll when your node failed and loose his "Active rolls" and/or "Czndidate rolls"
- Autobuy rolls when your MAS amount greater than 200 MAS and if "Active rolls" dont exceed "TARGET_ROLL_AMOUNT" set in /massa_mount/config/config.ini (If set)
- Autosell rolls when "Active rolls" exceed "TARGET_ROLL_AMOUNT" set in /massa_mount/config/config.ini (If set)
- Auto refresh massa online bootstrap list and check their TCP port 31244&31245 to valid if nodes is reachable 1 time by day
- Restart node when stuck or ram consumption exceed 90%
- Autoget MAS faucet on Discord 1 time by day
- Logs his actions over /massa_mount/logs/
- New user? For you, Massa-guard will create wallet + nodekey + stacke privkey + create your config.toml with your public IP.
- Expose port 33035 to allow monitoring with https://paranormal-brothers.com/massa/
- 20220520 - Add public IP of the node in config.toml file if ref config.toml don't exist in mountpoint
- 20220519 - One time by day, check if nodes in bootstrap list are responsives on their TCP port 31244 & 31245, or mark it as unreachable and remove it from bootstrap list
- 20220517 - ADD target roll amount feature /!\ If you already have the "/massa_mount/config/config.ini" file, please add manually ADD this variable ''TARGET_ROLL_AMOUNT="NULL"''
- 20220511 - Clean code
- 20220508 - Update image to v10.1
- 20220508 - ADD node Ram overload feature /!\ If you already have the "/massa_mount/config/config.ini" file, please add manually ADD this variable ''NODE_MAX_RAM=90''
- 20220508 - Solve issue wallet creation if missing
- 20220507 - Solve issue bootstrapper feeding for ipv6 node since testnet 10. Now add stay available for ipv4 node but add skip ipv6 nodes.
STEP 1: Mount a folder to the /massa_mount path on container and store your wallet /nodekey/stacking_key/config.toml if you have it:
- wallet.dat
- config.toml
- node_privkey.key
- staking_keys.json
/!\ If don't have this file, leave your folder empty, massa-guard will create a wallet and node key and automaticaly stake wallet for you. This files will be backup on your mount point by massa-guard.
/!\ User of one release before the 20220508? For the node Ram overload feature /!\ If you already have the ''/massa_mount/config/config.ini'' file, please add manually ADD this entry ''NODE_MAX_RAM=90'' in your config file
- Container creation:
docker run -d -v /%MY_PATH%/massa_mount:/massa_mount -p 31244-31245:31244-31245 -p 33035:33035 --name massa-node rykcod/massa
- To connect to your container:
docker exec -it massa-node /bin/bash
- Connect to massa-client after container connection:
screen -x massa-client
- Exit screen or container:
ctrl+a+d
[OPTION]STEP 2: to use ping faucet feature Set your Discord token in /massa_mount/config/config.ini to enable "Autoget MAS faucet" feature
Refer to https://discordhelp.net/discord-token
STEP 3: /!\ Remember to register your node to the testnet program on Discord
- Go to Discord https://discord.com/channels/828270821042159636/872395473493839913 and follow inscructions.
- Massa client is running over a "screen" named "massa-client"
- Massa node is running over a "screen" named "massa-node"
- To get your discord token, refer to https://shufflegazine.com/get-discord-token/
- A easy way for beginner to enable ipv6 on your container
- Create or edit your /etc/docker/daemon.json to add:
{
"ipv6": true,
"fixed-cidr-v6": "fd00::/80"
}
- Restart docker service to reload config setting
- Allow MASQUERADE for ipv6
ip6tables -t nat -A POSTROUTING -s fd00::/80 ! -o docker0 -j MASQUERADE
- Create a container which dynamicaly edit your iptables rules for port redirection
docker run -d --restart=always -v /var/run/docker.sock:/var/run/docker.sock:ro --cap-drop=ALL --cap-add=NET_RAW --cap-add=NET_ADMIN --cap-add=SYS_MODULE --net=host --name ipv6nat robbertkl/ipv6nat
For more informations and sources - https://github.com/rykcod/massa/
Thanks to:
- Dockyr because it's my main nickname
- GGCOM & GNOMUZ for help
- Danakane for "Autoget faucet" and "Bootstrap list refresh" features https://gitlab.com/0x6578656376652829/massa_admin :