xone --dev starts a private XDC chain on your machine with no other input. The chain has id 1337 and one validator. It seals blocks alone and funds one test account. This post shows how to start it, send a transaction, read the block, and stop it. It also says what the chain is not.

What does xone --dev give me?

It gives you a one-validator chain for dapp tests. The --dev row of the flag reference says what it does:

  • Chain id 1337.
  • One validator. Its key is made in memory at start and never written to disk.
  • The node seals blocks alone. It needs no peers.
  • One funded developer account: account 0 of the public test test ... junk mnemonic.
  • It implies --mine, --http and --nodiscover.
  • The datadir is a new temporary directory, unless --datadir names an empty one.

The developer account is 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266. It holds 1,000,000,000 XDC at block 0 (PR #409, merged 2026-11-14). The node prints the validator address, the account, its key and the HTTP endpoint at start.

How do I start the dev chain?

Build xone from main, then run it with --dev. The v0.1.0 release (2026-11-12) is older than PR #409 and has no --dev. The run xOneRS post has the build steps.

cargo build --locked --release -p xone
./target/release/xone --dev

The start output prints dev chain 1337, the block period and the HTTP endpoint (default port 8545). --dev.period sets the period to 1 to 60 seconds:

./target/release/xone --dev --dev.period 1

The node refuses --dev with a network flag, another --networkid, --override.genesis, --chainspec, --keystore or --password. It also refuses a non-empty --datadir.

What are the period and epoch of the dev chain?

The block period is 2 seconds unless you set --dev.period. The epoch is 900 blocks and the gap is 450 blocks. The chain is V1 until block 2700 and V2 after it.

The dev chain starts from the pinned devnet genesis. devnet.json sets epoch: 900, gap: 450 and V2 switchBlock: 2700. dev.rs keeps these numbers. Its header says why: the first V2 reward needs two epoch switches before it, and V1 needs checkpoints at multiples of 900. A shorter V1 stops the chain at the first V2 reward.

For a dapp developer, both versions seal a block every period (PR #409).

How do I send a transaction with curl?

Sign the transaction outside the node, then send it with eth_sendRawTransaction. The method list in docs/rpc/methods.md has eth_sendRawTransaction. It has no eth_sendTransaction. Use any Ethereum signer with the public test key that the node printed.

PR #409 tested with a legacy transaction and an explicit gas limit. It reports that the pool floor is 12.5 gwei, so set a gas price at or above it.

The curl calls below are examples written for this post, not copied from the docs. They use the default endpoint localhost:8545.

# Example: the chain id. Expect 0x539, which is 1337.
curl -s -H 'content-type: application/json' localhost:8545 \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'

# Example: the balance of the developer account.
curl -s -H 'content-type: application/json' localhost:8545 \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","latest"]}'

# Example: send a signed transaction. Replace <signed-raw-tx> with your own.
curl -s -H 'content-type: application/json' localhost:8545 \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_sendRawTransaction","params":["<signed-raw-tx>"]}'

The last call returns the transaction hash.

How do I read the block?

Ask for the receipt, then for the block. Both calls are examples.

# Example: the receipt. Replace <tx-hash> with the hash from the send call.
curl -s -H 'content-type: application/json' localhost:8545 \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["<tx-hash>"]}'

# Example: the latest block with transaction hashes.
curl -s -H 'content-type: application/json' localhost:8545 \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["latest",false]}'

The receipt has the block number once a block holds the transaction. The node seals a block every period. PR #409 reports a contract deployment and a call with status 1 on a live run.

Can I control when blocks are made?

Yes. A --dev node serves extra methods that other nodes do not register. The dev-mining guide lists them. Two calls from that guide:

curl -s -H 'content-type: application/json' localhost:8545 \
  -d '{"jsonrpc":"2.0","id":1,"method":"evm_setAutomine","params":[false]}'
curl -s -H 'content-type: application/json' localhost:8545 \
  -d '{"jsonrpc":"2.0","id":1,"method":"evm_mine","params":[3]}'

The XDPoS timing rules still apply: consecutive blocks stay at least one period apart. For the standard methods, read the RPC surface post and the RPC docs.

How do I stop it?

Send the process SIGTERM. When the node made the datadir itself, it removes the directory on stop (dev.rs). A datadir that you named with --datadir is never removed.

The key is gone when the process ends. The start output says "this chain cannot be restarted". A new start makes a new chain. If your wallet remembers the old chain, reset its activity, or the nonce will be wrong (browser wallet guide). With --dev.seed, the same seed gives the same validator address and genesis on every run.

What is the dev chain not?

It is not a network. It is one node with one validator and no peers.

  • It is not safe for real funds. The developer key is public. Never use it on a real network.
  • With --dev.seed, anyone who has the seed has the validator key.
  • It is not mainnet, Apothem or net2040. The node refuses --dev with those flags.
  • It does not test a multi-validator setup. For that, see the net2040 validator guide.
  • Keep the endpoint on loopback. The browser wallet guide says not to set --http.addr 0.0.0.0 for a dev node.

How does it compare with geth --dev?

This post has no comparison table. The research notes for this site have no claim about geth --dev. The source of dev.rs says only that 1337 is the chain id of every --dev chain, as in geth --dev.

Frequently asked questions

What chain id does xone --dev use?

It uses chain id 1337. eth_chainId answers 0x539.

Can I restart a dev chain?

No. The validator key lives in memory only, so a new start makes a new chain. --dev.seed gives the same validator address and genesis on every run.

Which account is funded?

Account 0 of the public test test ... junk mnemonic: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266. It holds 1,000,000,000 XDC at block 0.

What block time does the dev chain use?

Two seconds by default. --dev.period sets 1 to 60 seconds.

Is the v0.1.0 release enough?

No. v0.1.0 was published on 2026-11-12. PR #409 merged on 2026-11-14. Build xone from main to get --dev.

Sources