Hot answers tagged

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 ...
user avatar
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/...
user avatar
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 ...
user avatar
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:...
user avatar
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 ...
user avatar
  • 61.3k
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 ...
user avatar
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.
user avatar
  • 15k
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 ...
user avatar
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 ...
user avatar
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. ...
user avatar
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. ...
user avatar
  • 61.3k
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 ...
user avatar
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....
user avatar
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 ...
user avatar
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 ...
user avatar
  • 61.3k
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 ...
user avatar
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.
user avatar
  • 2,378
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 ...
user avatar
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 ...
user avatar
  • 61.3k
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 ...
user avatar
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
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 ...
user avatar
  • 28.7k
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 ...
user avatar
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 ...
user avatar
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.
user avatar
  • 56
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 ...
user avatar
  • 76
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 ...
user avatar
  • 1,342
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,...
user avatar
  • 61.3k
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 ...
user avatar
  • 61.3k

Only top scored, non community-wiki answers of a minimum length are eligible