Bitcoin Forum
April 28, 2024, 05:00:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Interesting behaivor of TESTNET difficulty  (Read 335 times)
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 849
Merit: 660



View Profile WWW
September 14, 2023, 04:42:32 AM
Last edit: September 14, 2023, 11:42:30 AM by albert0bsd
Merited by vapourminer (5), LoyceV (4), DdmrDdmr (4), o_e_l_e_o (4), pooya87 (2), ABCbits (1), MusaMohamed (1), vjudeu (1)
 #1

Before to all i want to remember to everybody that TESTNET coins are worthless and never supposed to have any real value.

Quoting: https://en.bitcoin.it/wiki/Testnet

Quote
Testnet coins are separate and distinct from actual bitcoins, and are never supposed to have any value.

The only value that they provide are experience for developers, testers and other people that want to undertand and practice how bitcoin works without spend real bitcoins.

I am doing recently some test on testnet to test features like CPFP, RBF and FullRBF, testing scripts and a long etc...

But something change in the difficult of testnet in the last hours, somebody is mining like 5 blocks per second, so if someone wants to learn how to mining they can try Testnet on this momment.



Quoting againt the bitcoin.it page

Quote
Minimum difficulty of 1.0 on testnet is equal to difficulty of 0.5 on mainnet. This means that the mainnet-equivalent of any testnet difficulty is half the testnet difficulty. In addition, if no block has been found in 20 minutes, the difficulty automatically resets back to the minimum for a single block, after which it returns to its previous value.

According to it, the difficulty is reset to the minimum for a single block and then ir should return to the minimum. But in this ocassion that doesn't happend, i guess that the difficulty just drop to the minimun.

See it on real time on https://mempool.space/testnet

The block mined by a single addres are from 2477663 to 2481082 up to this time, not much just like 4 thousand blocks.

Anyway this is just a little interesting for me because mining is a new topic for me.

Regards

1714323630
Hero Member
*
Offline Offline

Posts: 1714323630

View Profile Personal Message (Offline)

Ignore
1714323630
Reply with quote  #2

1714323630
Report to moderator
1714323630
Hero Member
*
Offline Offline

Posts: 1714323630

View Profile Personal Message (Offline)

Ignore
1714323630
Reply with quote  #2

1714323630
Report to moderator
1714323630
Hero Member
*
Offline Offline

Posts: 1714323630

View Profile Personal Message (Offline)

Ignore
1714323630
Reply with quote  #2

1714323630
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714323630
Hero Member
*
Offline Offline

Posts: 1714323630

View Profile Personal Message (Offline)

Ignore
1714323630
Reply with quote  #2

1714323630
Report to moderator
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16568


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
September 14, 2023, 05:39:51 AM
 #2

But something change in the difficult of testnet in the last hours, somebody is mining like 5 blocks per second, so if someone wants to learn how to mining they can try Testnet on this momment.
Does this mean the difficulty is very low, or, more likely, someone is mining with a massive hash rate? In your screenshot it stopped "2 minutes ago", currently it stopped 5 minutes ago. But there are now 3356 more blocks than when you posted this (less than an hour ago).
If it's someone with very high hash rate, this doesn't mean anyone can try mining testnet now. I tried earlier this year, and even when the difficulty drops to the minimum CPU mining is futile.

█▀▀▀











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











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

Activity: 3766
Merit: 3100


Leave no FUD unchallenged


View Profile
September 14, 2023, 06:08:42 AM
 #3

I'm guessing it's bound to fluctuate quite a bit as more mining activity on testnet will naturally occur at times when people want to test stuff.  If there's no income involved, then there's no competition.  Without that pressure, there's not nearly as much consistency to the hashrate.

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

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

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

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

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

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











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











▄▄▄▄█
MusaMohamed
Sr. Member
****
Offline Offline

Activity: 882
Merit: 290



View Profile
September 14, 2023, 06:21:33 AM
Merited by vapourminer (2)
 #4

Before to all i want to remember to everybody that TESTNET coins are worthless and never supposed to have any real value.
They are worthless because you can not trade Bitcoin Testnet on exchanges but in aspect of Bitcoin miners and developers, they are very valuable.

In aspect of development, Bitcoin testnet help developers a lot.
In aspect of Bitcoin users, it is helpful too because they can practice with Testnet without capital loss.

More interesting, in aspect of Bitcoin miners, they have to spend cost, ASICs to mine Bitcoin testnet that actually has intrinsic value input.

So useless, worthless or valuable, it depends on each person and their practice.

R


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

Activity: 3430
Merit: 10505



View Profile
September 14, 2023, 06:28:58 AM
Merited by DdmrDdmr (4), vapourminer (1), ABCbits (1), Faisal2202 (1), MusaMohamed (1)
 #5

Historically speaking there are times when some miners with a bunch of ASIC miners use their computing power to mine on TestNet. Since the difficulty is low most of the times, their hashrate is more than enough to mine a large number of blocks in a very short time.

To compare, the current difficulty in TestNet is 1024 while on MainNet it is 54,150,142,369,480.
https://blockchair.com/bitcoin/testnet
https://blockchair.com/bitcoin

P.S. regarding the worthlessness of tbtc I have to say in the past there have been some scams involving these coins that gave them kind of a value. Some were big and led to migration to the version 3 TestNet (the current chain) and some were smaller like the last time they were swapping shittokens on token platforms like ethereum with tbtc effectively giving them a value.
This may be the reason for a couple of these hashrate spikes we saw in the past.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Yamane_Keto
Sr. Member
****
Online Online

Activity: 462
Merit: 477



View Profile WWW
September 14, 2023, 06:45:08 AM
Merited by vapourminer (3)
 #6

But something change in the difficult of testnet in the last hours, somebody is mining like 5 blocks per second, so if someone wants to learn how to mining they can try Testnet on this momment.

I don't see what's strange about that, as there is no return from testnet mining. There is rarely competition for block mining, and thus one miner with good hardware can mine several blocks after each other.
testnet will not teach you or enable you to understand Bitcoin mining because of the difference between many things between these two networks, but it is good in development and the evidence for this is its role in the CVE-2018–17144 double spending vulnerability.

https://bitcoinops.org/en/topics/cve-2018-17144/#:~:text=CVE-2018-17144%20was%20a,included%20in%20Bitcoin%20Core%200.14

Quote
the bug was exploited on Bitcoin testnet, causing any nodes still running Bitcoin Core 0.14.x to crash and nodes running 0.15.0 to 0.16.2 to accept a transaction that spent the same funds more than once. When testnet miners managed to produce a valid chain with more proof-of-work than the invalid chain, those non-upgraded nodes attempted to switch to the new chain but were unable to fully un-spend a double-spent input.

.BEST.CHANGE..███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
LoyceMobile
Hero Member
*****
Offline Offline

Activity: 1653
Merit: 686


LoyceV on the road. Or couch.


View Profile WWW
September 14, 2023, 06:53:30 AM
 #7

To compare, the current difficulty in TestNet is 1024 while on MainNet it is 54,150,142,369,480.
A while ago, I saw a computation of the energy cost to mine 1 testnet coin, and it was quite high. I guess the drop in difficulty is related to the number of coins in circulation being very close to 21 million, and the block reward is 300 times lower than Bitcoin mainnet. This also shows a 51% attack is easy, it looks more like a 99% attack.

█▀▀▀











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











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

Activity: 672
Merit: 2033


Crypto Swap Exchange


View Profile WWW
September 14, 2023, 07:39:18 AM
 #8

A while ago, I saw a computation of the energy cost to mine 1 testnet coin, and it was quite high. I guess the drop in difficulty is related to the number of coins in circulation being very close to 21 million, and the block reward is 300 times lower than Bitcoin mainnet. This also shows a 51% attack is easy, it looks more like a 99% attack.

I guess that the cost of mining a testnet coin varies very quickly depending on when you make your calculations. The reward is lower than with mainnet but :

if no block has been found in 20 minutes, the difficulty automatically resets back to the minimum for a single block, after which it returns to its previous value.

