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.
163
questions
0
votes
0
answers
38
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 ...
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 ...
0
votes
1
answer
42
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 ...
0
votes
1
answer
41
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 ...
0
votes
1
answer
45
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,...
2
votes
1
answer
108
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 ...
1
vote
1
answer
106
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 ...
2
votes
1
answer
52
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 ...
5
votes
1
answer
147
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 ...
4
votes
1
answer
198
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?...
2
votes
2
answers
361
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 ...
0
votes
0
answers
157
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?
...
2
votes
1
answer
52
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 ...
1
vote
1
answer
103
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 ...
3
votes
2
answers
97
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 ...
0
votes
1
answer
69
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). ...
2
votes
0
answers
72
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="./...
0
votes
1
answer
45
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 ...
3
votes
1
answer
220
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 ...
2
votes
1
answer
213
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
...
0
votes
1
answer
128
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 ...
0
votes
0
answers
161
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 ...
3
votes
1
answer
163
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-...
3
votes
1
answer
111
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 ...
6
votes
1
answer
569
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 ...
0
votes
0
answers
53
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:
...
0
votes
1
answer
96
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 ...
0
votes
1
answer
113
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=...
1
vote
0
answers
93
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 ...
0
votes
0
answers
104
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 ...
-1
votes
1
answer
236
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, ...
0
votes
1
answer
96
views
Prioritize transaction with low fee
Tx1:
send '{"bcrt1qgz8qhrqyglh7zu3alssydsfa7wk2auucftfnv3": 0.2}' null "unset" 1.1
{
"txid": "d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8&...
1
vote
0
answers
110
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 ...
0
votes
1
answer
305
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.
...
2
votes
2
answers
343
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 ...
4
votes
1
answer
1k
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?
0
votes
1
answer
252
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 ...
0
votes
1
answer
330
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 ...
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://...
1
vote
1
answer
497
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 ...
0
votes
1
answer
133
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 ...
5
votes
1
answer
2k
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?
1
vote
1
answer
1k
views
How to use Electrum with a local regtest network?
The problem
I have a regtest network running in 127.0.0.1:18443.
I can access to regtest with user:123.
I would like to use Electrum (v4.0.2) with my local regtest but I cannot realize how to do that....
0
votes
1
answer
91
views
What can I expirement with BitcoinCore on my own?
I have a simple faculty assignment where I have to do some experiments with transactions or experiment with the Bitcoin protocol or maybe with wallet code. Work on that assignment shouldn't last more ...
2
votes
3
answers
2k
views
When using bitcoin-cli I get an error regarding fallback fees when trying to send regtest Bitcoin. How do I resolve this?
I have been doing an assignment on Bitcoin Core 0.20. Now every time I try to do a transaction:
Apples-iMac:bitcoin apple$ bitcoin-cli -regtest sendtoaddress ...
1
vote
1
answer
155
views
Run lightning-charge on c-lightning regtest
I'm trying to run lighting-charge (https://github.com/ElementsProject/lightning-charge) on top of one of my 2 lightning (https://github.com/ElementsProject/lightning) instances. I am running 2 nodes ...
2
votes
1
answer
99
views
Unable to replicate block header validation errors: time-too-old and time-too-new
we are playing with the regtest and we don't able to replicate the two blocks validation error managed here
https://github.com/bitcoin/bitcoin/blob/5b24f6084ede92d0f493ff416b4726245140b2c1/src/...
0
votes
1
answer
419
views
RegTest with mainnet addresses
I am trying to run a private Bitcoin network for testing.
I tried to run a RegTest network, but I need the addresses to be in the format of the ainnet.
Can I configure the RegTest to run with Mainnet ...
0
votes
2
answers
253
views
Regtest createmultisig Error: Invalid public Key?
As shown below, I generated 3 new addresses (Legacy I believe) in RegTest. I then try to create a multsig address from exactly these 3 addresses. What am I doing wrong, or is this unavailable in ...
1
vote
0
answers
67
views
Not receiving Compact Block even after 'sendcompact' message
I have setup a regtest net locally with 2 nodes. One of nodes generates blocks using 'bitcoin-cli generatetoaddress 10 ', sendcompact message was sent from other node yet it gets normal block(...