GEB Docs
  • Quick Start
  • GEB Consensus
    • Mother Consensus
    • Sub Consensus(Agere)
  • Learn
    • BitAgere Guide
      • Auditor Reference Concepts
      • Executor Reference Concepts
  • Build
    • Validator
      • Wasm Operation
      • L-BTC Validator Operation
    • BitAgere
      • RelayAgere
      • Agere Auditor
      • Agere Executor
  • Use
    • Wasm Wallet
    • Earn $GEB
      • Stake L-BTC
        • What is L-BTC?
        • Download and Run LND Desk
        • Config LND
        • Node Asset Management
          • Open Channel(Get L-BTC)
          • L-BTC ⇌ BTC (on GEB chain)
        • Stake L-BTC Earn $GEB
      • Stake GEB on Agere
    • Earn $BTC
      • Claim and Other Operations
      • Transfer BTC to EVM
    • Bridge
      • Official Bridge
        • BEVM Mainnet
        • BEVM Canary
      • Third-Party Bridge
        • BEVM Mainnet
          • Swap from EVM to BEVM Mainnet
        • BEVM Canary
          • Swap from EVM to BEVM Canary
          • Other assets
            • Bridge PCX from BEVM Canary to Chainx
      • Transfer(EVM<-->Wasm)
  • EVM Development
    • Fee Calculation
      • GEB Mainnet
      • BEVM Canary
    • Smart Contract
      • Write a Contract
        • Set Up the Metamask Configuration
        • Deploy Smart Contract on GEB Signet
        • Deploy Smart Contract on BEVM Canary
      • Foundry
        • Deploy and verify contract by Foundry
      • Contract Verification (BlockScout)
      • ThirdWeb
    • Integrations
      • Oracle
        • Supra
        • DIA
      • Indexer
        • SubQuery
      • Account Abstraction
        • Particle Network
    • Libraries
      • ethereum-list/chains
      • Wagmi
      • Multicall3
    • Canonical contracts
    • Finality
  • Tokenomics
  • The Journy of GEB
  • Audit Reports
  • Community
Powered by GitBook
On this page
  • 1. Prerequisite
  • 1.1 VPS Requirements
  • 1.2 Installing GEB Using Docker
  • 1.3 Direct Binary Download(Skip if you use Docker)
  • 1.4 Creating GEB Account
  • 1.5 Set up on-chain identity(Important)
  • 2. Registering Validator Node
  • 3. Setting Session Keys
  • 4. Binding EVM Address (Optional)
  • 5. Checking Validator Node Setup
  • 5. Backup Node
  • 6. Verifying Block Production
  • 7. Validator Withdrawal
  • 7.1 Forced Withdrawal
  • 7.2 Voluntary Withdrawal
  • 7.3 Manual Nomination
  • 8. Important Notes
  • 9. Node Penalties
  • 10. Validator Rewards Withdrawal (BTC and GEB)
  • 10.1 Wallets
  • 10.2 Check BTC and GEB Balance
  • 10.3 Claim BTC and GEB from Validator Spot to Wasm Account
  • 10.4 Deposit BTC from Wasm to EVM
  • 10.5 Deposit GEB from Wasm to EVM
  • 11. Multi-signature Account as Validator Node
  • Multi-signature Account Reference Documents
  1. Build
  2. Validator

Wasm Operation

1. Prerequisite

1.1 VPS Requirements

The simplest way is to use a cloud server. You can freely choose any hosting provider.

1.1.1 Mainnet Hardware Configuration

Taking AWS as an example, GEB mainnet recommended configuration should not be lower than:

  • CPU: 4 cores

  • Memory: 16GB

  • Bandwidth: 50Mbps

  • Disk: SSD 300GB+

  • Operating System: Ubuntu 22.04+

Cloud servers need to open p2p port (default port=30333) to increase connectivity

To open ports on AWS, you typically configure rules in the Security Group. Follow these steps:

1. Log in to AWS Management Console and go to EC2 service
2. In the navigation pane, select "Security Groups"
3. Select the security group you want to modify
4. Select the "Inbound Rules" tab, then click "Edit inbound rules"
5. Click "Add rule"
6. In the "Type" dropdown, select the protocol type (e.g., TCP)
7. In "Port range", enter 30333
8. For "Source", you can choose:
   - Allow any IP access (0.0.0.0/0)
   - Allow only specific IP ranges (enter IP/mask format)
9. Click "Save rules"

For example, to allow all IPs through TCP port 30333:
Type: TCP
Port range: 30333
Source: 0.0.0.0/0
To open port 30333 on Alibaba Cloud, configure the security group's inbound rules as follows:

1. Log in to Alibaba Cloud Console and go to "ECS"
2. Find the ECS instance that needs port opening, click the instance ID
3. In the left menu, select "Security Groups"
4. In "Security Group Rules" tab, find "Inbound" rules, click "Quick Add"
5. In the "Security Group Inbound" window:
   - Rule Direction: "Inbound"
   - Authorization Policy: "Allow"
   - Protocol Type: "Custom TCP"
   - Port Range: "30333/30333"
   - Authorization Object: "0.0.0.0/0" (allow all IPs) or specify IP range
6. Click "OK" to complete

After adding the inbound rule, the service can be accessed through the instance's public IP and port 30333.

1.2 Installing GEB Using Docker

1.2.1 Configuration File

For validator nodes, we recommend the following configuration:

Replace "Your-Node-Name" with your node name

{
    "chain": "mainnet",
    "log-dir": "./log",
    "enable-console-log": false,
    "no-mdns": true,
    "validator": true,
    "unsafe-rpc-external": true,
    "offchain-worker": "when-authority",
    "rpc-methods": "unsafe",
    "log": "info,runtime=info",
    "port": 30333,
    "rpc-port": 8087,
    "pruning": "archive",
    "db-cache": 2048,
    "name": "Your-Node-Name",
    "base-path": "data",
    "keystore-path": "keystore",
    "bootnodes": [],
    "telemetry-url": "wss://telemetry-mainnet.geb.network/submit 1"
}

1.2.2 Using Docker Image

Place the above configuration file in the current directory, named config.json. Run the following command:

{
    "chain": "mainnet",
    "log-dir": "/log",
    "enable-console-log": false,
    "no-mdns": true,
    "validator": true,
    "unsafe-rpc-external": true,
    "offchain-worker": "when-authority",
    "rpc-methods": "unsafe",
    "log": "info,runtime=info",
    "port": 30333,
    "rpc-port": 8087,
    "pruning": "archive",
    "db-cache": 2048,
    "name": "Your-Node-Name",
    "base-path": "/data",
    "keystore-path": "/keystore",
    "bootnodes": []
}

Chain options:

  • chain=mainnet: GEB mainnet

  • chain=signet: GEB signet (new test network started with BEVM v0.3.0)

Run the following command to start the node in the background:

sudo docker pull btclayer2/bevm:v0.3.0
sudo docker run -d --restart always --name bevm-node \
  -p 8087:8087 -p 30333:30333 \
  -v $PWD/config.json:/config.json -v $PWD/data:/data \
  -v $PWD/log:/log -v $PWD/keystore:/keystore \
  btclayer2/bevm:v0.3.0 /usr/local/bin/bevm \
  --config /config.json

Enter the container:

docker exec -it bevm-node /bin/bash

The parameters correspond to those in the configuration file. For background running Docker, you can check logs with:

tail -f log/bevm.log # View all logs

When the logs show block synchronization starting, it indicates the node has started successfully:

2024-01-30 06:42:24 ✨ Imported #2229 (0x835e…88ea)    
2024-01-30 06:42:27 💤 Idle (4 peers), best: #2229 (0x2823…340a), finalized #2227 (0xabfa…613d), ⬇ 16.5kiB/s ⬆ 17.9kiB/s    
2024-01-30 06:42:30 ✨ Imported #2230 (0x1dde…0ce9)    
2024-01-30 06:42:30 ♻️  Reorg on #2230,0x1dde…0ce9 to #2230,0x937b…545e, common ancestor #2228,0xf384…0db5    
2024-01-30 06:42:30 ✨ Imported #2230 (0x937b…545e)    
2024-01-30 06:42:32 💤 Idle (4 peers), best: #2230 (0x937b…545e), finalized #2228 (0xf384…0db5), ⬇ 17.8kiB/s ⬆ 18.8kiB/s

If you need to use RPC service externally, add rpc-external: true to the configuration file.

When configuring, it's recommended to change the name item in the configuration file.

Port mapping must be consistent with config.json, otherwise RPC will not work normally.

1.3 Direct Binary Download(Skip if you use Docker)

Sync to Latest Chain State

Start syncing the blockchain with this command:

$ ./bevm-v0.3.0 --chain=mainnet --pruning=archive --name="Your Node Name"

