13
votes
Bitcoin is not connected in regtest mode
Although I believe Fred Tingey's answer is complete, it has the following attributes:
it depends on a config file.
it provides examples for bitcoin-qt on the windows platform, and the OP was asking ...
11
votes
Bitcoin is not connected in regtest mode
In order to run multiple nodes in regtest mode on a single machine you will need to sandbox each node.
In this example I have three nodes, they are named Alice, Bob and Cory. Since Bitcoin is a Peer/...
10
votes
Testing blockchain forks
You can use the invalidateblock RPC commands to create blockchain forks.
invalidateblock hash tells a node to consider hash invalid, so just generate a bunch of blocks, invalidate one somewhere down ...
10
votes
Accepted
Bitcoin is not connected in regtest mode
You need to run more than one node on your machine (you can do that if you give each node a different -port and -rpcport). And you need to tell them how to find each other (using -connect=127.0.0.1:...
10
votes
Accepted
Difference between regtest and testnet
Regtest is a network designed solely to be private and for testing only. You can create a private regtest network and do testing and experimentation with it. It is not a public network and has no ...
9
votes
Accepted
Receive money in regtest mode
You probably want to run multiple bitcoind instances in regtest to simulate multiple nodes.
Thats pretty easy. You can run a second instance by starting bitcoind with a clean data directory and a ...
8
votes
Accepted
How do I reset bitcoin regtest mode?
Delete the Bitcoin Core datadir:
Linux ~/.bitcoin/regtest directory.
Windows %appdata%\bitcoin\regtest directory.
MacOS $HOME/Library/Application Support/Bitcoin/regtest directory.
8
votes
Accepted
How do I get set up on Signet?
I will assume that you want to get set up on the default Signet that is administered by Kalle Alm and AJ Towns. (You can also set up your own custom Signet network and administer it yourself but the ...
8
votes
Accepted
Can you break down what data is encoded into a bech32 address?
Bech32 addresses are defined in BIP 173.
This slide is taken from Pieter Wuille's presentation on bech32 at SF Bitcoin Devs in March 2017.
Different prefixes
A list of address prefixes on the Bitcoin ...
7
votes
Is it possible to create bitcoind regtest network on Ubuntu (which itself is on Virtualbox)?
It appears that Fred Tingey's answer was mostly correct, but contained incorrect port numbers in the samples he provided. If someone were to copy and paste it all it would not have worked correctly.
...
7
votes
Accepted
How does bitcoin functional test framework work?
The functional tests test the RPCs. The unit tests test the C++ code directly by calling the functions.
The functional test frameworks uses a version of python-bitcoinrpc which can be found here. ...
7
votes
What are the key differences between regtest and the proposed signet?
The main difference between signet and regtest is that signet is an actual network, as opposed to a sandboxed environment.
In regtest, the network topology is entirely manual. You spin up nodes, and ...
6
votes
Accepted
Running another instance of bitcoin-qt dedicated to testnet/regtest?
Depending on your OS you can start a 2nd bitcoin-qt acting on a non-mainnet with ./bitcoin-qt -testnet or ./bitcoin-qt -regtest (from a shell). You can also define a custom datadir and place a bitcoin....
6
votes
Accepted
trouble with bitcoin cli regtest
It seems you're mixing up bitcoind and bitcoin-cli.
bitcoind is the Bitcoin Core daemon. It must be running first before you can do anything. bitcoin-cli is a tool to send RPC commands to a running ...
6
votes
What are the key differences between regtest and the proposed signet?
Signet is more comparable to testnet than it is to regtest.
Regtest is for private use and testing things. Even if signet were available, it is still useful to have your own blockchain for testing ...
5
votes
Accepted
Testing blockchain forks
I managed to test forks by creating 3 reg test nodes. One node is used to interface with my software, and two other nodes are used to hold competing blockchains. The regtest mode starts each node with ...
5
votes
Accepted
Is there any way to experiment with the Bitcoin technology without having to buy actual bitcoins for use on the larger bitcoin network?
Yes. You can run bitcoind in regtest mode. In that mode, you can produce your own "bitcoins" for testing purposes.
5
votes
Accepted
Is there a maximum balance that a single address can hold?
Nope. Not 1 bit. A balance (in this context) is the sum of all UTXO's for a given address. There is no limit on the number of UTXO's or their total amount (from the perspective of how the blockchain ...
5
votes
Why do you have to mine 432 blocks to activate segwit on regtest?
Note that since 0.16, Segwit is always active on regtest from the genesis block.
Prior to 0.16, Segwit on regtest is defined to have a start time of 0 and can be activated through the BIP 9 ...
4
votes
Accepted
How can I do CPU mining on testnet?
Even on testnet the difficulty is sufficiently high that it will take you a long time to mine anything using cpu. (Lots of people testing ASICs, presumably.)
Your best bet is probably Testnet in a ...
4
votes
Bitcoin RPC getbalance of address I sent coins to on regtest
Use it like this:
account=123abc
bitcoin-cli -regtest setaccount $address $account
bitcoin-cli -regtest getbalance $account
10.0
Community wiki
4
votes
Accepted
Bitcoin RPC getbalance of address I sent coins to on regtest
getbalance returns the balance of an account, not an address. https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
If there's no account by the name of ...
4
votes
Accepted
Regtest: One node nullifying other node's balance
You only see the balance of blocks that have at least another 100 on top. This is because coinbase outputs only become spendable after 101 confirmations (the maturity period).
After the nodes ...
4
votes
Adding fixed seed nodes as DNS doesn't seem to be available
The message means that no DNS seeds were found (which is normal, as regtest has no DNS seeds), and thus that it will fall back to its builtin list of fixed seed nodes (which regtest has 0 of).
In ...
4
votes
Accepted
Open-source blockchain explorer for regtest mode
I managed to point Abe to regtest just by using datadir=/home/$USER/.bitcoin/regtest in the config file and following the official instructions.
4
votes
Accepted
Bitcoin regtest mining
You can build your miner with a bash command:
$ while true; do bitcoin-cli -regtest generate 1; sleep 300; done
You'l get a block every 5'. If you want a better simulation of mainnet you could use a ...
4
votes
Accepted
How can I fund my node in regtest?
No, there does not such thing as initialfreecoins=10000000. However mining on regtest is not resource hungry and nearly instant. It's the only way to get coins.
To get coins on regtest you first need ...
4
votes
Accepted
bech32 addresses beginning with "bcrt..." on regtest
Regtest and testnet are different networks. They are not compatible with each other.
Regtest is a private local network which is used solely for testing. It is primarily used for the regression tests,...
4
votes
Accepted
How to use Electrum with a local regtest network?
Electrum doesn't connect directly to Bitcoin nodes. Instead it connects to Electrum servers using the Electrum protocol. These servers run Bitcoin nodes and additional Electrum server software in ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
regtest × 147bitcoind × 53
bitcoin-core × 23
testnet × 22
json-rpc × 13
bitcoin-cli × 13
testing × 8
signet × 7
transactions × 6
transaction-fees × 5
bitcoin-core-development × 5
network × 5
python × 5
bitcoinj × 5
bitcoin.conf × 5
blockchain × 4
wallet × 4
address × 4
segregated-witness × 4
miner-configuration × 4
lightning-network × 3
block × 3
multi-signature × 3
blockchain-fork × 3
difficulty × 3