Bitcoin Forum
September 09, 2024, 09:22:27 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Requesting Testnet4 tBTC  (Read 823 times)
bc1plainview (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
June 07, 2024, 02:30:00 AM
Merited by vjudeu (1), ercewubam (1)
 #1

I am looking to set up testnet4 to begin testing my current project without needing to index all the testnet3 blocks. However, I haven't been able to find a testnet4 faucet yet. Would anyone be willing to share some tBTC with me at the following address?

tb1preru33xeap6v33g0jaypn7x2dsuheyny0n0hh48wany8h8kz98us8l9rv9

Thanks in advance!
vjudeu
Hero Member
*****
Offline Offline

Activity: 837
Merit: 2025



View Profile
June 07, 2024, 05:13:31 AM
Merited by BlackHatCoiner (4), pooya87 (2)
 #2

Quote
However, I haven't been able to find a testnet4 faucet yet.
Why would anyone run a faucet for the network, which is not yet finalized, and can be resetted at any time?

Quote
Would anyone be willing to share some tBTC with me at the following address?
Why you need a faucet, if you can mine a block on your CPU? For example, note how many blocks were mined by wiz: https://mempool.space/testnet4/mining/pool/wiz

One of the latest blocks: https://mempool.space/testnet4/block/0000000012bfe95b1e2fcdccf0f855792a051e2412287869c758491a5cacdbf7

See? Those blocks have just the minimal difficulty. You need only CPU to mine it.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
punk.zink
Hero Member
*****
Offline Offline

Activity: 490
Merit: 502


Rollbit.com - Crypto Futures


View Profile
June 08, 2024, 02:53:32 AM
Merited by pooya87 (2), mocacinno (1)
 #3

I am looking to set up testnet4 to begin testing my current project without needing to index all the testnet3 blocks. However, I haven't been able to find a testnet4 faucet yet. Would anyone be willing to share some tBTC with me at the following address?

It seems that you are not serious enough to find out about the testnet4 faucet site. If you really need testnet4 tBTC, you can get some tBTC from the sites

https://coinfaucet.eu/en/btc-testnet4/
https://mempool.space/testnet4/faucet
https://testnet4.anyone.eu.org/

As explained above, the testnet4 network https://mempool.space/testnet4 is not final, and it may not be this network that will be used later.

R


▀▀▀▀▀▀▀██████▄▄
████████████████
▀▀▀▀█████▀▀▀█████
████████▌███▐████
▄▄▄▄█████▄▄▄█████
████████████████
▄▄▄▄▄▄▄██████▀▀
LLBITCRYPTO
FUTURES
[
1,000x
LEVERAGE
][
.
COMPETITIVE
FEES
][
INSTANT
EXECUTION
]██████
██
██
██
██
██
██
██
██
██
██
██
██████
████████████████████████████████████████████████████████
.
TRADE NOW
.
████████████████████████████████████████████████████████
██████
██
██
██
██
██
██
██
██
██
██
██
██████
ercewubam
Newbie
*
Offline Offline

Activity: 24
Merit: 57


View Profile
June 09, 2024, 02:53:36 PM
Merited by LoyceV (4)
 #4

Test coins are weird: some of them are free, some of them are burned. But it seems you got what you wanted anyway.
bc1plainview (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
June 10, 2024, 05:45:31 AM
 #5

Test coins are weird: some of them are free, some of them are burned. But it seems you got what you wanted anyway.

to whoever did this, thanks a ton!
mocacinno
Legendary
*
Offline Offline

Activity: 3500
Merit: 5086


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
June 10, 2024, 06:02:42 AM
Last edit: June 10, 2024, 06:14:37 AM by mocacinno
Merited by pooya87 (2), vjudeu (1)
 #6


Why you need a faucet, if you can mine a block on your CPU? For example, note how many blocks were mined by wiz: https://mempool.space/testnet4/mining/pool/wiz


Just for your information: no, you can't... The diff is already sky-high (well, not sky-high compared to the main net, but sky-high compared to a cpu-mining setup)... I did the math a couple of weeks ago, and at that time, on average, it would take several hundreds of years to mine a block using your cpu on testnet 4. I have no idear why people would run ASIC's on a testnet, but apparently, they do...

EDIT: here are the current stats from my testnet4 node... A lot lower than a couple weeks ago, but still waaaaaaaaay to high for cpu mining:

Code:
{
  "blocks": 29322,
  "difficulty": 32874715.22081029,
  "networkhashps": 71876496349832.81,
  "pooledtx": 272,
  "chain": "testnet4",
  "warnings": [
    "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
  ]
}


█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
vjudeu
Hero Member
*****
Offline Offline

Activity: 837
Merit: 2025



View Profile
June 10, 2024, 06:45:59 AM
 #7

Quote
Just for your information: no, you can't...
Yes, I can, and I did. It is always a lottery, but I can put something in the next coinbase, if you want. There is always a chance, that it will take some time, because of frequent chain reorganizations, but it is possible.

Quote
The diff is already sky-high
The diff for CPU mining is always one. Obviously, I won't try mining any more difficult blocks on CPUs.

Also see: https://bitcointalk.org/index.php?topic=5468925
Connected topic: https://blog.lopp.net/griefing-bitcoin-testnet/

And note, that on testnet4, some tricks are easier to achieve, than on testnet3 (as long as the basic block reward is still quite high).

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
mocacinno
Legendary
*
Offline Offline

Activity: 3500
Merit: 5086


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
June 10, 2024, 07:23:46 AM
Merited by vjudeu (1)
 #8

I have mined on testnet3 in the past, i'm well aware of the fact that the difficulty can reset to 1. But still, when you cpu mine at a couple dozen Mh/s, you're still vastly outnumbered against a multi Terrahash/second asic that's also mining at the same difficulty.

When i created my testnet4 node container, i tested out the cpuminer that i included into my image for 2 weeks to see if it was stable, and i did not solve a single block... Sure, it might not be impossible, but your odds are really low.

EDIT: truth be told, based on the info i got from my node, it does seem like a lot of people did turn off their ASIC's since i last tested my container.... A couple weeks ago, my node estimated the total network hashrate to be >400Th/s, whilst now it's only >70 Th/s, and i do indeed see blocks being mined at difficulty 1 (which was not the case a couple weeks ago). So yes, maybe at the moment it might be possible to mine a couple testnet4 blocks with your cpu if you're really lucky.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
vjudeu
Hero Member
*****
Offline Offline

Activity: 837
Merit: 2025



View Profile
June 10, 2024, 10:09:12 AM
Merited by LoyceV (6)
 #9

Quote
But still, when you cpu mine at a couple dozen Mh/s, you're still vastly outnumbered against a multi Terrahash/second asic that's also mining at the same difficulty.
It is obvious, that you have to prepare some blocks in advance (for example in testnet3, you have everything filled, up to 2 hours in the future). And then, it is more related to network connections, than to the computing power. You just prepare a block, and you have your block with difficulty one, vs some ASIC block, also with difficulty one. Then, it is not about "who will mine it faster", but rather about "who will propagate it faster".

And of course, ASIC miners rule that world of test chains, so you have to mine your blocks around theirs. But still, it is possible to propagate some block faster, than some ASIC will do, because both players will prepare them in advance, and then the competition is related only to network connections.

Another thing is that ASIC miners potentially could always reorg CPU-mined blocks, but for some reason they don't. It is more profitable to mine a strong, regular block on top of them, because then, you can pick any block time you want. In case of CPU block times, it is more restricted.

Quote
i tested out the cpuminer that i included into my image for 2 weeks to see if it was stable, and i did not solve a single block...
It should mine at least some blocks, but they probably were reorged. If that's the case, then you have to improve the code for your node, not for your mining equipment. For example, to mine testnet blocks easily, I slighttly modified Bitcoin Core, and since then, it works on my CPU.

Quote
So yes, maybe at the moment it might be possible to mine a couple testnet4 blocks with your cpu if you're really lucky.
I repeated the same thing on testnet3, just to be sure. Now, I can mine on CPU in both networks, but testnet4 is more stable. However, mining in testnet3 is still quite good idea, if you want to test block rewards, based on transaction fees.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
garlonicon
Hero Member
*****
Offline Offline

Activity: 849
Merit: 2087


Pawns are the soul of chess


View Profile
June 10, 2024, 04:41:23 PM
 #10

Quote
Just for your information: no, you can't...
Sure, but my node, and some block explorers think otherwise:

https://mempool.space/testnet/address/tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx
https://mempool.space/testnet4/address/tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx

Public key: 0261c2c04c8133b863d9df2ef4082c21074f8849ef86ddf54b13e07d6c828faac6
Legacy address: mpNxT11hJpGH2YhUgQKZm2S1rBnnieWbHr
Segwit address: tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx

Code:
verifymessage "mpNxT11hJpGH2YhUgQKZm2S1rBnnieWbHr" "IORhFfwQl/VK8NU6sQrRxQ6pqoGjHTElUirU+H0lrsyPKE+cOYUZ3TNx3JF8WM69TvhfwZ9iafDk2f6WK1tZZMg=" "June 10, 2024, 04:13:45 PM: I am Garlo Nicon, and I confirm in topic 5499150 on bitcointalk, that I can mine new blocks in testnet3 and testnet4, by using address tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx. All of those blocks have minimal difficulty, equal to one, and were mined on my own CPU."
true

detmm244
Newbie
*
Offline Offline

Activity: 3
Merit: 1


View Profile
June 10, 2024, 06:32:50 PM
Merited by vjudeu (1)
 #11

Quote
Just for your information: no, you can't...
Sure, but my node, and some block explorers think otherwise:

https://mempool.space/testnet/address/tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx
https://mempool.space/testnet4/address/tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx

Public key: 0261c2c04c8133b863d9df2ef4082c21074f8849ef86ddf54b13e07d6c828faac6
Legacy address: mpNxT11hJpGH2YhUgQKZm2S1rBnnieWbHr
Segwit address: tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx

Code:
verifymessage "mpNxT11hJpGH2YhUgQKZm2S1rBnnieWbHr" "IORhFfwQl/VK8NU6sQrRxQ6pqoGjHTElUirU+H0lrsyPKE+cOYUZ3TNx3JF8WM69TvhfwZ9iafDk2f6WK1tZZMg=" "June 10, 2024, 04:13:45 PM: I am Garlo Nicon, and I confirm in topic 5499150 on bitcointalk, that I can mine new blocks in testnet3 and testnet4, by using address tb1qvy67actlsslmvwpjzk9hnx6jf04g5y26sz5crx. All of those blocks have minimal difficulty, equal to one, and were mined on my own CPU."
true

how to mine testnet4 useing cpu
please guide me step by step
how to cerate testnet4 address
i am using to create testnet address
https://www.bitaddress.org/bitaddress.org-v3.3.0-SHA256-dec17c07685e1870960903d8f58090475b25af946fe95a734f88408cef4aa194.html?testnet=true

example
Bitcoin testnet Address
mk4Lmwd1g787twjQYbswdotpYDz9XVD3hH
Private Key
cPLfGZGNgVsYvGfUTP62JdPBzHhL3jjqQ82RobkamETm7WzdgcGE

this testnet mk4Lmwd1g787twjQYbswdotpYDz9XVD3hH adderess also use to testnet4 ??
vjudeu
Hero Member
*****
Offline Offline

Activity: 837
Merit: 2025



View Profile
June 10, 2024, 08:05:18 PM
 #12

Quote
how to mine testnet4 useing cpu
Code:
$ cat mining4.sh
nonce=0
while [ 1 ]
do
  ./bitcoin-cli --testnet4 generatetoaddress 1 mk4Lmwd1g787twjQYbswdotpYDz9XVD3hH 100000000
  echo nonce: $nonce
  ((nonce=nonce+1))
done

Quote
please guide me step by step
1. Download, build and run Bitcoin Core, made by fjahr, from branch 2024-04-testnet-4-fix: https://github.com/fjahr/bitcoin/tree/2024-04-testnet-4-fix
2. Generate some new address (or import it into Bitcoin Core).
3. Start mining. Most likely, your blocks will be ignored, but you will see them in your GUI, if you use Bitcoin Core as a wallet.

Quote
how to cerate testnet4 address
Code:
getnewaddress
mk4Lmwd1g787twjQYbswdotpYDz9XVD3hH
dumpprivkey mk4Lmwd1g787twjQYbswdotpYDz9XVD3hH
cPLfGZGNgVsYvGfUTP62JdPBzHhL3jjqQ82RobkamETm7WzdgcGE

Quote
this testnet mk4Lmwd1g787twjQYbswdotpYDz9XVD3hH adderess also use to testnet4 ??
Yes: https://mempool.space/testnet4/address/mk4Lmwd1g787twjQYbswdotpYDz9XVD3hH

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
garlonicon
Hero Member
*****
Offline Offline

Activity: 849
Merit: 2087


Pawns are the soul of chess


View Profile
August 05, 2024, 05:28:26 AM
 #13

BIP for Testnet4 is now officially merged: https://github.com/bitcoin/bips/blob/master/bip-0094.mediawiki

Edit:
Quote
I did the math a couple of weeks ago, and at that time, on average, it would take several hundreds of years to mine a block using your cpu on testnet 4.
This sentence didn't age well, because now I can produce something around 10% of testnet4 blocks, and all of them are CPU-mined.

LoyceV
Legendary
*
Offline Offline

Activity: 3430
Merit: 17344


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
August 05, 2024, 11:42:06 AM
Merited by garlonicon (1), vjudeu (1)
 #14

This sentence didn't age well, because now I can produce something around 10% of testnet4 blocks, and all of them are CPU-mined.
Can you get me an Eli5 for this? I tried for testnet3 in the past, but didn't mine anything after a week and gave up.

garlonicon
Hero Member
*****
Offline Offline

Activity: 849
Merit: 2087


Pawns are the soul of chess


View Profile
August 05, 2024, 04:53:39 PM
Merited by LoyceV (42)
 #15

My comment in testnet4 pull request: https://github.com/bitcoin/bitcoin/pull/29775#issuecomment-2218329966
My code changes: https://bitcointalk.org/index.php?topic=5496494.msg64205870#msg64205870

How to reproduce:

1. Go to: https://github.com/fjahr/bitcoin/tree/2024-04-testnet-4-fix
2. Execute "git clone" on this repo, or get source code in any other way.
3. Edit "src/chain.h" and "src/node/miner.cpp" exactly as I presented on forum.
4. Build Bitcoin Core from source code.
5. Apply vjudeu's scripts from above in your terminal (they are for Bash on Linux, but you can use "Git Bash for Windows", or modify it slightly, to get it working under Windows).
6. See increasing nonces in your terminal, and observe mined blocks.

Quote
but didn't mine anything after a week and gave up
If you use my method, and your block will have the minimal difficulty, and will be valid, then it is guaranteed to always see it in your Bitcoin Core client, as long as your private keys are properly imported. It may be stale, it may be not accepted by other nodes, but it will be always visible.

Also, if you want to see any block, then you can use a simple shortcut:

1. Open Bitcoin Core.
2. Type "generatetoaddress 1 <address> 100000000".
3. Repeat it several times manually (or use bitcoin-cli). As long as your difficulty is set into the minimum, you should get a block after around 4 billion hashes (or 40 nonces, if you use that line above inside some loop).

Long time ago, when I started, I simply used "generatetoaddress" command manually, and modified my system clock, to set it 20 minutes after the last block. But: if you think about a stable environment, then modifying the source code is easier, because then your node will report the correct time, and you will not see a lot of warnings saying that "please check your system clock, because it may be set incorrectly". Also, if some blocks will already be in the future, you won't be forced to mine blocks with the real difficulty (by the way, once per 2016 blocks, the real difficulty is used anyway; you can of course run your CPUs 24/7, but I usually turn off my miners, and wait for ASICs to do that job).

Also, a good starting point is regtest, or signet with signetchallenge set to OP_TRUE. Then, you will always see some generated blocks.

So, to sum up: you can always mine blocks, on testnet, mainnet, signet, regtest, just everywhere. Command line and "generatetoaddress" is your friend. The hardest part is just setting your system clock 20 minutes after the last block. But if you can cover that, or if your Bitcoin Core can give you future timestamps in your block templates, then you are good to go.

vjudeu
Hero Member
*****
Offline Offline

Activity: 837
Merit: 2025



View Profile
August 05, 2024, 05:27:41 PM
Merited by LoyceV (6)
 #16

Quote
Can you get me an Eli5 for this?
Baby steps: run mainnet in offline mode, without any connections, start from the Genesis Block, and mine a single block, on top of that, by using Bitcoin Core. For example:
Code:
$ ./bitcoin-qt -noconnect
generatetodescriptor 1 "pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)#gn28ywm7" 1000000000
[
  "0000000085c70827e0b4e5590d820d66dce32ef4cdbab06968c6372a45d51fa6"
]
getblock 0000000085c70827e0b4e5590d820d66dce32ef4cdbab06968c6372a45d51fa6
{
  "hash": "0000000085c70827e0b4e5590d820d66dce32ef4cdbab06968c6372a45d51fa6",
  "confirmations": 1,
  "height": 1,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "20bb379fd28f090730ac2d207b92c6e95c69dfa48a8118577edb20e068c9a65d",
  "time": 1722878378,
  "mediantime": 1722878378,
  "nonce": 3526334891,
  "bits": "1d00ffff",
  "difficulty": 1,
  "chainwork": "0000000000000000000000000000000000000000000000000000000200020002",
  "nTx": 1,
  "previousblockhash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
  "strippedsize": 225,
  "size": 225,
  "weight": 900,
  "tx": [
    "20bb379fd28f090730ac2d207b92c6e95c69dfa48a8118577edb20e068c9a65d"
  ]
}
decoderawtransaction 02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff025100ffffffff0200f2052a0100000023210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000
{
  "txid": "20bb379fd28f090730ac2d207b92c6e95c69dfa48a8118577edb20e068c9a65d",
  "hash": "20bb379fd28f090730ac2d207b92c6e95c69dfa48a8118577edb20e068c9a65d",
  "version": 2,
  "size": 144,
  "vsize": 144,
  "weight": 576,
  "locktime": 0,
  "vin": [
    {
      "coinbase": "5100",
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 50.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 OP_CHECKSIG",
        "desc": "pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)#gn28ywm7",
        "hex": "210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
        "type": "pubkey"
      }
    },
    {
      "value": 0.00000000,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_RETURN aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9",
        "desc": "raw(6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9)#cav96mf3",
        "hex": "6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9",
        "type": "nulldata"
      }
    }
  ]
}
If you can get it right, then you can mine blocks with the minimal difficulty, and we can go further. This simple exercise is what I started with, long time ago, when I was curious, how to mine blocks with Bitcoin Core.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3570
Merit: 10843



