Setting Up Your GenLayer Validator
Running a GenLayer Validator node ensures the security and reliability of the GenLayer network. Below are the requirements for running a GenLayer validator.
Dependencies
LLM Access
Each validator needs access to a Large Language Model (LLM) for executing and evaluating Intelligent Contracts.
It is up to each validator to select the model they want to use.
Possible options:
- Run an open-source model locally on the same machine with a GPU
- Run an open-source model on a different machine
- Connect to a hosted inference provider (OpenAI, Anthropic, Heurist, Atoma network etc.)
ZKSync Full Node for the GenLayer Chain
Each validator needs access to a ZKSync Full Node (opens in a new tab) connected to the GenLayer chain. Validators use this node to read the chain state and submit transactions.
One full node can be shared between multiple validators - TBD how many exactly.
System Requirements
Below are the initial recommended system requirements. These guidelines may change as the network grows and evolves.
RAM
- Recommended: 16 GB
- Why:
- GenLayer's genvm can spawn multiple Sub-VMs for contract calls and non-deterministic blocks.
- Each Sub-VM can consume up to ~4 GB of RAM for storage.
CPU
- Recommended: Modern multi-core processor with at least 8 cores/16 threads
Architecture
- Recommended:
AMD64
ARM64
is not supported at this time
Storage
- Recommended Disk Space: 128 GB+
- Preferred Type: SSD or NVMe (M.2)
Network
- 100 Mbps connection
- Recommended:: 1 Gbps+
GPU (Optional)
- GPU is Not Required
- If you want to run LLMs locally, you will need to select appropriate hardware (typically a CUDA-compatible GPU with sufficient VRAM for the model you intend to use)
These requirements are a starting point. As GenLayer evolves and usage patterns change (e.g., more complex AI-driven Intelligent Contracts), the recommended hardware may change.
Software
- Operating System - 64-bit Linux (Ubuntu, Debian, CentOS, etc.)
docker
- for running the WebDriver container
Setup
Download the node software
-
Select the version of the node you want to run by checking the available builds
You can use this command to list available versions:
curl "https://storage.googleapis.com/storage/v1/b/gh-af/o?prefix=genlayer-node/bin/amd64" | grep -o '"name": *"[^"]*"' | sed -n 's/.*\/\(v[0-9.]*-[^/]*\)\/.*/\1/p' | sort -u
You should see a list like this
v0.1.0-testnet002 v0.1.0-testnet003 v0.1.0-testnet004 v0.1.0-testnet005 v0.1.0-testnet006 v0.1.0-testnet007 v0.1.0-testnet008
Typically you will want to run the latest version
-
Download the packaged application
export version=v0.1.0-testnet008 # set your desired version here wget https://storage.googleapis.com/gh-af/genlayer-node/bin/amd64/${version}/genlayer-node-linux-amd64-${version}.tar.gz
-
Extract the node software
tar -xzvf genlayer-node-linux-amd64-${version}.tar.gz
-
Change the directory
cd genlayer-node-linux-amd64
Configuration
Before you scan start up the node, you need to configure it.
config.yaml
This is the main configuration file of your node. Without it, your node won't start
The file needs to be located at configs/node/config.yaml
You can use the following example configuration.
You do not need to modify most of the predefined values. You do however need to set two values - zksyncurl
and zksyncwebsocketurl
rollup:
zksyncurl: "TODO: Set your GenLayer Chain ZKSync HTTP RPC URL here" # ZKSync RPC URL
zksyncwebsocketurl: "TODO: Set your GenLayer Chain ZKSync WebSocket RPC URL here" # ZKSync WebSocket URL
consensus:
contractmanageraddress: "0x07Eda7CdbA3b7aA72B288f8bB8Ae24A8D74e2675" # ConsensusManager Smart Contract Address
contractmainaddress: "0x1b5366b03EF7ff3A430BaA9C38AC98B26aB33E0f" # ConsensusMain Smart Contract Address
contractdataaddress: "0xE99401E8d03143518a606060CE762546D69a66fa" # ConsensusData Smart Contract Address
contractidlenessaddress: "0xe2348B7724B4913932309C1aeD117A66063E0fD4" # ConsensusIdleness Smart Contract Address
datadir: "./data/node" # Cache directory
logging:
level: "INFO" # Log level
node:
mode: "validator" # "validator" or "archive"
rpc:
port: 9151 # JSON RPC port
endpoints:
groups:
ethereum: true # Enable Ethereum RPC endpoints
debug: false # Enable debug endpoints
methods: # Enabled `eth_` methods
eth_blockNumber: true
eth_getBlockByNumber: true
eth_getBlockByHash: true
eth_sendRawTransaction: false
ops:
port: 9153 # Metrics port
endpoints:
metrics: true # Enable metrics endpoint
health: true # Enable health endpoint
dev: # Configuration for development purposes
disableSubscription: false # Disable subscription
# Advanced configuration
merkleforest:
maxdepth: 16
dbpath: "./data/node/merkle/forest/data.db"
indexdbpath: "./data/node/merkle/index.db"
merkletree:
maxdepth: 16
dbpath: "./data/node/merkle/tree/"
genvm:
presets:
- name: "preset_1"
enabled: true
type: "local"
instances:
- name: "genvm_local_1"
usePreset: "preset_1"
enabled: true
type: "local"
execution:
timeout: 30s
executable: "./third_party/genvm/bin/genvm"
tempDir: "./tmp/genvm/genvm_local_1"
GenVM
You also need to configure the GenVM by connecting it to an LLM of your choice.
This is a crucial step that will determine the performance of your validator in the GenLayer network.
GenLayer has partnered with Heurist (opens in a new tab) is a Layer 2 network for AI model hosting and inference, built on the ZK Stack. It offers serverless access to open-source AI models through a decentralized network.
GenLayer Validators can obtain free Heurist API credits (opens in a new tab) by using the referral code: "genlayer".
You can configure the GenVM in third_party/genvm/share/genvm/default-config.json
.
The json schema will guide you on how to configure each field.
Default config
{
"$schema": "https://raw.githubusercontent.com/yeagerai/genvm/refs/heads/main/doc/schemas/default-config.json",
"modules": {
"llm": {
"config": {
"host": "TODO: LLM Provider Host", # e.g "https://sequencer-v2.heurist.xyz"
"provider": "openai-compatible",
"model": "TODO: Model ID",
"key_env_name": "LLM_PROVIDER_KEY"
}
},
"web": {
"config": {
"host": "http://127.0.0.1:4444"
}
}
}
}
Set Up The Validator Key
In this step we'll generate your validator key and address.
./bin/genlayernode account new -c $(pwd)/configs/node/config.yaml --setup --password "your secret password" # Remember it! You will need it to unlock your account when running the node
You should see the following output:
Account created:
New address: 0xA0b12Fd2f3F7e86fEC458D114A5E7a6f571160a8
Account setup as a validator
Important: Back up your validator key! Losing access to this key means losing control of your validator. Store the backup securely. You can export your key using the following command:
./bin/genlayernode account export --password "your node password" --address "your validator address" --passphrase "your backup encryption passphrase" --export "/path/to/your/secure/backup.key"
Remember both the node password (used during setup) and the backup encryption passphrase.
Currently the GenLayer Testnet is permissioned. You can apply to be selected by filling out the following form (opens in a new tab)
Running the node
Once you have configured everything, you are ready to start the node.
-
Run the WebDriver container
docker compose up -d # Starts the WebDriver needed by the GenVM web module
-
Run the node
export LLM_PROVIDER_KEY='your_llm_provider_api_key' # Set the env var specified in default-config.json ./bin/genlayernode run -c $(pwd)/configs/node/config.yaml --password "your secret password" # The same password you used when creating the account