# After syncing completes, restart in validator mode:
$ ./bevm-v0.3.0 --chain=mainnet --validator

Or start directly in validator mode for syncing:

# Using --validator will automatically enable archive mode (--pruning=archive)
$ ./bevm-v0.3.0 --chain=mainnet --validator

Note: Make sure to wait for synchronization to complete and set up Session Keys before letting the node participate in election.

If synchronization is abnormal, ensure system time matches network time, delete the database, and resync.

1.4 Creating GEB Account

1.5 Set up on-chain identity(Important)

The on-chain identity must be set to match your node name.

2. Registering Validator Node

Note:

(1) Validator node names only support numbers and letters (case-sensitive)

(2) Register transaction will charge 100 GEB whether successful or not

Route: Network>Staking>Accounts>Validtors

(3) Each GEB account can only register once.

(4) Before registering, ensure you have sufficient balance for transaction fees and self-voting amount (1000 GEB in the example).

(5) Newly registered nodes are automatically nominated for election, no additional operation needed.

(6) Besides initial staking during registration, you can stake more through voting.The maximum stake you can receive is 10 times your self-staked amount. Once the total stake reaches this limit, you will no longer be eligible to receive votes.

(7) After the election period ends, the top 40 nodes (17 limits now) (parameter set through governance) by total stake will become validators participating in consensus.

3. Setting Session Keys

You can generate Session Keys by executing this command on your node machine:

Install curl: apt install curl

$ curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:$YOUR_RPC_PORT

Where YOUR_RPC_PORT is the port specified by rpc-port when starting the node, default is 8087.

Example response:

{
  "jsonrpc":"2.0",
  "result":"0xcf888ade403573be237e2af023c5b5ff1e4fd24cb96893b034ca8d616fe551c96cccd879274db47800e2a035adef9d7657ee2579ceaf25a3bc507931e5e5241558764dd425290713cb62101ca62edf2bcfbeedc38b3ed36db080d0bb9561ba507a14389a5dbd1b5708314fb1bc204c384c41b4389e7add1b6bec10490ff52b7b",
  "id":1
}

The result field is your Session Keys. Set them through setKeys in Developer>Extrinsic:

  • Currently, proof can be set to 0x.

4. Binding EVM Address (Optional)

Binding an EVM address is prerequisite for becoming an L-BTC staking mining validator node (can accept LBTC token staking, participate in GEB mining).

Validator nodes not participating in L-BTC staking mining (i.e., without bound EVM address) can still receive BTC gas rewards and GEB transaction fee rewards(Different from the GEB assigned with the Mother Consensus).

5. Checking Validator Node Setup

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "xstaking_checkCandidate", "params":["5Uix8A8MpxJK8q2GMbSkENL9obg6gd4S6eJD9H5DErtA94i8"]}' http://localhost:8087

Four "true" values in response indicate complete setup:

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

These four values represent:

  1. Whether nominated (validator.isChilled is false)

  2. Whether meeting minimum voting amount (self-vote at least 100 GEB and total votes at least 1000 GEB)

  3. Whether Session Keys are set

  4. Whether participating in LBTC staking mining

5. Backup Node

Since improper node deployment causing block anomalies will be penalized, you can deploy backup nodes.

Copy the same config.json configuration and keys, just change "validator=false".

Start backup node in "pruning=archive" mode.

This way, when the main node has issues, the backup can take over to avoid penalties.

6. Verifying Block Production

Validator rotation period: Era = 4 Session = 4 * 1 hour = 4 hours

After setup, it takes up to 4 hours for new validators to produce blocks.

After being elected validator, seeing Prepared block for proposing at ... in logs indicates successful block production:

2024-01-30 17:39:42:008 INFO tokio-runtime-worker sc_basic_authorship::basic_authorship  🙌 Starting consensus session on top of parent 0xe05e784c7198ff0719411ed75fe3a207f7fdc89b0ed5e3fbae75a3f2a7bf5504
2024-01-30 17:39:42:021 INFO tokio-runtime-worker sc_basic_authorship::basic_authorship  🎁 Prepared block for proposing at 4002 (13 ms) [hash: 0x236a33a2f071abb9f0f4ee31a367b509c560018807bf21b454ea0d368cd8812a; parent_hash: 0xe05e…5504; extrinsics (4): [0x8d22…b8ad, 0x9b60…0aa1, 0xccdc…3742, 0x56df…c0a3]
2024-01-30 17:39:42:027 INFO tokio-runtime-worker babe  🔖 Pre-sealed block for proposal at 4002. Hash now 0x4c4eec78a6f480a337f2ddd79c5f839959d8e082e3ec9f4adc7f640f70d66024, previously 0x236a33a2f071abb9f0f4ee31a367b509c560018807bf21b454ea0d368cd8812a.

7. Validator Withdrawal

7.1 Forced Withdrawal

When a validator's reward pool is penalized to 0 or other penalties occur, the validator is kicked out of the current validator set and becomes withdrawn. To rejoin staking, manual nomination is required.

7.2 Voluntary Withdrawal

7.3 Manual Nomination

8. Important Notes

  • Validator election occurs every 1 era(4 hours).

  • If node self-stake is less than 100 GEB or total votes less than 1000 GEB, will be forced to withdraw during validator election.

  • Candidate status validators neither receive rewards nor penalties.

  • The additional fee for rebond and validate (i.e., candidacy) is 1 GEB, while the additional fee for registration is 100 GEB.

  • To limit the frequency of rebonding, it is stipulated that only one rebond operation is allowed every 3 days (i.e., 43200 blocks).

  • Validators who wish to unstake their tokens are subject to a 30-day (432,000 blocks) freezing period, while nominators have a 3-day (43,200 blocks) freezing period. After the freezing period has elapsed, a thawing transaction must be sent to reclaim the staked voting amount.

9. Node Penalties

GEB issues rewards each session while penalizing potentially malicious nodes. Penalty types generally include double-signing and node offline. Once malicious behavior is detected, the BTC gas rewards in the offending node's reward pool will be penalized to the Treasury according to the reported malicious coefficient:

penalty = max(reward_pot_balance * F, minimum_penalty)

Where:

  • penalty: BTC gas amount to be penalized

  • reward_pot_balance: Node's BE reward pool amount

  • F: Penalty coefficient, calculated by babe and im-online modules:

  • minimum_penalty: Minimum penalty value, meaning each penalty is at least minimum_penalty.

GEB validator node misconduct does not penalize GEB principal and GEB transaction fees, only penalizes BTC gas in the reward pool.

When a node's reward pool is completely penalized, the node will be forced to withdraw.

if penalty > reward_pot_balance { 
    // force the validator(offender) to be chilled 
}

10. Validator Rewards Withdrawal (BTC and GEB)

10.1 Wallets

10.2 Check BTC and GEB Balance

To Check BTC balance and GEB balance, use the respective interfaces in the wallet.

Router:Accounts>My accounts>Find ⬇️ in your account component

10.3 Claim BTC and GEB from Validator Spot to Wasm Account

Use the claim function in the wallet interface to transfer rewards from validator spot to your wasm account.

10.4 Deposit BTC from Wasm to EVM

Operation path: Developer → Extrinsics → Submission , the specific operation is as shown in the screenshot. Make sure to select the designated pallet and the method to invoke.

1

balanceOnGEB

Enter the amount you want to transfer, paying attention to the precision value. For example, if you want to transfer 10,000 sats, you should enter 100000000000000.

2

evmAccount

Enter the EVM address where you want to receive BTC.

3

Submit Transaction

10.5 Deposit GEB from Wasm to EVM

11. Multi-signature Account as Validator Node

The validator node operations for multi-signature accounts are the same as for regular accounts, with the difference being in multi-signature account interactions.

Multi-signature Account Reference Documents

PreviousValidatorNextL-BTC Validator Operation

Last updated 5 days ago

After the node starts successfully, you can see your node on .

For Docker installation, refer .

Download the compiled binary from .

You can create a GEB account on and transfer GEB to this account for transaction fees and future staking costs.

After creating a GEB account, you can register as a validator node on

babe:

im-online:

For wasm account: (need to install )

For evm account: Metamask Quick Add:

Creating a multi-signature account: (need to install )

GEB Telemetry
here
GitHub releases
GEB Wallet
GEB Wallet
Node double-signing penalty details
Node offline penalty details
https://wallet.geb.network/
https://polkadot.js.org/extension/
https://chainlist.org
Transfer(EVM<-->Wasm)
https://wiki.polkadot.network/docs/learn-guides-accounts-multisig
https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account
https://www.youtube.com/watch?v=-cPiKMslZqI
https://wallet.geb.network/
https://polkadot.js.org/extension/