Run Mainnet Node
NOTE: Ensure you meet the prerequisites before running a node.
Run a Mainnet Unit Zero node by following the steps:
Prerequisites
Hardware: Ensure you have 4 CPU cores, 8 GB RAM, and 250+ GB SSD.
Account: Create a Waves Account wallet in Mainnet.
Docker: Install the software.
Blockchai Data:
Download blockchain_last.tar via the link.
Or see other blockchain syncrhozation options.
Optional. For Mining Only:
WAVES: Obtain a minimum of 0.005 WAVES tokens to cover the transaction fee.
NOTE: The Consensus Client invokes the Chain Contract on behalf of your account. If your account has a verifier, it must permit such transactions.
Lease: Delegate a minimum of 20,000 WAVES to your account.
Google Chrome: Install the browser to ensure compatibility with the Waves Dapp UI.
Step 1: Configure Node
Create the main directory and go to it:
NOTE: Ensure you have the read and write access to the directory.
In the main directory, create the subdirectories:
In the data/waves subdirectory, unpack the blockchain_last.tar archive.
Grant the user with the uid 1000 the write access to the subdirectories:
Generate a node key and a JWT secret:
In the main directory:
Create the waves.conf file and paste the code block into it:
WARNING: You must:
Insert your Mainnet account's seed converted to a base58-encoded byte array.
Set a password as a string.
Specify your server's static IP address. If your server does not have a static IP address, remove the declared-address line.
Create the genesis.json file and paste the code block into it:
Create the log4j2.xml file and paste the code block into it:
Create the static-nodes.json file and paste the code block into it:
Create the docker-compose.yml file and paste the code block into it:
Step 2: Launch Node
WARNING: Docker and UFW have a known incompatibility. This issue makes it impossible to map a container's port to a host port (e.g.,
'8545:8545'
) and restrict external access using UFW at the same time.In the docker-compose.yml file, Besu's JSON-RPC port (8545) and Waves node's HTTP API port (6869) are mapped to the host's local address: 127.0.0.1:8545:8545 and 127.0.0.1:6869:6869. This configuration ensures the endpoints are accessible only to consumers running locally on the host machine.
If you need to allow access from external addresses, adjust the port mappings to 8545:8545 and 6869:6869. Alternatively, consider using a reverse proxy like nginx for controlled access.
Launch your node via the command:
NOTE: The Execution chain is synced with the network log indicates that the Consensus Client is synchronized with the network.
Step 3 (Optional): Start Mining
Go to the Waves dApp page.
In the header of the page, click Sign in. The Connect a wallet to get started window will open.
In the Connect a wallet to get started window, select one of the sign-in options:
Sign in with Keeper.
Sign in with Exchange(Seed).
Sign in with Exchange(Email).
Sign in with Metamask.
The wallet extension will open.
In the wallet extension, sign in to your node account.
In the join block:
In the rewardAddressHex field, enter your account address.
LIMITATIONS: The data field accepts input only in string format.
Click Invoke.
NOTE: The transaction fee is 0.005 WAVES.
Confirm the transaction in your wallet. Nodes chosen for block creation receive epoch rewards. Learn more about block generation probability.
NOTE: If you need help, contact us via our Developer chat for assistance.
Last updated