How to deploy a Bridge Node

1. Install the Wanchain Desktop Wallet

WanWallet Desktop Download link

2. Storeman Selection

In order to form a wanBridge, 25 Storeman nodes must work together. In order to choose which 25 nodes may form a wanBridge, there is a selection process based on the amount of stake in each node. The 25 nodes with the most WAN staked will be selected. In order to be considered for selection, node operators must register their node with a on-chain transaction.

Summary of the Storeman setup process:

Run scripts to obtain a Storeman Work Address , Public Key (your Storeman registration in WanWallet will be used), EnodeId String (your Storeman registration in WanWallet will be used), and back up the folder generated by the scripts.

2.1 Generate Public Key and nodeID

Run scripts in Linux Ubuntu environment, and make sure the environment is safe

Rename or delete osm if it already exists at /home/user

After you run the scripts above, there will be a folder osm generated at /home/user. The folder osm will be used when you start your Storeman node.

Backup BOTH the script output and also the osm folder. If you are running these scripts locally, you will later need to copy the **_osm_** folder generated by these scripts to your cloud server.

Note: The contents marked in bold will be used once you register your Storeman in WanWallet.

2.2 Stake WAN using WanWallet Desktop

A) Go to the Storeman staking page

Open WanWallet Desktop, go to Storeman > Storeman. This is the page for your Storeman to stake. Please transfer a small amount of WAN to your Storeman Work Address for gas fees which are required for your node to operate. The transaction will fail if the validator address has 0 WAN.

B) Register as a Storeman Candidate

After the Wanchain Foundation sends a transaction to begin a new Storeman Group, it will be visible in the Open Group List:

Input the Public Key and Enode ID you generated by the previously run script

Select the account which you want to stake from and the amount of WAN you want to stake. After you confirm this information, you can see your staking details in the Storeman List.

Add Additional Stake or Attract Delegations to Increase Selection Chances

After your Storeman becomes a Candidate, you can see the ranking of all Storeman Nodes, and top-up funds in theWanWallet.

You can also accept delegations from individuals in order to increase your chance of getting selected.

3 Check Selection Results, and Set Up Storeman Node if Selected

3.1 Check Election Result

You can check the Storeman selections results directly through the desktop wallet. If the status is Selected, it means that your Storeman node successfully entered the Storeman Group. If the Status is Not Selected, it means that your Storeman node failed to enter the group.

The Storeman nodes which fail to be selected can claim back their WAN.

3.2. Cloud Server Setup

Recommended Specifications:

A public IP without a proxy is required. Cloud and bare metal servers are both supported. The following table shows the requirements:

Item
Minimum

Server Type

AWS m4.large

vCPU Cores

2

RAM

8GB

Disk Space

80GB

Bandwidth

20mbps

Operating System

Ubuntu 22.04

Prepare Keystore and Nodekey

If you ran the setup scripts locally, please copy the Keystore and Nodekey files which were generated at /home/user to the same path on your cloud server. (See Section 2 for how to generate Keystore and Nodekey)

3.3 Install Storeman Service:

a) Transfer Small Amount of WAN to Work Address

Double check you have already transferred a small amount of WAN to your Storeman Work Address for gas fees. The transaction will fail if the Storeman work address has 0 WAN.

b) Environment Setup:

Open Ports:

Log in to your cloud server platform (such as AWS). Enable the following ports in the firewall inbound settings: TCP 37718/UDP 37718, and enable the following ports in the firewall outbound settings: TCP 26891/ TCP 26892/ TCP 30000 (By default, the outbound rule in most cloud platforms is set to open, so you just keep the default settings of outbound ports). If you modify the ports of the scripts, please add the related port in your firewall.

Initialize the environment:

c) Start Storeman Agent

Start Agent

Follow the steps of scripts

  • Choose the network of Storeman: mainnet

  • Input Work Address of YOUR Storeman (DO NOT input the following work address!!)

  • Input the password of your Work Address. If it shows “Password match!”, it means that your password is correct

  • Choose whether to use KMS to encrypt the private key fragments

AWS Key Management Service (AWS KMS) is a key management serevice provided by Amazon. It can be used to create and manage your master key. Users can choose whether to encrypt private key fragments by using KMS. (Encryption is recommended. It strengthens the security of funds).

If you want to create KMS, you could refer to https://aws.amazon.com/cn/kms/

If you need to use KMS, please enter Y when running the scripts, and you need to provide the relevant information corresponding to the KMS. When it shows “KMS match!” , it means that the KMS-related information you entered is verified correctly.

User Access key ID: AKIAJPUJ**********

User Secret Access Key: KiHjz0g12a***********

KMS Key Region: us-east-1

KMS Key ID (ARN): arn:aws:kms:us-east-1: *****:key/*****

If you don’t need KMS, please enter N when running the scripts and choose not to use KMS for encryption

When you choose not to use the KMS encryption service, please choose whether to save the password locally to support automatic update, which facilitates the automatic upgrade of the agent in the future. Please select Y for agree, and N for refuse.

The script will automatically start Docker to create the Storeman service. If it displays Storeman Start Success, it means the service starts normally.

d) Check Agent Container Status

Status of online and restart times of 0 represent normal status.

e) Verify the connection number of Storeman Peers

Open mpc console through ipc, and check the number of connected MPC nodes in console:

Confirm the returned peer node information, which indicates the current number of MPC node connections. It should be 1 or 21. If the number is abnormal, please contact Wanchain techsupport team.

  • In the Seleting Time for the Storeman Group, the peer number should be 1,

  • In the Ready status for the Storeman Group, the peer number should be 21.

Restart Service

If there is something wrong with your node, try to restart your service

4 Storeman Group Running Period

=================================

4.1 Top-up Stake

During the Storeman Group working period, you can top-up WAN to your Storeman.

4.2 Claim Rewards

You can claim your rewards every day. But the deposits can only be claimed when the entire Storeman Group period has concluded.

4.3 Exit

You can choose to enter the next round or exit the selection process before the next Storeman Group is formed.

You can top-up your staking amount at any time.

(Note: a cycle is one month — cycle time subject to change in future)

After a cycle completes, you can claim your both deposits and rewards, and enter the next round.

5 How To Delegate WAN To A Storeman

Find the Delegation button:

Click on New Delegation, and choose a Storeman to delegate to:

You can also top-up WAN delegations to the same Storeman during the Storeman Group running period. You can withdraw your rewards each day. After a cycle completes, you can withdraw both deposits and rewards.

Please note that the delegation amount to a Storeman can increase this Storeman’s weight. But the rewards will only be counted after the Storeman Group starts working.

6 Appendix

Here is an example of the results of runnin Public Key and EnodeID scripts

Please properly back up information above such as Public Key, Keystore, Nodekey and EnodeID after running scripts.

Last updated