View Profile
August 06, 2024, 03:46:34 AM
Merited by vjudeu (1)
 #17

If you can get it right, then you can mine blocks with the minimal difficulty, and we can go further. This simple exercise is what I started with, long time ago, when I was curious, how to mine blocks with Bitcoin Core.
Using RegTest is far better since the fixed difficulty there is a lot lower than the minimum difficulty in both MainNet and TestNet. This means you don't want to waste time waiting for your computer to compute millions of hashes to find the next block at difficulty one. On RegTest you'd generate blocks almost immediately.

vjudeu
Hero Member
*****
Offline Offline

Activity: 837
Merit: 2025



View Profile
August 06, 2024, 05:45:43 AM
Merited by pooya87 (4)
 #18

Quote
This means you don't want to waste time waiting for your computer to compute millions of hashes to find the next block at difficulty one.
But that's the whole point! You want to do that, to make sure, that you are ready for testnet3 or testnet4 mining. For example, you want to abandon the idea of using unoptimized Python code for testnet mining. Or: a similar idea of using "sha256sum", running in a bash loop (and creating and destroying the whole ELF stack for computing every single hash).

1. If you mine with regtest difficulty, then you don't know, if you hit correct blocks by accident or not. Then, you can even manually increase nonce, and use "submitblock", to mine anything there.
2. In regtest, you have no difficulty adjustments, so you don't know, how many testnet blocks you could mine, with your current setup. You have to soft-fork that feature, or switch to signet, to learn it.
3. If your tests require more than 15k coins, then you won't do that on regtest. All other networks have 21 million coins. You need to cycle 15k coins, 1400 times, to reach similar outcome.
4. You cannot measure the actual effort of mining blocks with regtest. You can mine with maximum speed of 43,200 blocks per two hours, and increasing your computing power won't change it.