If 20 minutes go by without a block being found, the difficulty returns to a minimum and very little energy and hashrate will be needed to find a block. I imagine that by selecting moments when the difficulty is at a minimum, you can accumulate the rewards quickly and therefore the energy cost of a testnet coin remains relatively low, doesn't it?

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
September 14, 2023, 07:52:21 AM
Merited by vapourminer (5), pooya87 (4), LoyceV (4), DdmrDdmr (4), n0nce (4), MusaMohamed (1)
 #9

The issue here is that the block of difficulty 1 after a 20 minute period was the last block in difficulty epoch.

Here is the point the issue began:

Block 2,477,662: https://mempool.space/testnet/block/00000000000000003c2717761354c34d5cdb12f5f247a1d7d0c5a8174e4b6a11
Difficulty: 147386757.8674816

Block 2,477,663: https://mempool.space/testnet/block/00000000000019477d9b273423ac45be472ac63d88616e5169efe9e3bdb03fb9
Difficulty: 1

As OP notes, what is supposed to happen is that after the block of difficulty 1, testnet should revert back to the previous difficulty. The issue here is that the block with difficulty 1 is the last block in a difficulty epoch (2,477,664/2016 = 1,229 exactly, remembering of course we start at block 0 and not at block 1).

The next difficulty epoch should adjust the difficulty based on the old difficulty of 147386757.8674816, but instead it mistakenly adjusts the difficulty based on the difficulty of the last block, which is 1. So the difficulty for the new epoch is set at 1.

Every block since then has been mined in seconds, and the difficulty is slowly adjusting back upwards to a normal value.
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10505



View Profile
September 14, 2023, 08:18:10 AM
Merited by MusaMohamed (1)
 #10

Every block since then has been mined in seconds, and the difficulty is slowly adjusting back upwards to a normal value.
This "slow" adjustment is the next big problem that prevents the difficulty to go back to "normal" and lets the miners keep mining at low difficulty despite it being on the rise. There is cap on how much it can rise (or fall) in each adjustment because if the time is smaller (or bigger) than a quarter of (or bigger than 4x) 2 weeks in seconds, it will fall down to default 302,400 (or 4,838,400) sec.
In other words in this case, even though it takes them minutes to mine 2016 blocks, the protocol assumes it takes 84 hours and increases the target based on that.

[1] https://github.com/bitcoin/bitcoin/blob/f1a9fd627b1a669c4dfab797da42825230708f2a/src/pow.cpp#L56-L59

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
KiaKia
Sr. Member
****
Offline Offline

Activity: 658
Merit: 386


Play Bitcoin PVP Prediction Game


View Profile WWW
September 14, 2023, 09:50:06 AM
 #11

Testnet is good for learning everything about mining and solving blocks, I remember when I was new to crypto in 2016, someone (female) who is very close to a brother of mine bought a coin worth hundreds of dollars from someone online, as she was trying to sell she couldn't and they knew I was into crypto, I was told to help sold the coins, unfortunately, it's a TestNet coin, she fell victim to a scammer because she couldn't tell the difference between a main net coin and test net coin.

In the crypto space, you are a lost wanderer, until you start learning, this is one of the reasons why crypto looks like a complicated shit to many, there is always more to learn, before you can be qualified as a true crypto investor at least, unless you are ready to pay the price of making grave mistakes. It is well.

Thanks for sharing this Albert0bsd.

 
.BITWINUP.
▄▄████████▄▄
▄████████████████▄
▄██████░░██░░████████▄
██████░░░░░░░░░▀████████
█████████░░████▄░░████████
▐█████████░░████▀░░████████▌
▐█████████░░░░░░░░░░▀██████▌
▐█████████░░███████░░██████▌
███████▀▀░░▀▀▀▀▀▀░░▄██████
██████▄▄░░▄▄░░▄▄▄███████
▀██████▄▄██▄▄████████▀
▀████████████████▀
▀▀████████▀▀
UP OR DOWN?
BITCOIN PVP PREDECTION GAME

▄████████████████████▄
████████████████████████
████████████████████████
███████████░░███████████
█████████░░░░░░█████████
███████░░░░░░░░░░███████
█████░░░░░░░░░░░░░░█████
█████▄░░░░░░░░░░░░▄█████
████████████████████████
████████████████████████
▀████████████████████▀

VS

▄████████████████████▄
████████████████████████
████████████████████████
█████▀░░░░░░░░░░░░▀█████
█████░░░░░░░░░░░░░░█████
███████░░░░░░░░░░███████
█████████░░░░░░█████████
███████████░░███████████
████████████████████████
████████████████████████
▀████████████████████▀
▄███████████████████████▄
██                     ██
██  █████████████████  ██
██  ▀▀  ▄▄▄▄▄▄▄▄▄  ▀▀  ██
█▀  ▄███████████████▄  ▀█
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
███▀▀▀▀▀▀▀███▀███▀▀▀▀▀▀▀███
██  ▄▄▄▄▄ ███ ███ ▄▄▄▄▄  ██
██  █████▄ ▀███▀ ▄█████  ██
██  ███████▄▄▄▄▄███████  ██
██  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ██
███████████████████████████
MONTHLY
JACKPOT
▄▄█████████▄▄
▄█████████████████▄
▄█████▀▀██████████████▄
▄███▀░░▄▄░░▀▀███████████▄
▄███░░▄█████▄░████████████▄
████░░▀██████▀▀░░░░░▀██████
█████▄░░▀▀▀░░▄▄████▄░░█████
▀███████▄▄▄██░▀█████░░████▀
▀███████████▄░░▀▀▀░░▄███▀
▀█████████████▄▄▄█████▀
▀█████████████████▀
▀▀█████████▀▀
██████
██
██
██
██
██
██
██
██
██
██
██████
 
.Play to earn Crypto.
██████
██
██
██
██
██
██
██
██
██
██
██████
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
September 14, 2023, 10:23:27 AM
Merited by vapourminer (1), MusaMohamed (1), albert0bsd (1)
 #12

There is cap on how much it can rise (or fall) in each adjustment because if the time is smaller (or bigger) than a quarter of (or bigger than 4x) 2 weeks in seconds, it will fall down to default 302,400 (or 4,838,400) sec.
You can see this in action right now, with the difficulty increasing by a factor of 4 every 2016 blocks.

Block 2,477,664 - Difficulty 1
Block 2,479,680 - Difficulty 4
Block 2,481,696 - Difficulty 16
Block 2,483,712 - Difficulty 64
Block 2,485,728 - Difficulty 256
Block 2,487,744 - Difficulty 1,024
Block 2,489,760 - Difficulty 4,096
Block 2,491,776 - Difficulty 16,384
Block 2,493,792 - Difficulty 65,536
Block 2,495,808 - Difficulty 262,144

You can already see things slowing down. 4,096 to 16,384 took 21 minutes. The next epoch took 31 minutes. The next took took 1 hour 23 minutes. By the time we hit the next retargeting at block 2,497,824, it will have been somewhere around 3 hours. It will take a further 4 epochs after this one to return to the previous difficulty (provided the hashrate hasn't actually changed).
MusaMohamed
Sr. Member
****
Offline Offline

Activity: 882
Merit: 290



View Profile
September 14, 2023, 01:39:28 PM
Merited by Symmetrick (5), vapourminer (2), albert0bsd (1), vjudeu (1)
 #13

The Block Storms of Bitcoin testnet. Jameson Lopp wrote about that, x4 difficulty and why 1 difficulty is regularly occurs for testnet blocks.

Quote
Due to the unpredictability of hashing power and block times there’s a special rule that allows a block to be mined against the minimum difficulty of 1 (and thus practically instantly on a GPU or ASIC) if there hasn’t been a block for 20 minutes. This rule gets invoked fairly regularly on testnet. In fact, I wrote this script to determine just how often. It turns out that nearly 200,000 blocks (nearly 12% of all blocks) on testnet have been mined at a difficulty of 1 after the 20 minute window has passed since the previous block.

Quote
Unanticipated Interactions

Just like the normal bitcoin network, testnet also recalculates the mining difficulty every 2016 blocks. However, the logic for calculating the new difficulty was written with the assumption that previous blocks were all validated against the same difficulty target calculation and thus it's safe to continue this series of difficulty calculations. This is similar implicit logic to how Bitcoin's 21 million BTC limit is assured - a node never actually sums up all of the UTXO values but rather assumes that every previous block has been validated not to create more than the allowed subsidy, thus the sum must implicitly be below the total limit.

Thus, on testnet when the block before the retarget (block #2015, #4031, etc) is a difficulty 1 block due to the special minimum difficulty rule, the retarget logic for the next block will run based upon the assumption that the difficulty for the entire previous 2015 blocks has been 1! And because a retarget is bounded to never increase the "current difficulty" by more than 4X, the new difficulty will be recalculated to be either 1, 2, 3, or 4.


Quote
We can see that while during a normal day around 144 blocks are minted, if a difficulty reset to the minimum difficulty occurs, it results in over 10,000 blocks being mined! That's a block every 8 seconds!

https://github.com/bitcoin/bitcoin/blob/master/src/pow.cpp#L32
The difficulty will reset to 1 if the time since the last block is more than 20 minutes. There is no stipulation that after a difficulty reset block that the next block must be the normal difficulty; if the next block is more than 20 minutes after the current block, then it can also have a difficulty of 1.

For blocks that are found within 20 minutes of each other, the block's difficulty will be the same as the difficulty of the last block in the difficulty interval whose difficulty was not 1 OR the difficulty of the first block in the difficulty interval. This behavior is defined here: https://github.com/bitcoin/bitcoin/blob/master/src/pow.cpp#L32.

The way that the difficulty retarget works is that, at the beginning of the new difficulty interval, the difficulty of the first block in that interval takes the difficulty of the last block in that interval and multiplies that by the time it took to mine the 2016 blocks and then divides it by the target time. The result is then clamped to be at least 1. Since this is based upon the difficulty of the last block in the previous interval, if that block is difficulty 1, then the next interval will also have a difficulty of one.

So what we are seeing here is that the last block in the interval is found 20 minutes after the block before it so it has a difficulty of one. Because the next block adjust the difficulty and it only looks at the block before it (which is difficulty 1), the difficulty of the next interval is 1. So the next 2016 blocks are mined at difficulty 1, and the difficulty then slowly adjusts up again.

R


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

Activity: 1190
Merit: 465


#SWGT CERTIK Audited


View Profile WWW
September 14, 2023, 04:15:54 PM
Merited by vapourminer (1)
 #14

Historically speaking there are times when some miners with a bunch of ASIC miners use their computing power to mine on TestNet. Since the difficulty is low most of the times, their hashrate is more than enough to mine a large number of blocks in a very short time.

To compare, the current difficulty in TestNet is 1024 while on MainNet it is 54,150,142,369,480.
https://blockchair.com/bitcoin/testnet
https://blockchair.com/bitcoin

P.S. regarding the worthlessness of tbtc I have to say in the past there have been some scams involving these coins that gave them kind of a value. Some were big and led to migration to the version 3 TestNet (the current chain) and some were smaller like the last time they were swapping shittokens on token platforms like ethereum with tbtc effectively giving them a value.
This may be the reason for a couple of these hashrate spikes we saw in the past.
I did not know about such cases, thanks for bringing them in front of us. I mean, the difference is huge and the OP did notice a good thing or behavior in the hash rate of the test tokens. I do know that test tokens have no value because they are just for testing purposes. I did not perform any tests that OP has performed in his post but I performed other types of tests mostly in Alts projects. So I do have some idea what he is talking about.

But did not know that people have started to use the testnet token to trade with ETH and with effectiveness. I mean, that's some next-level scam they were doing. I hope people know that they are buying the test tokens.

This indicates that knowledge is necessary in the era of crypto if you don't get educated then someone will scam you by selling you nothing. I mean you are buying nothing. This feels insane  Tongue

digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
September 14, 2023, 06:44:58 PM
 #15

If someone wants test net coins for development purposes, why do they use the same test coins? They can fork and mine trillions of such coins.

Wait a minute, don't we already have thousands of such useless coins out there and some people even pay for them in hopes of profit?  It's a sad story really.

🖤😏
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
September 15, 2023, 07:38:37 AM
 #16

If someone wants test net coins for development purposes, why do they use the same test coins? They can fork and mine trillions of such coins.
They don't need to. If you want to test something on your own private network, then you can use the regression testing network locally to do so (regtest). Using regtest allows you to establish nodes and connections as you desire, generate blocks at will, and mine all the coins you ever want.

But if you want to test something on an external network which is more similar to mainnet, then you will want to use testnet or signet.
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10505



View Profile
September 15, 2023, 11:08:23 AM
 #17

Wait a minute, don't we already have thousands of such useless coins out there and some people even pay for them in hopes of profit?  It's a sad story really.
Well that's one way to scam people, since bitcoin testnet has "bitcoin" name attached to it, using them could create some scamming opportunities. In fact this is similar to the Ordinals Attack where people who use it instead of using an actual token creation platform are doing it only because it has the name "bitcoin" in it! which helps them pull off their scam easier.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5814


not your keys, not your coins!


View Profile WWW
September 18, 2023, 11:04:22 AM
Merited by LoyceV (4), vapourminer (1), albert0bsd (1)
 #18

On this website, we can view the difficulty adjustments in every epoch of Bitcoin Testnet.

It's interesting to see that this happened before. Actually, it's very regular and happens many times a year. Here is the data from 2020 till today.

Epoch|Start Block|Start Date(utc)|Difficulty|Difficulty Δ(%)|
_________________|_________________|_________________|_________________|_________________|
829|1.671.264|2020-03-27|1|-100|
855|1.723.680|2020-05-11|1|-100|
867|1.747.872|2020-06-06|1|-100|
884|1.782.144|2020-08-02|1|-100|
897|1.808.352|2020-08-25|1|-100|
963|1.941.408|2021-03-23|1|-100|
981|1.977.696|2021-06-02|1|-100|
996|2.007.936|2021-07-08|1|-100|
1025|2.066.400|2021-08-28|1|-100|
1045|2.106.720|2021-12-09|1|-100|
1090|2.197.440|2022-04-27|1|-100|
1166|2.350.656|2022-10-13|1|-100|
1229|2.477.664|2023-09-14|1|-100|

The probability for this phenomenon should be a function of the likeliness of a 20-minute block time at the current difficulty and hash rate, at the end of each epoch.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16568


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
September 18, 2023, 11:17:40 AM
 #19

It's interesting to see that this happened before. Actually, it's very regular and happens many times a year.
That explains why testnet has 3 times more blocks than Bitcoin mainnet, even though testnet3 started years later.

Quote
The probability for this phenomenon should be a function of the likeliness of a 20-minute block time at the current difficulty and hash rate, at the end of each epoch.
Or some large miners could trigger it by turning off their miners right before each difficulty adjustment.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
September 18, 2023, 12:18:06 PM
Last edit: September 18, 2023, 02:51:41 PM by o_e_l_e_o
Merited by vapourminer (1), n0nce (1)
 #20

It's interesting to see that this happened before. Actually, it's very regular and happens many times a year. Here is the data from 2020 till today.
You've missed a lot of occurrences of this from your table.

The difficulty of the new epoch will not necessarily be 1. Rather, the difficulty adjustment for the new epoch will be made from a baseline of 1. So, if the difficulty adjustment was supposed to be -10%, the difficulty would be 0.9, but since 1 is the minimum it will be 1. However, if the difficulty adjustment was supposed to be +10%, then the new difficulty will be 1.1.

You can see this most recently happening just a couple of months ago at epoch 1,212. Epoch 1,211 took 12 days, 2 hours, and 42 minutes. This is 290.7 hours, which would be 1744.2 blocks. 2015/1744.2 = 1.156. And so if you look at the difficulty for epoch 1,212, it is 1 * 1.156 = 1.156.

Since the most the difficulty can change by in one retarget is a factor of 4, then any epoch with a sudden drop in difficulty to between 1 and 4 will be a result of this phenomenon.
Pages: [1] 2 »  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!