Fakenet

Fakenet is Armchain's built-in local development network. Think of it as Armchain's equivalent of Hardhat Network or Ganache. It runs a private chain with auto-generated validators, pre-funded accounts, and fast block times, all with a single command.

Overview

Fakenet provides:

  • Instant setup: No genesis file, single command to launch

  • Deterministic keys: Auto-generated validator keys for reproducibility

  • Fast parameters: 3-second empty block skip, 10-minute epochs

  • Full feature set: All consensus, EVM, and PQC features active

  • Pre-funded accounts: Validators start with 1 billion ARM each

Quick Start

Single Validator (PoA-like)

Single validator acting as a standalone block producer:

# Build the client
cd armchain-client
make armnode

# Run single-validator fakenet
./build/armnode --fakenet 1/1 \
  --http \
  --http.addr 0.0.0.0 \
  --http.port 4000 \
  --http.api eth,web3,net,personal,txpool,arm,dag,debug,admin \
  --http.corsdomain "*" \
  --ws \
  --ws.addr 0.0.0.0 \
  --ws.port 4500 \
  --ws.api eth,web3,net,arm \
  --allow-insecure-unlock

Your local RPC is now available at http://localhost:4000.

Multi-Validator Network

More realistic test setup with multiple validators:

Then connect the nodes to each other:

Non-Validator Node

To run a non-validator node (sync only) in a fakenet:

Use 0 as the validator ID to run as a non-validator.

Using the Demo Scripts

The demo/ directory contains convenience scripts for running a multi-node fakenet:

Demo Configuration

The demo scripts use these port assignments:

Validator
P2P Port
HTTP RPC Port
WebSocket Port

Validator 1

3001

4001

4501

Validator 2

3002

4002

4502

Validator 3

3003

4003

4503

Fakenet Parameters

Fakenet uses relaxed parameters for fast development:

Parameter
Fakenet
Devnet

Empty Block Skip

3 seconds

1 minute

Max Epoch Duration

10 minutes

4 hours

Max Epoch Gas

300,000,000

1,500,000,000

Gas Power Allocation

1000× base

1× base

Validator Password

"fakepassword"

User-defined

Hard Forks

London + LLR

London + LLR

Working with Fakenet Accounts

Pre-funded Validator Accounts

Each fakenet validator is pre-funded with 1 billion ARM (1e27 wei). Access them via the console:

Creating Test Accounts

Sending Test Transactions

Deploying Contracts to Fakenet

With Hardhat

With the Armchain Ethers SDK

Resetting Fakenet

To start fresh:

Or if using the demo scripts:

Common Use Cases

Use Case
Configuration

Quick contract testing

Single validator: --fakenet 1/1

Consensus testing

Multi-validator: --fakenet 1/3, 2/3, 3/3

Frontend development

Single validator with CORS: --http.corsdomain "*"

API testing

Enable all APIs: --http.api eth,web3,net,personal,txpool,arm,dag,debug,admin

Load testing

Increase gas power, multiple validators

Limitations

  • Not for production: Keys are deterministic and publicly known

  • No persistence guarantees: Chain data may be lost between restarts if not backed up

  • Network isolation: Fakenet nodes can only connect to other fakenet nodes with the same validator count

  • No real staking: Validators are auto-registered with equal stakes

Further Reading

Last updated