Questions tagged [regtest]

When running Bitcoin Core client in regtest mode.

30 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
1k views

addnode in bitcoin.conf doesn't work (Regtest mode)

I'm trying to make to nodes on the same computer communicate. I set up two bitcoin folder with two bitcoin.conf files. bitcoin.conf in the second node is the following: rpcuser=bitcoinrpc ...
user avatar
3 votes
1 answer
5k views

manually signing bitcoin transaction

I'm trying to create a BTC transaction with one input and two outputs, one for change and one OP_RETURN to anchor data. And I'm doing all of that on my regtest backend. The raw unsigned transaction is ...
user avatar
2 votes
0 answers
589 views

bitcoin-cli is not using port specified in config

I have setup a bitcoin node in regtest mode with custom config and datadir. I start bittcoind with command: bitcoind -conf=bitcoin-demo.conf -regtest -datadir="testdatabtc" -daemon My bitcoin-...
user avatar
2 votes
0 answers
157 views

What are segwit extended key prefix bytes for regtest?

I need the HD version bytes for equivalent of ypub, zpub, Ypub, Zpub but on the regtest network. I also need Ypub on testnet. All the rest I can find in slip132, but it is incomplete. thanks.
user avatar
  • 181
2 votes
0 answers
180 views

Blockchain explorer for regtest mode

I'm looking for a Bitcoin blockchain explorer that will work in "regtest mode", mostly for demo proposes. Any suggestions?
user avatar
  • 121
2 votes
2 answers
385 views

Double spending on testnet or regtest?

I'm currently doing a research on bitcoin and I would like to know if there is anyway to replicate double spending in the testnet or regtest? If isn't possible is there any other type of "attacks" ...
user avatar
  • 21
1 vote
0 answers
42 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 ...
user avatar
1 vote
0 answers
88 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 ...
user avatar
  • 11
1 vote
0 answers
58 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(...
user avatar
  • 11
1 vote
0 answers
55 views

how do I mark coins spent in invalid blocks as unspent?

I was just testing bitcoin (v17) in regtest mode with the local, built-in wallet. If I send money to an address (I don't own), generate 1, and then invalidate that block, the local wallet does not ...
user avatar
  • 179
1 vote
0 answers
208 views

Error mandatory-script-verify-flag-failed (Signature is found in scriptCode)

I found a few questions with the specific error, but couldn't find also the appropriate answer. So, here I am. I am working on regtest in a Python library that create transactions and then use JSON-...
user avatar
  • 129
1 vote
0 answers
892 views

How to get all transactions of address with bitcoin api in node.js?

I want to find all transactions of address in regtest. How it is possible to do? I have this solution, but I get response (201) before for ends. I think it's bitcoin timeout false. bitcoin....
user avatar
  • 111
1 vote
0 answers
314 views

getpeerinfo peer port number

Working on regtest (Bitcoin Core 0.15.1) I've realized that some peers are identified just by ip instead of by ip:port when querying bitcoin-cli getpeerinfo. I've noticed that when it happens the ...
user avatar
  • 2,712
1 vote
0 answers
585 views

"Error: Invalid RPC method" when i try to create block in regtest mode

I use Ubuntu. After i run bitcoind -regtest -daemon I tried to create blocks by running command: bitcoin-cli -regtest generate 101 And it returned error like this: Error: Invalid RPC method ...
user avatar
  • 11
1 vote
0 answers
289 views

How to create walletconflicts in regtest mode?

I play with Bitcoin Core 0.13 in regtest mode using python. Now I use bitcoin-testnet-box, I have two nodes connected to each other. I want to create a walletconflict. I want to get gettransaction <...
user avatar
  • 163
1 vote
0 answers
457 views

How to add parameters like "-regtest=1" to a JSON-RPC call in C#?

I'm trying to modify the CoiniumServ codebase ( https://github.com/int6/CoiniumServ ), so it supports bitcoind in regtest mode. I know using bitcoin-cli you need to add -regtest to the bitcoin-cli ...
user avatar
1 vote
0 answers
72 views

Bitcoin disconnects randomly in regtest mode

We are running two bitcoin nodes on two different servers with fixed ip addresses in regtest mode. We have forked version 0.11 of bitcoind and decreased the time between blocks to simulate various ...
user avatar
1 vote
0 answers
113 views

How to allocate hash power to an instance of bitcoind?

I'm not sure if those questions were asked this way before but ...: Is it possible to allocate CPU resources/hash power to an instance of bitcoind run on regtest?If yes, how? Assuming I'm going to ...
user avatar
1 vote
0 answers
203 views

How to fork blockchain intentionally without RPC commands?

Are there any methods other than RPC command invalidateblock <hash> for creating forks? I know that forks occur when two miners (nearly) simultanously each generate a block for a previous common ...
user avatar
0 votes
0 answers
76 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 ...
user avatar
  • 103
0 votes
0 answers
45 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: ...
user avatar
  • 101
0 votes
0 answers
61 views

BitcoinJ Regtest : Error in addWallet & transaction fetch

I am trying bitcoinj for the first time. I tested a simple java program as follows: step 1: I install a Bitcoin Core and run the following bitcoind.exe -regtest -txindex –reindex bitcoin-cli.exe -...
user avatar
0 votes
0 answers
48 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 ...
user avatar
  • 21
0 votes
1 answer
114 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, ...
user avatar
0 votes
0 answers
49 views

Bitcoin multisignature addresses

Suppose we have a multisignature address "abc" with 100 coins in bitcoin regtest network, I want to that 100 coins in 10 slots that is i want spend 10 coins at a particular interval. I tried the ...
user avatar
  • 41
0 votes
0 answers
123 views

Creating lage blocks with multiple transactions in regtest mode?

I want to create blocks with multiple transactions in regtest mode. I want to test propagation with blocks of size 1-2 MB on the dash network. ./dash-cli -regtest -daemon -debug -port=8330 -rpcport=...
user avatar
0 votes
0 answers
79 views

How it is possible to wrap with BitcoinJ a Bitcoin Core RPC interface and drives regtest mode

Despite the fact that I have already create an address in regtest network which has Bitcoins I can not import correctly this address to my BitcoinJ app in order to execute certain functions(OP_CODE tx,...
user avatar
  • 359
0 votes
0 answers
97 views

How to send an invalid transaction for testing purposes?

How could I send an invalid transaction—for testing purposes, such as with testnet or regtest? For example, I would like to to try to double-spend, spend non existent coins, etc.
user avatar
  • 4,307
0 votes
0 answers
108 views

Leakage of information about selfish mining - what message is responsible?

A few weeks back I had asked a question about how honest nodes could detect a Selfish Mine Attack and if there were mechanisms that would disclose selfish mining. In a very first step: I've slightly ...
user avatar
0 votes
0 answers
119 views

Building bitcoind from modified "selfish" code - possible? how?

For a long time I've been trying to find out ways for running a "selfish mine" algorithm on bitcoind's regtest mode. Now I'm wondering if my plan is feasible, at all!? So I'll just outline my ...
user avatar