Bitcoin Forum
May 07, 2024, 04:41:31 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Cant generate regtest coins  (Read 96 times)
throwaway8 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 2


View Profile
October 30, 2021, 09:26:55 PM
Last edit: October 30, 2021, 09:38:36 PM by throwaway8
Merited by LoyceV (2)
 #1

> bitcoind -regtest -daemon
Bitcoin server starting

Start bitcoind in regtest mode to create a private block chain.

## Bitcoin Core 0.10.1 and earlier
bitcoin-cli -regtest setgenerate true 101

## Bitcoin Core 17.1 and earlier
bitcoin-cli -regtest generate 101

## Bitcoin Core 18.0 and later
bitcoin-cli -regtest generatetoaddress 101 $(bitcoin-cli -regtest getnewaddress)



I have 4 wallets that i created in regtest. I load one of them and generate blocks like the developer guide says to but my balance stays 0. I have tried restarting the daemon creating new wallets adding rpcwallet flags etc

as well when i use the command below all utxo's (i think what theyre called lol) have amiunt 0
bitcoin-cli -regtest listunspent
{
    "txid": "73b2dc290280fbddc2015298229430638ddd9b54863969f2cc54a6b4b1fbeffd",
    "vout": 0,
    "address": "bcrt1qujyfn08jlpwcqe0hsmcs327hh73gn7082p24kj",
    "label": "",
    "scriptPubKey": "0014e48899bcf2f85d8065f786f108abd7bfa289f9e7",
    "amount": 0.00000000,
    "confirmations": 6920,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([fa09decd/0'/0'/6']02c261e771faebb13a82863d965b4478ca04bddac42c8d254500e610b87a9a7a3a)#f4cmxk3u",
    "safe": true
  }


1715100091
Hero Member
*
Offline Offline

Posts: 1715100091

View Profile Personal Message (Offline)

Ignore
1715100091
Reply with quote  #2

1715100091
Report to moderator
1715100091
Hero Member
*
Offline Offline

Posts: 1715100091

View Profile Personal Message (Offline)

Ignore
1715100091
Reply with quote  #2

1715100091
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715100091
Hero Member
*
Offline Offline

Posts: 1715100091

View Profile Personal Message (Offline)

Ignore
1715100091
Reply with quote  #2

1715100091
Report to moderator
1715100091
Hero Member
*
Offline Offline

Posts: 1715100091

View Profile Personal Message (Offline)

Ignore
1715100091
Reply with quote  #2

1715100091
Report to moderator
1715100091
Hero Member
*
Offline Offline

Posts: 1715100091

View Profile Personal Message (Offline)

Ignore
1715100091
Reply with quote  #2

1715100091
Report to moderator
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
October 31, 2021, 03:30:14 AM
Merited by HCP (5), LoyceV (2), ABCbits (2), Pmalek (1)
 #2

Have you used RegTest before and been using the same data directory since start?
I'm thinking that you might have already too much blocks that the newest's block rewards received by your new wallets' addresses are all zero.
Note: Regtest's halving interval is much faster than mainnet - 150 compared to 210000 (chainparams.cpp)

   "confirmations": 6920,
That's a lot of confirmations, you may be overdoing the block generation, try to start with fresh data directory.
The fastest way is to delete the "regtest" folder inside your bitcoin data dir.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
throwaway8 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 2


View Profile
October 31, 2021, 03:05:15 PM
 #3

Oh wow I had no idea it was like that, I assumed it acted the way mainnet does. So I just delete the directory and it will start from block 0 again? Definitely too many blocks lol

bitcoin-cli -regtest getblockchaininfo
{
  "chain": "regtest",
  "blocks": 17930,
  "headers": 17930,
  "bestblockhash": "4de81b08c13b92fb7c2be25d31de2602ec478d923270f6a77d3a7348afac7f07",
  "difficulty": 4.656542373906925e-10,
  "time": 1635627965,
  "mediantime": 1635627964,
  "verificationprogress": 1,
  "initialblockdownload": false,
  "chainwork": "0000000000000000000000000000000000000000000000000000000000008c16",
  "size_on_disk": 5379150,
  "pruned": false,
  "softforks": {
    "bip34": {
      "type": "buried",
      "active": true,
      "height": 1
    },
    "bip66": {
      "type": "buried",
      "active": true,
      "height": 1
    },
    "bip65": {
      "type": "buried",
      "active": true,
      "height": 1
    },
    "csv": {
      "type": "buried",
      "active": true,
      "height": 1
    },
    "segwit": {
      "type": "buried",
      "active": true,
      "height": 1
    },
    "testdummy": {
      "type": "bip9",
      "bip9": {
        "status": "active",
        "start_time": 0,
        "timeout": 9223372036854775807,
        "since": 432,
        "min_activation_height": 0
      },
      "height": 432,
      "active": true
    },
    "taproot": {
      "type": "bip9",
      "bip9": {
        "status": "active",
        "start_time": -1,
        "timeout": 9223372036854775807,
        "since": 0,
        "min_activation_height": 0
      },
      "height": 0,
      "active": true
    }
  },
  "warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}

BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7357


Farewell, Leo


View Profile
October 31, 2021, 03:26:32 PM
Merited by nc50lc (1), RickDeckard (1)
 #4

Oh wow I had no idea it was like that, I assumed it acted the way mainnet does.
If you want it to be just like main net, then download the source code and change the following from src/chainparams.cpp.

1. Set the consensus.nSubsidyHalvingInterval equal with 210000. (#L393)
2. Set the consensus.fPowAllowMinDifficultyBlocks to false. (#L405)
3. Set the consensus.fPowNoRetargeting to false. (#L406)

Now, build it, preferably, using a Linux LTS. I assume you're not a newbie in this field and know how to do it; otherwise just say it and we'll show you the steps.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
throwaway8 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 2


View Profile
October 31, 2021, 03:33:48 PM
 #5

Thank you i will do that, i built it from source on linux but still kind of new to programming it.
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
November 01, 2021, 03:35:26 AM
 #6

Oh wow I had no idea it was like that, I assumed it acted the way mainnet does. So I just delete the directory and it will start from block 0 again? Definitely too many blocks lol
-snip-
The halving interval is low because mining should be easy in RegTest, if it's set like in mainnet,
you'll likely wont be able to mine any more blocks using the same hardware after the next difficulty retarget if you generate blocks too fast.
You won't be needing too much coins in Regtest anyway since you can send satoshis instead of whole coins for tests.

From the above, you can skip editing consensus.fPowAllowMinDifficultyBlocks and consensus.fPowNoRetargeting to keep retarget disabled.
Just the consensus.nSubsidyHalvingInterval to copy mainnet's halving.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!