Skip to main content

Purpose and Scope

This guide provides operational guidelines for deploying, operating, and maintaining StableNet nodes and validator infrastructure.
It covers network deployment procedures, validator operations, and overall node maintenance.
For system architecture and component design, refer to the Core Architecture documentation.
For detailed consensus behavior, see the Anzeon WBFT Consensus Protocol.
For governance contract usage, refer to the Governance System documentation.

Network Deployment

Genesis File Creation

The StableNet network is initialized using a genesis file generated by the genesis_generator tool.
This tool creates the genesis block including Anzeon consensus parameters and system contracts.

Genesis Configuration Parameters

StableNet genesis configuration defines consensus- and governance-specific parameters under the anzeon section.

System Contract Initialization

Each system contract is configured via initialization parameters at genesis.
Below is a list of key system contracts and their initialization parameters.
GovValidator (Address: 0x0000000000000000000000000000000000001001)
  • members: Comma-separated list of operator addresses
  • validators: Comma-separated list of validator addresses
  • blsPublicKeys: List of validator BLS public keys (same order as validators)
  • quorum: Minimum number of votes required to approve governance actions
  • expiry: Governance proposal expiration time (seconds, default: 604800 = 7 days)
  • gasTip: Gas tip applied to transactions from non-authorized accounts (wei)
NativeCoinAdapter (Address: 0x0000000000000000000000000000000000001000)
  • name: Native token name (e.g. "WKRC")
  • symbol: Native token symbol (e.g. "WKRC")
  • decimals: Token decimals (typically 18)
  • currency: Pegged fiat currency code (e.g. "KRW")
  • masterMinter: GovMasterMinter contract address
  • minters: Comma-separated list of contracts with minting authority

Bootnode Configuration

StableNet networks use bootnodes for peer discovery.
Bootnodes can be specified via the --bootnodes flag at runtime or via configuration files.
Bootnode example (--bootnodes flag)
Bootnodes are selected in the following priority order:
  1. Explicitly specified via the --bootnodes flag
  2. BootstrapNodes defined in the configuration file
  3. Network preset flags (--mainnet, --testnet)
  4. Default mainnet bootnode configuration

Network Flags and Configuration

The following command-line flags are commonly used to deploy and run StableNet networks.

Validator Operations

Validator Key Structure

StableNet validators use three distinct cryptographic keys, each serving a different role in the consensus and governance systems.

Key Generation and Management

ECDSA Keys

ECDSA keys are generated and managed using the standard Ethereum keystore format.
The derived public address is used as the node’s etherbase (coinbase) and must exactly match the address registered in GovValidator.validators.

BLS Key Derivation

BLS keys are deterministically derived from the validator’s ECDSA private key.
This guarantees that the same ECDSA key always produces the same BLS key pair.
The derived BLS public key must be registered in GovValidator.blsPublicKeys at the same index as the corresponding validator address.

Validator Registration

Validators are registered in the GovValidator contract through governance proposals.
Only registered validators can participate in consensus and block proposal.

Starting a Validator Node

The following example starts a validator node with mining enabled.
Key validator flags:

Validator Mining Process

When a validator node starts mining, the following initialization sequence occurs:
  1. Load validator state
    • Load the registered validator set from genesis and the latest chain state via GovValidator.
    • Verify that the node’s etherbase is part of the active validator set.
  2. Validate validator keys
    • Ensure the address derived from the signing key matches the etherbase address.
    • Verify that the corresponding BLS public key is correctly registered in GovValidator.blsPublicKeys.
  3. Initialize the WBFT consensus engine
    • Load Anzeon WBFT parameters (epoch length, block period, timeout, etc.) from genesis.
    • Apply the WBFT configuration for the current block height.
  4. Determine validator role
    • Decide whether the node is the proposer for the current round based on the proposer policy.
    • If selected as proposer, prepare a block proposal.
  5. Start consensus message handling
    • Activate network handlers for consensus messages.
    • Initialize signing and verification logic for each consensus phase, including BLS signature aggregation.
  6. Block production and consensus participation
    • If proposer, propose a block including WBFTExtra.
    • If not proposer, validate the proposed block and broadcast signed messages according to the consensus phase.

Gas Tip Policy

In StableNet, the gas tip (priority fee) for non-authorized accounts is governed via on-chain governance and stored in the GovValidator contract.
Gas tip application differs by account type.

Authorized Accounts

Authorized accounts follow the standard Ethereum model and directly specify maxPriorityFeePerGas per transaction.
  • Per-transaction gas tip configuration
  • The specified maxPriorityFeePerGas is applied as-is
  • Competitive prioritization during congestion
  • Not subject to the fixed gas tip policy defined by governance

Non-Authorized Accounts

Non-authorized accounts may also specify maxPriorityFeePerGas, but the value is not used to determine the actual gas tip.
  • Regardless of the transaction’s maxPriorityFeePerGas, the fixed gas tip defined by governance is applied
  • The transaction-specified gas tip is used only for transaction replacement logic
  • Transactions below the fixed gas tip are filtered out by the transaction pool

