-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Full node, before refining * Rewording * use bash instead of toml code block * update overview * Add comments on moniker, jsonrpc and api ports, and tip on data dir
- Loading branch information
1 parent
f0770dd
commit c564635
Showing
4 changed files
with
94 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Rollup Full Node Setup Guide | ||
|
||
## Introduction | ||
|
||
This guide covers how to set up a full node to run alongside a sequencer node in a Rollkit-based blockchain network. A full node maintains a complete copy of the blockchain and helps validate transactions, improving the network's decentralization and security. | ||
|
||
## Prerequisites | ||
|
||
Before starting, ensure you have: | ||
|
||
- A local Data Availability (DA) network node running on port `7980`. | ||
- A Rollkit sequencer node running and posting blocks to the DA network. | ||
- The Rollkit CLI installed on your system. | ||
|
||
## Setting Up Your Full Node | ||
|
||
### Initialize Chain Config and Copy Genesis File | ||
|
||
First, update the `config_dir` in the `rollkit.toml` file: | ||
|
||
```bash | ||
[chain] | ||
config_dir = "/root/.yourrollupd" // [!code --] | ||
config_dir = "/root/.yourrollupd_fn" // [!code ++] | ||
``` | ||
|
||
Initialize the chain config for the full node, lets call it `FullNode` and set the chain ID to your rollup chain ID: | ||
|
||
```bash | ||
rollkit init FullNode --chain-id=your-rollup-chain-id | ||
``` | ||
|
||
Copy the genesis file from the sequencer node: | ||
|
||
```bash | ||
cp /root/.yourrollupd/config/genesis.json /root/.yourrollupd_fn/config/genesis.json | ||
``` | ||
|
||
### Set Up P2P Connection to Sequencer Node | ||
|
||
Identify the sequencer node's P2P address from its logs. It will look similar to: | ||
|
||
``` | ||
1:55PM INF listening on address=/ip4/127.0.0.1/tcp/36656/p2p/12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh | ||
``` | ||
|
||
Create an environment variable with the P2P address: | ||
|
||
```bash | ||
export P2P_ID="12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh" | ||
``` | ||
|
||
### Start the Full Node | ||
|
||
Run your full node with the following command: | ||
|
||
```bash | ||
rollkit start --rollkit.aggregator=false \ | ||
--rollkit.da_address http://127.0.0.1:7980 \ | ||
--rpc.laddr tcp://127.0.0.1:46657 \ | ||
--grpc.address 127.0.0.1:9390 \ | ||
--p2p.seeds $P2P_ID@127.0.0.1:26656 \ | ||
--p2p.laddr "0.0.0.0:46656" \ | ||
--json-rpc.ws-address 127.0.0.1:8547 \ | ||
--api.address tcp://localhost:1318 | ||
``` | ||
|
||
Key points about this command: | ||
- `--rollkit.aggregator=false` indicates this is not an aggregator node. | ||
- The ports and addresses are different from the sequencer node to avoid conflicts. Not everything may be necessary for your setup. | ||
- We use the `P2P_ID` environment variable to set the seed node. | ||
|
||
## Verifying Full Node Operation | ||
|
||
After starting your full node, you should see output similar to: | ||
|
||
``` | ||
2:33PM DBG indexed transactions height=1 module=txindex num_txs=0 | ||
2:33PM INF block marked as DA included blockHash=7897885B959F52BF0D772E35F8DA638CF8BBC361C819C3FD3E61DCEF5034D1CC blockHeight=5532 module=BlockManager | ||
``` | ||
|
||
This output indicates that your full node is successfully connecting to the network and processing blocks. | ||
|
||
:::tip | ||
If your rollup uses EVM as an execution layar and you see an error like `datadir already used by another process`, it means you have to remove all the state from rollup data directory (`/root/.yourrollup_fn/data/`) and specify a different data directory for the EVM client. | ||
::: | ||
|
||
|
||
## Conclusion | ||
|
||
You've now set up a full node running alongside your Rollkit sequencer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters