Running a Wischain node
Last updated
Last updated
For developers looking to engage with Wischain, utilizing our official RPC endpoint or one provided by various RPC providers in the ecosystem is the most straightforward approach. This guide outlines how to set up a "follower node" that participates in the public mempool of transactions without engaging in consensus or block production. Wischain nodes are a modified version of Geth, employing the Clique protocol for consensus, which we refer to as L2geth.
Finding the Latest Version
It is advisable to use the latest release available at . The required version for Wischain Mainnet is wischain-v1.1.0
or higher, and for Wischain Sepolia, it is wischain-v1.0.1
or higher. To stay updated with new node releases, visit , click on "Watch," then select "Custom" and ensure "Releases" is checked.
In the context of this guide, VERSION
will denote the version tag, such as wischain-v1.3.0
.
Minimum
A machine comparable to an AWS t3.large instance.
500GB SSD storage.
Recommended
A machine comparable to an AWS t3.2xlarge instance.
1TB SSD storage.
Before launching L2geth, you will need access to a fully-synced Ethereum Mainnet or Ethereum Sepolia RPC endpoint, depending on whether you plan to run a Wischain Mainnet or Wischain Sepolia node. You can either maintain your own node or opt for a third-party provider that supports the standard Ethereum RPC APIs. Define your L1 node’s HTTP RPC API as L2GETH_L1_ENDPOINT
(e.g., L2GETH_L1_ENDPOINT="https://my-node.com:8545"
).
Downloading and Building L2geth
Clone the latest version of L2geth:
Ensure you are using Go version 1.20.
Install the GCC compiler:
Build L2geth:
The binary will now be located at build/bin/geth
.
Create a command alias:
It is recommended to open port 30303 (both UDP & TCP) and enable discovery, allowing other nodes to synchronize data with your node.
Run L2geth using the following command:
For Wischain Sepolia, replace --wischain
with --wischain-sepolia
.
Ensure L1 Endpoint is Fully Synced
The node may appear unresponsive while it synchronizes blocks from Ethereum (from l1.sync.startblock
, configured automatically, to the latest finalized block). This catch-up phase occurs only during the initial synchronization or if the node has been offline for an extended period. Check the node logs to monitor sync progress.
In a separate terminal, you can attach to L2geth:
You can check the number of peers and the current block number:
Warning
Running the node in Docker may significantly impact node performance.
Build L2geth Image
To build the image, use:
This will create the image wischain/l2geth:latest
. Alternatively, you can download the L2geth Docker image:
Running L2geth
To run the L2geth container, use:
For Wischain Sepolia, set the chain ID to 648531 and use --wischain-sepolia
instead of --wischain
.
To interact with the L2geth container:
You can check logs and stop the container using:
Wischain Mainnet
WISCHAIN_L2_CHAIN_ID_L2=648532
WISCHAIN_L2_NETWORK_ID_L2=648532
WISCHAIN_L2_GENESIS_HASH="0x.........."
Bootnodes:
enode://............
Additional bootnode entries...
Genesis.json for Wischain Mainnet
WISCHAIN_SEPOLIA_L2_CHAIN_ID_L2=648531
WISCHAIN_SEPOLIA_L2_NETWORK_ID_L2=648531
WISCHAIN_SEPOLIA_L2_GENESIS_HASH="0x........."
Bootnodes:
enode://.........
Additional bootnode entries...
Genesis.json for Wischain Sepolia
This comprehensive guide should help developers successfully set up and run a Wischain L2geth node, whether for Mainnet or Sepolia. For more specific details, refer to the Wischain documentation.
For additional configuration options, refer to the official .