Gas Tip Updates

  • Validators may propose updates to the fixed gas tip via governance proposals
  • Proposals require quorum approval and are applied immediately upon execution

Epoch Transitions

StableNet operates on epoch-based cycles, and validator set changes are applied only at epoch blocks. Key points:
  • Epoch length is configured via anzeon.wbft.epochLength (default: 10 blocks)
  • Validator set changes approved during epoch N become active at the start of epoch N+1
  • The first epoch uses the validator set defined in anzeon.init.validators
  • Subsequent epochs load validator sets from GovValidator.validators

Governance Participation

Validators participate in governance using their operator keys.
Governance manages network configuration and validator sets through proposals and voting.

Proposal Types

  • ADD_VALIDATOR: Add a new validator to the set
  • REMOVE_VALIDATOR: Remove an existing validator
  • SET_GAS_TIP: Update the mandatory gas tip value
  • CONFIGURE_SYSTEM: Update system parameters and configuration

Voting Process

  • Any governance member can submit a proposal via a contract call
  • Other members vote using vote(proposalId, approve)
  • Proposals are executed automatically upon reaching quorum
  • Proposals expire after the configured expiry period (default: 7 days)

Node Monitoring and Maintenance

Logging Configuration

StableNet nodes use a structured logging system with configurable verbosity levels.
Operators can configure global log levels, module-specific levels, and output formats.
Key log modules to monitor:

Metrics and Monitoring

StableNet supports metrics collection and integration with external monitoring systems to ensure operational visibility.

Disk Space Management

StableNet nodes consume significant disk space to store blockchain data.
Continuous monitoring and protective shutdown mechanisms are recommended for stable operation.

Minimum Free Disk Space

To prevent data corruption due to low disk space, a minimum free disk threshold can be configured.
If available disk space falls below this threshold, the node shuts down automatically.
The node periodically checks available disk space and performs a graceful shutdown when the threshold is reached.

Database Size Monitoring

Database usage varies by sync mode and pruning configuration.
The table below shows typical database sizes and expected monthly growth.
The following directories should be continuously monitored:
  • chaindata/: Main blockchain state and block database
  • ancient/: Freezer directory for old blocks (if configured separately)
  • blobpool/: Blob transaction pool data
  • ethash/: DAG storage (if Ethash consensus is used)

Pruning and Garbage Collection

When using the hash-based state scheme, pruning and garbage collection can be configured.
Note: Path-based state databases use automatic pruning and do not support manual GC configuration.

Database Maintenance

State Scheme Selection

StableNet supports two state storage schemes. Operators should select the appropriate scheme based on operational requirements.
Advantages of the path-based scheme:
  • Automatic state pruning
  • Lower disk usage
  • Improved synchronization performance
Advantages of the hash-based scheme:
  • Mature and well-tested
  • Manual control over pruning and garbage collection
  • Suitable for environments requiring offline pruning tools

Offline Pruning Recovery

Nodes using the hash-based scheme automatically attempt recovery at startup if an interrupted pruning operation is detected.
This recovery process runs automatically during startup and restores database consistency after abnormal pruning interruptions.

Chain Recovery and SetHead

If blockchain state is corrupted or needs to be rolled back to a specific point, the debug_setHead RPC method can be used.
Use cases:
  • Recovery from corrupted block data
  • Rolling back after detecting chain anomalies
  • Rebuilding the chain on the correct fork after a network split
Warning: setHead deletes all blocks and state data after the specified point.
Always ensure a backup exists and fully understand the impact before use.

Node Upgrade Procedure

Node upgrades should be performed sequentially using the following steps:
  1. Stop the node
    • Gracefully shut down the running gstable process.
  2. Replace binaries
    • Back up the existing binary and replace it with the new version.
    • Verify execution permissions and binary paths.
  3. Review configuration files
    • Check for new or modified configuration options in the new version.
    • Ensure compatibility with existing configuration files.
  4. Restart the node
    • Restart the node with the same options.
    • For validator nodes, ensure the --mine flag is included.
  5. Inspect initial logs
    • Review startup logs for database migrations, consensus initialization, and network connectivity issues.
Pre-upgrade checklist:
  • Review release notes for breaking changes
  • Back up the database (chaindata/ directory)
  • Test the upgrade on non-critical nodes first
  • For validator nodes, announce planned downtime to peers in advance
Post-upgrade verification:

Abnormal Shutdown Detection

StableNet nodes detect abnormal shutdowns indirectly via database state and automatically run recovery mechanisms on startup.

Abnormal Shutdown Handling

  • On startup, LevelDB WAL (Write-Ahead Log) is used to recover incomplete writes
  • Consistency between state database, snapshots, and ancient data is verified
  • If consistency cannot be restored automatically, resynchronization or state reconstruction may be triggered
Manual recovery after abnormal shutdowns:

Bootnode Operations

Dedicated bootnodes can be deployed to support peer discovery in StableNet networks.
Bootnodes provide lightweight peer discovery services without maintaining full blockchain state.
Clients can reference the bootnode as follows:

Network Monitoring Dashboard

For stable validator operations, it is recommended to configure dashboards with the following key metrics. Validator Key Performance Indicators (KPIs)