Skip to content

Commit 5660098

Browse files
authored
BETA cleanup for Mainet
1 parent bc1a231 commit 5660098

9 files changed

+6
-548
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Paris"
1818
RUN apt-get update \
1919
&& apt-get upgrade -y \
2020
&& apt install -y curl wget screen procps python3-pip netcat \
21-
&& apt autoclean -y \
22-
&& python3 -m pip install -U discord.py==1.7.3
21+
&& apt autoclean -y
2322

2423
# Download the Massa package
2524
COPY download-massa.sh .

config/default_config.ini

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,4 @@ PATH_NODE="$PATH_MASSA"/massa-node
2121
PATH_NODE_CONF="$PATH_NODE"/config
2222
# Chemin ou se trouve la version compilee de massa-client
2323
PATH_TARGET=.
24-
# Path of massabot reply
25-
PATH_MASSABOT_REPLY=/massa-guard/massabot.tmp
26-
# Path to unreachable bootstrappers list
27-
PATH_TO_UNREACHABLE_BOOTSTRAPPERS=/massa_mount/config/bootstrappers_unreachable.txt
2824
##################################################

config/default_config_template.ini

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ NODE_LOGS=1
55
MASSAGUARD=1
66
# Autoupdate node when new node release version is available on massalabs website (Please note all update can occur an issue for massaguard working)
77
AUTOUPDATE=0
8-
# Discord token - Must be set with your token discord - Please refer to https://shufflegazine.com/get-discord-token/
9-
DISCORD_TOKEN="NULL"
108
# RAM max for node in percent - If RAM is over NODE_MAX_RAM value, node will restrat to purge RAM allocation
119
NODE_MAX_RAM=90
1210
# Set maximum roll amount that you want - if value is NULL massa-guard will buy roll with no max limit
1311
TARGET_ROLL_AMOUNT="NULL"
1412
# Set if your node is under dyn or static public IP address - Set 1 for dynamic public IP or 0 for static public IP
1513
DYN_PUB_IP=0
16-
# Set if node registered with massabot - Set with OK if node registrered with massabot or KO if you want to check and use registration process
17-
NODE_TESTNET_REGISTRATION="KO"
1814
# Node password (If ENV not set, default value is MassaToTheMoon2022)
1915
NODE_PWD="MassaToTheMoon2022"
2016
# Wallet password (If ENV not set, default value is MassaToTheMoon2022)

massa-guard.sh

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ do
4242
MasBalance=$(GetMASAmount "$WalletAddress")
4343
# Buy max roll or 1 roll if possible when candidate roll amount = 0
4444
BuyOrSellRoll "$CandidateRolls" "$MasBalance" "$WalletAddress"
45-
# [Depracated since testnet 16.0] Refresh bootstrap node with community connected and routable nodes
46-
# RefreshBootstrapNode
4745

4846
# If logs are disable
4947
if ([ $NODE_LOGS -eq 0 ] && [ -e $PATH_LOGS_MASSANODE/current.txt ])
@@ -52,21 +50,11 @@ do
5250
rm $PATH_LOGS_MASSANODE/current.txt $PATH_NODE/logs.txt > /dev/null 2&>1
5351
fi
5452

55-
# If Discord feature enable
56-
if [ ! $DISCORD_TOKEN == "NULL" ]
53+
# If dynamical IP feature enable and public IP is new
54+
if ([ $DYN_PUB_IP -eq 1 ] && [ $(CheckPublicIP) -eq 1 ])
5755
then
58-
# Check and get faucet of current day
59-
PingFaucet
60-
61-
# Check and registrer node with massabot if necessary
62-
CheckTestnetNodeRegistration "$WalletAddress"
63-
64-
# If dynamical IP feature enable and public IP is new
65-
if ([ $DYN_PUB_IP -eq 1 ] && [ $(CheckPublicIP) -eq 1 ])
66-
then
67-
# Refresh config.toml + restart node + push new IP to massabot
68-
RefreshPublicIP
69-
fi
56+
# Refresh config.toml + restart node + [Depracated since Mainnet] push new IP to massabot
57+
RefreshPublicIP
7058
fi
7159
fi
7260

sources/bootstrap_finder.py

Lines changed: 0 additions & 223 deletions
This file was deleted.

sources/faucet_spammer.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

sources/init_copy_host_files.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ then
2525
mkdir -p /massa_mount/config
2626
echo "[$(date +%Y%m%d-%HH%M)][INFO][INIT]CREATE /massa_mount/config folder" |& tee -a $PATH_LOGS_MASSAGUARD/$(date +%Y%m%d)-massa_guard.txt
2727
cp /massa-guard/config/default_config_template.ini $PATH_CONF_MASSAGUARD/config.ini
28-
if [ $DISCORD ]; then python3 $PATH_SOURCES/set_config.py "DISCORD_TOKEN" \"$DISCORD\" $PATH_CONF_MASSAGUARD/config.ini ; fi
2928
if [ $DYNIP ]; then python3 $PATH_SOURCES/set_config.py "DYN_PUB_IP" "$DYNIP" $PATH_CONF_MASSAGUARD/config.ini ; fi
3029
if [ $NODEPWD ]; then python3 $PATH_SOURCES/set_config.py "NODE_PWD" \"$NODEPWD\" $PATH_CONF_MASSAGUARD/config.ini ; fi
3130
if [ $WALLETPWD ]; then python3 $PATH_SOURCES/set_config.py "WALLET_PWD" \"$WALLETPWD\" $PATH_CONF_MASSAGUARD/config.ini ; fi
@@ -57,12 +56,6 @@ else
5756
echo "routable_ip = \"$myIP\"" >> $PATH_MOUNT/config.toml
5857
cp $PATH_MOUNT/config.toml $PATH_NODE_CONF/config.toml
5958

60-
if [ ! $DISCORD_TOKEN == "NULL" ]
61-
then
62-
# Push IP to massabot
63-
timeout 2 python3 $PATH_SOURCES/push_command_to_discord.py $DISCORD_TOKEN $myIP > $PATH_MASSABOT_REPLY
64-
fi
65-
6659
echo "[$(date +%Y%m%d-%HH%M)][INFO][INIT]Create your default config.toml with $myIP as routable IP" |& tee -a $PATH_LOGS_MASSAGUARD/$(date +%Y%m%d)-massa_guard.txt
6760
fi
6861
# Wallet to use
@@ -88,10 +81,4 @@ then
8881
rm $PATH_NODE_CONF/staking_wallets/wallet_* > /dev/null 2&>1
8982
cp $PATH_MOUNT/wallet_* $PATH_NODE_CONF/staking_wallets/
9083
echo "[$(date +%Y%m%d-%HH%M)][INFO][LOAD]LOAD MOUNTED WALLET as ref to stacke" |& tee -a $PATH_LOGS_MASSAGUARD/$(date +%Y%m%d)-massa_guard.txt
91-
fi
92-
# If unreachable node file dont exist
93-
if [ ! -e $PATH_CONF_MASSAGUARD/bootstrappers_unreachable.txt ]
94-
then
95-
# Create bootstrappers_unreachable.txt
96-
touch $PATH_CONF_MASSAGUARD/bootstrappers_unreachable.txt
97-
fi
84+
fi

0 commit comments

Comments
 (0)