Creating groups for the testnet and mainnet
We'll use secrettest for the testnet and secretmain for the mainnet.
Testnet
mkdir /opt/secrettest
chown -R root:secrettest /opt/secrettest
chmod -R g+rw /opt/secrettest
Using mia as a username example, and secrettest as a group:
adduser mia
usermod mia -aG sudo
usermod -g secrettest mia
[Unit]
Description=Secret node service
After=network.target
[Service]
Type=simple
Environment=SCRT_ENCLAVE_DIR=/home/mia/lib
Environment=SCRT_SGX_STORAGE=/opt/secrettest/.sgx_secrets
WorkingDirectory=/home/mia
Environment=LD_LIBRARY_PATH=/home/mia/lib:$LD_LIBRARY_PATH
ExecStart=/usr/local/bin/secretz start
User=mia
Restart=on-failure
StartLimitInterval=0
RestartSec=3
LimitNOFILE=65535
LimitMEMLOCK=209715200
[Install]
WantedBy=multi-user.target
State-sync of a (mainnet) node
May apply to a testnet node as well.
Configuration
There are 2 files controlling containing configuration parameters for the state sync, both located under the .secretd/config by default:
app.toml
Make sure that iavl-disable-fastnode = true. Even though the comments in the file mentions that the default is true the field is actually set to false.
# IAVLDisableFastNode enables or disables the fast node feature of IAVL.
# Default is true.
iavl-disable-fastnode = true
config.toml
Clean-up data of previous state-syncs
Clear tendermint state sync files from /tmp:
note: marsellus is the username
cd /tmp && ls -l /tmp | awk '$3=="marsellus" { print $9 }' | xargs rm -r
Creating groups for the testnet and mainnet
We'll use
secrettestfor the testnet andsecretmainfor the mainnet.Testnet
Using
miaas a username example, andsecrettestas a group:State-sync of a (mainnet) node
May apply to a testnet node as well.
Configuration
There are 2 files controlling containing configuration parameters for the state sync, both located under the
.secretd/configby default:app.tomlconfig.tomlapp.tomlMake sure that
iavl-disable-fastnode = true. Even though the comments in the file mentions that the default istruethe field is actually set tofalse.config.tomlClean-up data of previous state-syncs
Clear tendermint state sync files from
/tmp:note:
marsellusis the username