Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Note: This documentation assumes you have followed the instructions for Running a Full Node for Testnet.
WARNING: This will erase your node database. If you are already running validator, be sure you backed up your config/priv_validator_key.json
and config/node_key.json
prior to running unsafe-reset-all
.
The state-sync configuration in ~/.secretd/config/app.toml
is as follows:
SNAP_RPC
variable to a snapshot RPCSet the state-sync BLOCK_HEIGHT
and fetch the TRUST_HASH
from the snapshot RPC. The BLOCK_HEIGHT
to sync is determined by finding the latest block that's a multiple of snapshot-interval.
WARNING: This will erase your node database. If you are already running validator, be sure you backed up your config/priv_validator_key.json
and config/node_key.json
prior to running unsafe-reset-all
.
It is recommended to copy data/priv_validator_state.json
to a backup and restore it after unsafe-reset-all
to avoid potential double signing.
This generally takes several minutes to complete, but has been known to take up to 24 hours.
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.
Secret Network has strict Hardware Requirements. If your machine does not meet them, it will *NOT* work as a node.
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.
secretd
This guide assumes you've already installed the latest version of secretd and SGX. To setup an archive node, you must follow the Archive Nodes instructions.
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.
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
genesis.json
The genesis file is how other nodes on the network know what network you should be on.
Initialize /opt/secret/.sgx_secrets
:
You can choose between two methods, 3a (automatic) or 3b (manual):
WARNING: This method is experimental, and may not work. If it doesn't work, skip to step 3b.
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.
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.
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.
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.
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.
From here on, commands must be ran on the full node.
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.
minimum-gas-price
ParameterWe recommend 0.0125uscrt
per gas unit:
Your node will not accept transactions that specify --fees
lower than the minimun-gas-price
you set here.
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.
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:
You can skip syncing from scratch or download a snapshot by State Syncing to the current block.
To turn your full node into a validator, see Join Testnet as a Validator.
In order to become a validator, you node must be fully synced with the network. You can check this by doing:
When the value of catching_up
is false, your node is fully sync'd with the network. You can speed up syncing time by to the current block.
This is the secret
wallet which you used to create your full node, and will use to delegate your funds to you own validator. You must delegate at least 1 SCRT (1000000uscrt) from this wallet to your validator.
If you get the following message, it means that you have no tokens, or your node is not yet synced:
(remember 1 SCRT = 1,000,000 uSCRT, and so the command below stakes 100 SCRT).
You should see your moniker listed.
(remember 1 SCRT = 1,000,000 uSCRT)
In order to stake more tokens beyond those in the initial transaction, run:
Currently deleting a validator is not possible. If you redelegate or unbond your self-delegations then your validator will become offline and all your delegators will start to unbond.
You are currently unable to modify the --commission-max-rate
and --commission-max-change-rate"
parameters.
Modifying the commision-rate can be done using this:
Unjailing
To unjail your jailed validator
Signing Info
To retrieve a validator's signing info:
Query Parameters
You can get the current slashing parameters via:
Query Parameters
You can get the current slashing parameters via:
This section will take you through the process of taking a node from fresh machine to full validator on the public testnet pulsar-3.
This section will take you through the process of taking a node from fresh machine to full validator. The general steps are as follows:
Got problems with using SGX and DCAP attestation in your system? Please ask in the Telegram or Discord for help. For Validators, you can also ask in the SN Validators chat.
Ensure your hardware is .
If you're running a local machine and not a cloud-based VM -
Update your BIOS to the latest available version
Go to your BIOS menu
Enable SGX (Set to "YES", it's not enough to set it to "software controlled")
Disable Secure Boot
Disable Hyperthreading
Please use Ubuntu 22.04 LTS If you install SGX on a fresh node to ensure that DCAP will work correctly. Ubuntu 20.04 LTS is not supported by default anymore.
Make sure the SGX driver is installed. The following devices should appear:
If your kernel version if 5.11
or higher, then you probably already have the SGX driver installed. Otherwise - please update the kernel version to 5.11
or higher to ensure that these two devices appear.
Also make sure that the user under which the node is supposed to run has privileges to access SGX:
The sgx_prv
should appear.
If it does not - Logout and re-login may be needed, for the change to take effect.
First, you need to add the Intel repository to APT and install the necessary SGX libraries:
If your system has 5th Gen Intel® Xeon® Scalable Processor(s)
For the DCAP attestation to work, you'll need to register your platform with Intel. This is achieved by the following:
You can check the file /var/log/mpa_registration.log
, to see if the platform is registered successfully.
The Quote Provider library is needed to provide the data for DCAP attestation.The configuration file for it should can be found here:
/etc/sgx_default_qcnl.conf
Running a baremetal/physical machine
The simplest would be to use the PCCS run by SCRTLabs. Modify the following parameters in the file:
You can set those parameters by the following command:
Running on Cloud VPS providers
For cloud VPS providers, the cloud service providers may provide their own PCCS. Please see their documentation for more infomation.
Note: You'll need to restart the AESMD service each time the configuration is changed
Next, restart your aesmd service for the changes to take effect.
Download and run the check-hw tool (included in the Release package). You should see the following:
That would mean all the above steps are ok, and you're good to go.
In case you see some error messages, but at the end the following:
That would mean there's a problem with DCAP attestation.
However the EPID attestation still works. Although you may technically run the node, it's strongly recommended to fix this. The EPID will be phased-out by Intel on April 2025.
To get a more detailed error info, run check-hw --testnet
Copy/paste the address to get some test-SCRT from . Continue when you have confirmed your account has some test-SCRT in it.
`secretcli` is the Secret Network light client, a command-line interface tool for interacting with nodes running on the Secret Network. To install it, follow these instructions:
Get the latest release of secretcli for your OS HERE.
Mac/Windows: Rename it from secretcli-${VERSION}-${OS}
to secretcli
or secretcli.exe
and put it in your path
Ubuntu/Debian: sudo dpkg -i secret*.deb
Linux and MacOS users:
You can find alternate node endpoints in the API registry, or run your own full node
See more details on how to use the CLI here