Also, I wonder, if I should create a pull request, which will bring CPU-only mining into Bitcoin Core, as a feature. Then, it could be similar to grinding blocks from bitcoin-util: it will always give you a block, matching the minimal difficulty, on all networks, including mainnet. Because in general, that's how testnet should probably work: you have a mainnet chain, up to the block 789,012, and then you say "I want to mine a block 789,013, with those transactions, and test that scenario". Because if testnet blocks are not stale, then they always have a chance to get some value, and be traded on centralized exchanges.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
garlonicon
Hero Member
*****
Offline Offline

Activity: 849
Merit: 2087


Pawns are the soul of chess


View Profile
August 29, 2024, 07:12:03 AM
 #19

Quote
but it's easier to just wait for testnet3 to be shredded and replaced by the new version by default
New version released: https://groups.google.com/g/bitcoindev/c/EmAOO-Nbmzw

It is release candidate, but it contains fully working testnet4 implementation.

Of course, for CPU-based mining, some modifications are needed, but I think grinding coins with bitcoin-util should still be possible. I will think about some kind of such implementation.

LoyceV
Legendary
*
Offline Offline

Activity: 3430
Merit: 17344


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
August 29, 2024, 07:53:11 AM
Merited by vjudeu (1)
 #20

Test coins are weird: some of them are free
Can you explain this one?


Pages: [1] 2 3 »  All
  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!