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:
Network | Description |
---|---|
Palm Testnet | A 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 Mainnet | Palm’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
-
Hyperledger Besu installed. Besu has a list of system requirements here. Around 200GB of disk space is required to store the database for Palm Mainnet, and 8GB RAM is recommended.
-
curl
(or similar web service client)
1. Create the node directory
Create the directory in which to store the required files and data directory:
Change into the palm-node
directory:
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.
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.
4. Start Besu
Start Besu and specify the configuration file. Make you are still in the palm-node
folder from Step 1.
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.
The result displays the validators on the Palm network: