Setup Full Node

How To Join Secret Network as a Full Node on Testnet

This document details how to join the Secret Network testnet as a full node. Once your full node is running, you can turn it into a validator in the optional last step.

Requirements

  • Ubuntu/Debian host (with ZFS or LVM to be able to add more storage easily)

  • A public IP address

  • Open ports TCP 26656 & 26657 Note: If you're behind a router or firewall then you'll need to port forward on the network device.

  • RPC address of an already active node. You can use http://bootstrap.pulsar3.scrtlabs.com:26657, or any other node that exposes RPC services. Alternate RPC nodes available in the API Registry.

Installation

Install SGX and secretd

For more information on SGX, see instructions for SGX Installation and Verifying SGX. See Node Registration Information if you'd like a more comprehensive overview on what's happening in these steps.

Initialize Secret Network Configs

Choose a moniker for yourself, and replace <MONIKER> with your moniker below. This moniker will serve as your public nickname in the network.

This will generate the following files in ~/.secretd/config/

  • genesis.json

  • node_key.json

  • priv_validator_key.json

Download genesis.json

The genesis file is how other nodes on the network know what network you should be on.

Initialize Secret Enclave

Initialize /opt/secret/.sgx_secrets:

You can choose between two methods, 3a (automatic) or 3b (manual):

Initialize Secret Enclave - Automatic Registration (EXPERIMENTAL)

The following commands will create the necessary environment variables and attempt to automatically register the node.

If this step was successful, you can skip straight to Optimization.

Initialize Secret Enclave - Manual Registration

Verify Enclave Initialization

Attestation certificate should have been created by the previous step

Verify the certificate is valid. A 64 character registration key will be printed if it was successful.

Optional - Embed Azure Attestation Signature

This step is only relevant for Azure machines.

Read more here.

Configure secretd

The following steps should use secretd be ran on the full node itself. To run the steps with secretd on a local machine, set up the CLI there.

Configure secretd. Initially you'll be using the bootstrap node, as you'll need to connect to a running node and your own node is not running yet.

Fund Secret Wallet

If you already have a wallet funded with SCRT, you can import the wallet by doing the following:

Otherwise, you will need to set up a key. Make sure you back up the mnemonic and the keyring password.

This will output your address, a 45 character-string starting with secret1.... Copy/paste it to get some test-SCRT from the faucet. Continue when you have confirmed your account has some test-SCRT in it.

Configure Node Attestation

  1. Register your node on-chain

2. Pull & check your node's encrypted seed from the network

3. Get additional network parameters

These are necessary to configure the node before it starts.

Configure Your Secret Node

From here on, commands must be ran on the full node.

Add Seeds And Persistent Peers To Configuration File.

Optimization

In order to be able to handle NFT minting and other Secret Contract-heavy operations, it's recommended to update your SGX memory enclave cache:

Also checkout this document by [ block pane ] for fine tuning your machine for better uptime.

Set minimum-gas-price Parameter

We recommend 0.0125uscrt per gas unit:

Your node will not accept transactions that specify --fees lower than the minimun-gas-price you set here.

Enable secret-node:

Note that the secret-node system file is created when installing sgx.

You are now a now ready to finally sync the full node. πŸŽ‰.

Go to Testnet State Sync to continue.

Get Node ID

secretd tendermint show-node-id

And publish yourself as a node with this ID:

Be sure to point your CLI to your running node instead of the bootstrap node

secretcli config node tcp://localhost:26657

If someone wants to add you as a peer, have them add the above address to their persistent_peers in their ~/.secretd/config/config.toml.

And if someone wants to use your node from their secretcli then have them run:

State Sync

You can skip syncing from scratch or download a snapshot by State Syncing to the current block.

Optional: Become a Validator

To turn your full node into a validator, see Join Testnet as a Validator.

Last updated

Was this helpful?