Skip to content
This documentation is in beta, and we’re looking for feedback. See how you can contribute 🌟

Run a Transaction Node

Overview

Transaction nodes are used to read transaction history or send transactions on the Palm network without performing validator duties.

What are Validators?

Validators are responsible for proposing blocks and attesting to them within slots. In IBFT 2.0 networks, validators validate transactions and blocks, taking turns to create the next block. Before inserting the block onto the chain, a super-majority (greater than 66%) of validators must first sign the block.

To ensure that your node can successfully join the Palm network, you must specify the correct bootnodes for the environment you are targeting. This allows your node to find existing nodes on the network.

Connecting to existing nodes is important because it allows your node to download the chain history and send transactions to validator nodes.


Running a Palm Transaction Node

The tutorial in this section allows you to run a Palm transaction node locally for the target network environment. Available network environments are:

NetworkDescription
Palm TestnetA persistent environment that will not be reset. This is useful as a staging environment and for long-term testing. You can Use the Bridge to transfer assets between Palm Testnet and the Ethereum Goerli testnet.
Palm MainnetPalm’s production environment where contracts and accounts hold real value. You can Use the Bridge to transfer assets between Palm Mainnet and Ethereum Mainnet.

🏁 Prerequisites


1. Create the node directory

Create the directory in which to store the required files and data directory:

Terminal window
mkdir palm-node

Change into the palm-node directory:

Terminal window
cd palm-node

2. Download the genesis file

The genesis file specifies the network-wide settings and defines the first block in the chain. Each Palm environment uses a different genesis file.

The following curl commands downloads the genesis file for the required environment.

Terminal window
curl -O https://genesis-files.palm.io/uat/genesis.json

3. Create the Besu configuration file

The configuration file is a TOML file used to specify the Besu options. Alternatively, specify the options directly when starting Besu. The below configuration file examples include the bootnode addresses for the required environments.

Create a TOML file named config.toml with the following options:

  • For the data-path option, replace <PATH> with the location of the node directory created in Step 1.
# Palm Testnet genesis file
genesis-file="genesis.json"
# Network bootnodes
bootnodes=["enode://7c6e935eca89b230002294420c10d645844419ac50c5fc03fa53bf24fd82600508f5a4d5b89f7690c7e8f9c5dc833605d60bb1dd35997669ab7f1fc274683803@54.162.14.76:30303","enode://2f5d0489e2bbbc495e3d38ae3df9cc0a47faf42818057d193f0f4863d44505277c3d1b9a863f7ad961830ef15a8f8b72ec52791f3cca5ef84284a29f82f2dd73@18.235.20.166:30303"]
# Data directory
data-path="<PATH>/palm-node"
# Enable the JSON-RPCs
rpc-http-enabled=true
# Specify required API methods
rpc-http-api=["ETH","NET","WEB3","ADMIN","IBFT","TXPOOL","DEBUG","TRACE"]

4. Start Besu

Start Besu and specify the configuration file. Make you are still in the palm-node folder from Step 1.

Terminal window
besu --config-file=config.toml

The node attempts to connect to the bootnodes and other transaction nodes, and begins synchronization once enough peers are found.

If you don’t need a full archive node of all transactions in the chain, then you can speed up the time to sync with the other peers via BESU_SYNC_MODE=FAST for fast sync (the default is BESU_SYNC_MODE=FULL for full sync).

Testnet output example


5. Confirm the network is running

Once the network is synchronized, start another terminal and use curl to call the JSON-RPC API net_peerCount which returns the number of peers currently connected to the client.

Terminal window
curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[], "id":1}' localhost:8545

The result displays the validators on the Palm network:

{
"jsonrpc" : "2.0",
"id" : 1,
"result" : [ "0x5" ]
}