Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [regtest]

The Bitcoin Core client provides a "regtest" mode that can be used by software developers to safely perform software tests such as regression tests.

Filter by
Sorted by
Tagged with
1 vote
1 answer
47 views

Increase the fees in regtest

I have a Regtest environment with some Lightning nodes. I need to make the fees go up a lot to do some tests on how the Lightning nodes behave with high fees. What would be the most efficient/simple ...
polespinasa's user avatar
0 votes
1 answer
83 views

How to generate coinbase transaction in Python?

I know that on this forum a lot of questions on this topic, I have checked most of these, but can't find the solution for my task. I am creating my own algorithm for solo mining bitcoin on Python. I ...
Alex Radik's user avatar
0 votes
2 answers
28 views

Is the Regtest genesis hash always the same or not?

I would like to know if we have two nodes that are each running the regtest network will the genesis block digest be the same for the nodes or not? I ask because I notice in chainparams.cpp that ...
user49396's user avatar
  • 245
3 votes
0 answers
18 views

How to broadcast transactions in bitcoin regtest mode?

I build three nodes named A,B,C based on bitcoin-regtest image of docker. And these three nodes are in the same network which means they can communicate with each other. In node A, I use bitcoin-cli -...
Lawrence Yang's user avatar
4 votes
2 answers
310 views

Using Bitcoin Core Regtest in classroom

I'm looking for a way to use Bitcoin Core in Regtest in a WiFi network (educational purposes in classroom). The goal is that students install Bitcoin Core, activate Regtest, generate coins and send ...
Bart DV's user avatar
  • 159
0 votes
4 answers
65 views

Is it bad for a Bitcoin regtest address to have 1 as it's prefix

From the link below i read that it is dangerous for a Bitcoin regtest address to have 1 as it's prefix can someone explain why The link : Address starting with 2, what mode I am in?
Dev Tenji's user avatar
2 votes
1 answer
71 views

Mine blocks to specified address in regtest mode

I am running the ruimarinho/bitcoin-core docker image and trying to understand why the block reward is going to the wrong btc address. I have the following scenario: $ bitcoin-cli -regtest ...
Kevin's user avatar
  • 123
0 votes
1 answer
66 views

transfer funds from regtest to real testnet

is there a way to transfer tBTC from regtest to a real testnet wallet? I know how to create a regtest, but not (if is possible) how to transfer to testnet.
Klgor's user avatar
  • 3
0 votes
0 answers
45 views

Is it possible to make functional tests use my `bitcoind` running node as node?

I'm trying to fix some tests that are broken due to my own changes in the code base, and need to simultaneously run functional tests and bitconid in regtest mode and make functional tests to use my ...
Amir reza Riahi's user avatar
0 votes
0 answers
29 views

Which chain for developing a BTC based app? [duplicate]

There appear to be four chains you can use with bitcoin-cli. Main, test, signet, and regtest. Main is off the list obviously but I'm not sure which other chain I should be using. I'll need to be able ...
Cromulent's user avatar
  • 111
0 votes
1 answer
139 views

Generate regtest blocks with Bitcoin-Qt

I'm prepping for a tabconf workshop and trying to make the simplest uX for workshop attendees. Using bitcoincore.org for binaries: The Mac dmg doesn't come with a bitcoin-cli like with Linux. It does ...
Michael Tidwell's user avatar
0 votes
1 answer
53 views

HTLC routing issues in custom LN plugin (c-lightning) on regtest network

I am working on a custom routing plugin for CLN on a regtest network. My goal is to compare its performance against the classical rebalancing plugin provided by the CLN community. Now I am trying to ...
dancingsushi's user avatar
0 votes
1 answer
70 views

Why is `getdescriptorinfo` saying an xpub is not valid?

I'm testing this with the examples provided here. More specifically this one: wsh(sortedmulti(1,...
Bilthon's user avatar
  • 247
2 votes
1 answer
228 views

Issue listing regtest wallets

Questions: Should it be assumed if you're testing with bitcoincore you should always have a separate datadir per version/bin? Based on weirdness below, (not being able to list regtest wallets), does ...
Michael Tidwell's user avatar
1 vote
1 answer
193 views

bitcoin-cli WIF from xpriv, descriptor outputs clarity

Questions Is it possible for the bitcoin-cli command to extract WIFs from a ranged descriptor with a derivation path? If a descriptor is ranged it must have a xpriv key? If a descriptor has a xpriv ...
Michael Tidwell's user avatar
2 votes
1 answer
104 views

json parsing error with createrawtransaction with bitcoin-cli in regtest

I have been trying to use getrawtransaction to work with raw transactions in regtest and I have not been able to get it to parse correctly. the general format I am using is this. I am running this ...
lookingforhelp's user avatar
5 votes
1 answer
169 views

Testing pruning logic with bitcoind

I'd like to test pruning logic using bitcoind in regtest mode, however, given the nature of regtest, blocks are rather empty (if not fully). Is there any way of easily generating full blocks so the ...
sr_gi's user avatar
  • 3,220
4 votes
1 answer
297 views

How can I create a simple P2SH transaction in regtest?

I'm running bitcoind in the regtest mode on my computer. I need at least one transaction that spends a P2SH output in my local blockchain. Is there a way to create a P2SH transaction using bitcoin-cli?...
Amir reza Riahi's user avatar
2 votes
2 answers
717 views

How do I generate a testnet segwit v1 taproot compliant bitcoin address?

I have a script that generates a segwit v1 taproot compliant address and private key. The script currently generates a regtest address but with minor tweaks it spits out a mainnet address. I think the ...
ChristianOConnor's user avatar
0 votes
0 answers
283 views

bitcoin-cli listunspent returns empty list

I'm running bitcoind bitcoind -regtest and want to send BTC to bcrt1qxhx5gq5gwaju2lh0pxnp7qpn4685cwvst4ql45 segwit address. Why listunspent returns empty list after sending somebtc to segwit address? ...
att's user avatar
  • 123
2 votes
1 answer
74 views

Will bitcoin core in regtest mode still download and run mainnet blockchain?

I’d like a very light full node in a docker container used on developer laptop to establish the development environment. If I install bitcoin core in Ubuntu in Docker and configure it to run in ...
Meglio's user avatar
  • 289
1 vote
1 answer
142 views

bitcoin regtest listunspent generated with zero amount

I'm using regtest mode for testing new features. During my tests I encountered weird problem- listunspent RPC return a long list of transactions with amount 0. When I'm calling getwalletinfo RPC I can ...
liorko's user avatar
  • 239
3 votes
2 answers
118 views

C-Lightning Gossiping and Channel announcements

I am super new to lightning development and just starting to play around with stuff and wanted to execute some circular rebalancing payments, but was confronted with problems coming from the getroute ...
kostjaigin's user avatar
0 votes
1 answer
88 views

BIP68 does not apply on regtest

On regtest, I can use generateblock to successfully a mine transaction i.e containing an input with nSequence (0x05000000), although the input has not reached the specified age (5 confirmations). ...
Burak's user avatar
  • 186
2 votes
0 answers
85 views

How can I efficiently build a near-full block in regtest?

I want to build near-full blocks in regtest. I have written a script that does the job (on bitcoin core v24.0rc3), but it's too slow to be practical for my use case: #!/usr/bin/env bash BCLI="./...
Kalle Rosenbaum's user avatar
0 votes
1 answer
53 views

Is it possible to import a LN snapshot into the regtest network (possibly pruned version)?

I am currently writing a bachelor thesis where I plan to conduct some experiments on regtest network to evaluate how effective a particular rebalancing algorithm performs compared to currently used ...
dancingsushi's user avatar
3 votes
1 answer
275 views

How can I simulate a reorg for testing?

I'm trying to test the Bitcoin Dev Kit Electrum client with Electrs 0.9.1 for the case of a 1-block reorg. I use invalidateblock on my single regtest bitcoind 22.0, but I don't see my test transaction ...
Murch's user avatar
  • 75.7k
2 votes
1 answer
240 views

Automatic outbound connection using regtest nodes

I run node 1 using this command: bitcoind -port=2222 -datadir=/home/prayank/node1 -conf=/home/prayank/node1/bitcoin.conf -regtest=1 -rpcport=18666 -rpcuser=rpcuser -rpcpassword=rpcpass -bind=127.0.0.1 ...
user avatar
0 votes
1 answer
146 views

bitcoin regtest no wallet RPC methods

I have compiled bitcoin core from the github repo using the regular instructions. It compiled and it runs successfully bitcoind --version Bitcoin Core version v22.99.0-2f7b5c3039c7 However, it seems ...
Albert S's user avatar
  • 1,630
0 votes
0 answers
183 views

Why the receiver doesn't get any bitcoin on the balance if sendtoaddress or sendrawtransaction is used?

I want to do a transaction, but I see that the receiver doesn't get the amount sent. The regtest node started bitcoind -rpcuser=test -rpcpassword=test -regtest -rpcport=16591 -fallbackfee=0.000045 My ...
srgbnd's user avatar
  • 103
3 votes
1 answer
171 views

Why do you have to mine 432 blocks to activate segwit on regtest?

According to Rusty Russel, you need to mine 432 blocks to activate segwit on regtest. Why this specific blockheight? Sources: https://rusty-lightning.medium.com/segregated-witness-for-developers-...
arshbot's user avatar
  • 1,788
3 votes
1 answer
122 views

History of Bitcoin's Networks

Bitcoin main net was launched on January 3, 2009 at 19:15:05 UTC. But what is the history of the two other network options in Bitcoin: testnet and regtest? I think testnet is on version 3, what was ...
Thorkil Værge's user avatar
6 votes
1 answer
795 views

Why is "regtest" called "regtest"?

Bitcoin "regtest" is for when you want to run a local version of Bitcoin where the state is only shared within a small community, whereas both "mainnet" and "testnet" are ...
Thorkil Værge's user avatar
0 votes
0 answers
56 views

How to mine continuously in segtest with version bitcoin-0.20?

I am just learning the bitcoin codes for version bitcoin-0.20 and I make it successfully. Additionally, I have only one PC. I want to mine continuously in segtsest, however I only found methods below: ...
jiebang's user avatar
  • 101
0 votes
1 answer
108 views

Unbroadcast count doesn't change as expected after 15 minutes

Related question: Test that mempool reattempts delivery of locally submitted transaction I tried running hidden RPC mockscheduler, I think it worked that day after relaunching nodes few times and ...
user avatar
0 votes
1 answer
132 views

Test that mempool reattempts delivery of locally submitted transaction

Test: https://github.com/bitcoin/bitcoin/blob/master/test/functional/mempool_unbroadcast.py I am trying this manually with below steps: Run two nodes (regtest): Node1: bitcoind -port=18333 -rpcport=...
user avatar
1 vote
0 answers
99 views

Regtest mode lose blocks?

I'm playing with bitcoind, I'm an started in this subject and I'm playing with the regtest=1 option of course. The thing is that after one day all the transactions are lost, I'm trying to get the ...
martincolts's user avatar
0 votes
0 answers
128 views

Regtest at height 120k took 600ms to generate a block

Just doing while : do time bitcoin-cli generatetoaddress 1 <non_local_wallet_address> bitcoin-cli getblockcount done brings regtest blockgen times up to 600ms when generating a block at the ...
JonSnow's user avatar
  • 21
-1 votes
1 answer
298 views

Running bitcoind regtest with docker containers

I am running bitcoind regtest locally with the method from this article https://medium.com/ssde/how-to-use-docker-to-setup-multiple-bitcoin-test-nodes-on-your-own-mac-phase-i-8c6e5442c189. However, ...
Julian Ke's user avatar
0 votes
1 answer
119 views

Prioritize transaction with low fee

Tx1: send '{"bcrt1qgz8qhrqyglh7zu3alssydsfa7wk2auucftfnv3": 0.2}' null "unset" 1.1 { "txid": "d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8&...
user avatar
1 vote
0 answers
115 views

Generating zero-amount transactions in regtest mode?

I'm setting up a larger test network of regtest nodes in which all of them should be easily capable of creating blocks and sending transactions. To this end, I'm looking for a simple way for the nodes ...
tnull's user avatar
  • 111
0 votes
1 answer
349 views

Cannot remote to regtest node with curl cmd - Empty reply from server

Hi I'm new to rpc curl cmds and having some issues connecting to my regtest node. I'm getting "empty reply from server" which makes me think it is connecting but something is misconfigured. ...
bitblockwhat's user avatar
2 votes
2 answers
427 views

Setting the fee rate on regtest, or, quickly generating full blocks

I'm setting up some automated testing for a lightning wallet. At the heart of my tests is a bitcoind instance running in regtest mode. I need to be able to set the fee rate - both the fee rate ...
Shum's user avatar
  • 121
4 votes
1 answer
2k views

Can you break down what data is encoded into a bech32 address?

Can you break down what data is encoded into a bech32 address? e.g. bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 How do bech32 addresses on testnet, regtest, signet compare?
Michael Folkson's user avatar
0 votes
1 answer
270 views

-regtest generate 101 not working

when I type bitcoin-cli -regtest generate 101 in the powershell it gives me this error: PS C:\Program Files\Bitcoin\daemon> ./bitcoin-cli -regtest generate 101 error code: -32601 error message: I ...
Newdude's user avatar
  • 53
0 votes
1 answer
362 views

Sending regtest Bitcoin fails with an error message. How do I resolve this error? [duplicate]

When I try to send regtest Bitcoin using bitcoin-cli: ./bitcoin-cli -regtest sendtoaddress bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl 0.1 I get the error message: error code: -6 error message: Fee ...
Michael Folkson's user avatar
0 votes
1 answer
2k views

Address starting with 2, what mode I am in?

I am using https://github.com/freewil/bitcoin-testnet-box to run bitcoind in docker to test signing of transactions. make start tells me the bitcoind is started without -regtest flag. See https://...
Ashfame's user avatar
  • 179
1 vote
1 answer
594 views

Change difficulty using bitcoin-cli/bitcoind in regtest mode

Is there an RPC command which would allow me to generate blocks under a given difficulty? For instance, I would like to do something like this: bitcoind -daemon -regtest bitcoin-cli -regtest ...
Tristan Nemoz's user avatar
0 votes
1 answer
146 views

Calculate block hash is different in regtest?

I'm able to calculate the block hash in mainnet and testnet, but I don't get the right hash in regtest. I mint +3000 blocks and I get the block with height 3000 bitcoin-cli getblock $(bitcoin-cli ...
monkeyUser's user avatar
6 votes
1 answer
5k views

How do I get set up on Signet?

I have heard about Signet here and here. How do I get set up on Signet?
Michael Folkson's user avatar