Skip to content

Notes on multiple running nodes (testnet + mainnet) #16

@sbellem

Description

@sbellem

Creating groups for the testnet and mainnet

We'll use secrettest for the testnet and secretmain for the mainnet.

Testnet

groupadd secrettest
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
  • config.toml

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions