This guide walks you through the process of setting up a node to join Symbol’s public test network.
The test network mirrors the same technology and features of the future main public network. You can use the test net to experiment with the offered Symbol’s transaction set in a live network.
Note
The network might be offline or replaced without notice because it is used extensively for testing purposes. To work in a private environment network, install a local network for learning and development purposes.
To run the network, we are going to use the package Symbol Bootstrap. To better understand how this package works it is highly recommended to read the Using Symbol Bootstrap guide.
testnet
preset¶Symbol Bootstrap has a preset called testnet
which instantiates a node that connects to the current public test network (testnet). The capabilities of this node are selected through the assembly
option.
Peer nodes, also called a harvester nodes, are the backbone of the network. Among other things, they verify transactions and add new blocks to the blockchain, collecting fees in the process.
symbol-bootstrap start -p testnet -a peer
API nodes provide external access to the network through a REST API.
symbol-bootstrap start -p testnet -a api
To check that the node is up and running open a new browser tab and go to localhost:3000/chain/info
. You should get a response from the API node.
API nodes take up more memory and storage than Peer nodes. If you have memory or storage constraints and you are running into issues, it is recommended that you switch to running a Peer only node instead.
You really don’t need to use anything else but symbol-bootstrap start
. Use any of the commands above to instantiate and boot a Symbol node and Ctrl+C
to shut it down.
Alternatively, you can start in detached mode (--detached
) to run in the background.
The node you just created has an associated Symbol account which you can use to interact with the node. For instance, you need this account to provide funds to the node so it can emit transactions.
The account’s keys and address can be retrieved from a YAML file in the target
folder:
target/addresses.yml
As an example:
networkType: 152
nemesisGenerationHashSeed: 6C1B92391CCB41C96478471C2634C111D9E989DECD66130C0430B5B8D20117CD
nodes:
-
type: peer-node
name: peer-node
friendlyName: 0f2ccdc
roles: 'Peer'
ssl:
privateKey: ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
publicKey: 0f2ccdc6d2e6e8012271ccb7f391ee79ef4b92fedc831936158076120edcddcc
signing:
# These are the keys and address of your node
privateKey: ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
publicKey: 5276BBE852DDBCBDB2343C4349083D055F0E6F19552E5E955B4207E90E45CD6F
address: TC7DOAQY65IPHI5NR7R4LYHYD3OEUD6PVDJISVA
vrf:
privateKey: ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
publicKey: 1BB864D80F9FC8BF661265276E00E57C1ABDD13B1454A3F5ADC025279FA03268
address: TD74YTRSVU4HXEXE4LQYIX2EQ65XLYO4V5XQB4I
Note
Keep you Secret Keys secret at all times!
Use the information in the signing
section to access the node’s account.
Before the node can begin harvesting or voting (see below) it needs a minimum amount of funds. In the testnet
test environment you can use Symbol’s Faucet to provide these funds.
Go to faucet (or alternative faucet), insert the address
of your node’s account and the amount of symbol.xym
you need and click on CLAIM.
You will see that your request is first unconfirmed
(pending) and after a few seconds it becomes confirmed
. Your node is now funded and ready to operate!
Harvesting and Voting nodes require an extra configuration step before they can be used:
Symbol Bootstrap creates peer nodes with harvesting enabled by default, but they still need to be registered by announcing a VrfKeyLinkTransaction to the network.
This can be done by Symbol Bootstrap too, but it needs to be a step separated from symbol-bootstrap start
because funds are required to announce transactions.
Once the node is running with symbol-bootstrap start
and you have funded it account, from a different terminal (but from the same folder), simply type:
symbol-bootstrap link
This creates the required VrfKeyLinkTransaction and submits it to the network. If it succeeds (it might take some seconds, as the transaction needs to be confirmed) your new node is ready to harvest.
Note
Without extra parameters, symbol-bootstrap link
tries to send the registration transaction to the local node (running on the other terminal) which will forward it to the rest of the network. If your node is not running at this moment, or it is not an API node, you can provide the URL of a testnet node using --url
. Find a list of nodes here.
The block finalization process requires that network nodes vote about the correctness of blocks before they are added to the blockchain. For your new node to participate it has to register as a voter by announcing a VotingKeyLinkTransaction to the network. Symbol Bootstrap can take care of this too.
Note
We are going to create a new voting node. If you already created a non-voting node which you no longer need, you can remove the target
folder or, more conveniently, use the -r
switch next time you invoke symbol-bootstrap
.
First, you need to configure the node as a voter, so, besides selecting the testnet
preset and the desired assembly you have to provide a custom preset file with the following content:
nodes:
- voting: true
So if you call the above file enable-voting-preset.yml
the whole command would be:
symbol-bootstrap start -p testnet -a <assembly> -c enable-voting-preset.yml
Once the node is running, from a different terminal (but from the same folder), simply type:
symbol-bootstrap link
Just like in the harvesting case, this creates the required VotingKeyLinkTransaction and submits it to the network. Upon successful completion, your new node is ready to vote.
Follow the Configuring node properties guide to change parameters such as the public name of the node.
You can use the following tools to test the functionality of your new node:
symbol.xym
units to test Symbol’s services. If the default faucet is empty, try the alternative faucet.And don’t forget to check the rest of the guides to continue learning about Symbol!
Did you find what you were looking for? Give us your feedback.