Tutorial · Regtest

What Regtest Is

Regtest is a Divi network that only you run. You make the blocks yourself, so a test that takes days on testnet takes seconds. Here is how it differs from testnet, and when to pick each.

About 8 minutes to read · Checked 2026-10-21

1Divi's three networks

The Divi node software can run on three networks. They use the same code and the same commands, but they never mix: each has its own blocks, its own coins and its own data folder.

MainnetTestnetRegtest
Who runs itEveryoneAnyone who wants to practiseOnly you
Coins worthReal moneyNothingNothing
Who makes blocksStakers, every minuteStakers, every minuteYou, whenever you ask
Addresses start withDx or yx or y
Node setting(none)testnet=1regtest=1
Data folderthe data folder itselftestnet3/regtest/
Peer port514725147451476
RPC port (divi-cli)514735147551475
Finds other nodesDNS seedsDNS seedNever, unless you tell it one

Regtest is short for regression test. It was built so the Divi developers could test the node against a chain they fully control, and it is just as useful for anyone building on Divi or practising commands.

Regtest and testnet share their RPC port and address style

Both use RPC port 51475 and both make x/y addresses. So you cannot run a testnet node and a regtest node on one computer with the default settings, and a regtest address looks exactly like a testnet one. Nothing you make on regtest exists anywhere else.

2What is different on regtest

Regtest keeps Divi's rules but turns the numbers down so you can see everything happen in a few minutes. These values are from the node's source and from a regtest chain we built on 2026-10-21.

Block reward at the start
1,250 DIVI
Coins mature after
20 blocks
Blocks you can make
100
Minimum coin age to stake
0

3Who makes the blocks

On regtest nobody makes a block unless you ask. The command is setgenerate, and it exists only on regtest:

./divi-cli setgenerate 101

That makes 101 blocks straight away and prints their hashes. On mainnet or testnet the same command answers:

error: {"code":-32601,"message":"Method disabled: invalid networks setting (regtest only)"}

There are two Divi nodes you can run, and only one of them can make regtest blocks today:

NodeJoin a regtest chainMake regtest blocks
Divi v3.0.0 (divid, C++)YesYes: setgenerate and generateblock
IronDivi v0.2.5 (irondivid, Rust)Yes, with --regtestNot yet

Ask IronDivi for a block and it says so plainly:

error code: -32603: setgenerate is not yet implemented - requires full mining subsystem

So the tutorials in this series use the Divi C++ node to make blocks, and IronDivi as a second node that follows the chain, holds a wallet, and answers the same commands. Everything that doesn't need a new block works on either.

4When to use regtest

5When testnet is the better tool

Regtest can't show you anything that involves other people. Use testnet when:

A good habit for developers: prove the logic on regtest, then run the same test once on testnet before anything touches mainnet.

6The regtest tutorials

  1. Start a regtest node and make your first 100 blocks
  2. Two nodes on one laptop: Divi making blocks, IronDivi following
  3. Give yourself coins and watch them mature
  4. Practise every vault command on regtest in five minutes
  5. Reproduce a bug: a script that builds the same chain every time
  6. Test your app against regtest before testnet (Python and JavaScript)
  7. Atomic swaps on regtest: a hash lock and a time lock, proved on your own chain

You need the Divi node software for all of them: see install the Divi node, and install IronDivi for the second node.

If something goes wrong

You seeWhat it means
Method disabled: invalid networks setting (regtest only)You ran setgenerate on a mainnet or testnet node. Only a node started with regtest=1 can make blocks.
setgenerate is not yet implemented - requires full mining subsystemYou asked IronDivi for a block. Use the Divi C++ node to make blocks; IronDivi can follow the chain.
Your regtest chain has a different tip from a friend'sNormal. Only the genesis block is shared; every block after it is made locally.
A regtest address was refused by the testnet faucet or explorerRegtest addresses look like testnet ones but the regtest chain is private. Use a testnet node for testnet coins.

Still stuck? Ask the Divi chatbot, or see all tutorials.