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
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
After the node starts successfully, you can see your node on GEB Telemetry.
For Docker installation, refer here.
1.2.2 Using Docker Image
Place the above configuration file in the current directory, named config.json
. Run the following command:
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:
Enter the container:
The parameters correspond to those in the configuration file. For background running Docker, you can check logs with:
When the logs show block synchronization starting, it indicates the node has started successfully:
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)
Download the compiled binary from GitHub releases.
Sync to Latest Chain State
Start syncing the blockchain with this command:
Or start directly in validator mode for syncing:
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
You can create a GEB account on GEB Wallet and transfer GEB to this account for transaction fees and future staking costs.
1.5 Set up on-chain identity(Important)
The on-chain identity must be set to match your node name.
2. Registering Validator Node
After creating a GEB account, you can register as a validator node on GEB Wallet
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 BEVM account can only register once.
(4) Before registering, ensure you have sufficient balance for transaction fees and self-voting amount (1000 BEVM 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
Where YOUR_RPC_PORT
is the port specified by rpc-port
when starting the node, default is 8087.
Example response:
The result
field is your Session Keys. Set them through setKeys
in Developer>Extrinsic:
Currently,
proof
can be set to0x
.
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 BEVM mining).
Validator nodes not participating in L-BTC staking mining (i.e., without bound EVM address) can still receive BTC gas rewards and BEVM transaction fee rewards(Different from the BEVM assigned with the Mother Consensus).
5. Checking Validator Node Setup
Four "true" values in response indicate complete setup:
These four values represent:
Whether nominated (validator.isChilled is false)
Whether meeting minimum voting amount (self-vote at least 100 BEVM and total votes at least 1000 BEVM)
Whether Session Keys are set
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:
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 BEVM or total votes less than 1000 BEVM, 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 BEVM, while the additional fee for registration is 100 BEVM.
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
BEVM 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 penalizedreward_pot_balance
: Node's BE reward pool amountF
: Penalty coefficient, calculated by babe and im-online modules:im-online: Node offline penalty details
minimum_penalty
: Minimum penalty value, meaning each penalty is at leastminimum_penalty
.
BEVM validator node misconduct does not penalize BEVM principal and BEVM 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.
10. Validator Rewards Withdrawal (BTC and BEVM)
10.1 Wallets
For wasm account: https://wallet.bevm.io/ (need to install https://polkadot.js.org/extension/)
For evm account: Metamask Quick Add: https://chainlist.org/?search=BEVM+Mainnet
10.2 Check BTC and BEVM Balance
To Check BTC balance and BEVM balance, use the respective interfaces in the wallet.
Router:Accounts>My accounts>Find ⬇️ in your account component
10.3 Claim BTC and BEVM 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.
balanceOnBevm
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.
evmAccount
Enter the EVM address where you want to receive BTC.
Submit Transaction
10.5 Deposit BEVM from Wasm to EVM
10.6 Bridge BTC to Bitcoin Mainnet
Visit https://www.bevm.io/bridge-mainnet to bridge your BTC to Bitcoin mainnet.
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
Creating a multi-signature account: https://wallet.bevm.io/ (need to install https://polkadot.js.org/extension/)
Last updated