Pages:
Author

Topic: Interesting behaivor of TESTNET difficulty (Read 336 times)

member
Activity: 412
Merit: 10
October 07, 2023, 02:08:03 PM
#24
Many websites before launching just launch their testnets, they want to check their website. They also have some allocation for the airdrops, they want users to test their website or their exchanges if they have any problem or issue in their website, they let them tell in the discord or any other form type. So, this didn't have any use as you said, but people can practice through it. For example, if a new user wants to learn trading then he can easily get to the testnet website of any exchange and there he can add liquidity, swap some testnet tokens, and also he can do some borrowing and withdraw tokens there to another place. So, it is better for beginners especially.
jr. member
Activity: 51
Merit: 20
October 07, 2023, 06:17:22 AM
#23
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.
You very well can trade Testnet bitcoins on exchanges, here's one: it's mainly an exchange for obscure altcoins, the original announcement is here: https://bitcointalksearch.org/topic/altquickcom-freebitcoinscom-trade-btc-testnet-altcoins-affiliates-50-5111785   
The price hovers around 3€ I've seen trades for a hundred TBTCs   
I'm surprised more hoarders to do not offer more.
hero member
Activity: 667
Merit: 1529
October 02, 2023, 02:26:23 PM
#22
Quote
Jameson Lopp wrote about that, x4 difficulty and why 1 difficulty is regularly occurs for testnet blocks.
https://blog.lopp.net/the-block-storms-of-bitcoins-testnet/
Quote
functionality for developers to run "signet" test networks that don't use mining at all, but rather use a federation of block signers
Very interesting. That means, signet was supposed to contain signing-only, without even CPU-based mining! Which means, my comparison between federations as a sidechain of Bitcoin is even more relevant than I supposed. Because that means, signet could be deployed on top of testnet3 as well, and just be based on signing blocks to prevent blockstorms! Which means, signet could be just a testnet3 soft fork, that could add signatures into blocks, based on signetchallenge! I wonder, why it was not deployed in that way. Is it only because of blockstorms?

Also, I can imagine testnet3, as a base for any signetchallenge, in that way it could be even a no-fork, where some signet could simply read data from testnet3, and reuse those coins in a more stable environment. Then, everything would be double-confirmed: first by signet signatures, and then by testnet3 Proof of Work. I am curious, how such model would behave in the wild.
hero member
Activity: 882
Merit: 5818
not your keys, not your coins!
September 18, 2023, 10:29:06 AM
#21
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.
You're right; there are more big difficulty drops, I just filtered out the ones that went to exactly 1. Many, many more drops went to < 100 or < 1,000.

We can compare with mainnet here: https://blockchair.com/bitcoin/charts/difficulty
It never really significantly drops.
legendary
Activity: 2268
Merit: 18509
September 18, 2023, 08:18:06 AM
#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.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 18, 2023, 07: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.
hero member
Activity: 882
Merit: 5818
not your keys, not your coins!
September 18, 2023, 07:04:22 AM
#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.
legendary
Activity: 3430
Merit: 10505
September 15, 2023, 07: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.
legendary
Activity: 2268
Merit: 18509
September 15, 2023, 03: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.
copper member
Activity: 1330
Merit: 899
🖤😏
September 14, 2023, 02: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.
sr. member
Activity: 1064
Merit: 437
#SWGT CERTIK Audited
September 14, 2023, 12:15:54 PM
#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
sr. member
Activity: 882
Merit: 290
September 14, 2023, 09:39:28 AM
#13
The Block Storms of Bitcoin testnet. Jameson Lopp wrote about that, x4 difficulty and why 1 difficulty is regularly occurs for testnet blocks.

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.
legendary
Activity: 2268
Merit: 18509
September 14, 2023, 06:23:27 AM
#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).
sr. member
Activity: 658
Merit: 384
September 14, 2023, 05: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.
legendary
Activity: 3430
Merit: 10505
September 14, 2023, 04:18:10 AM
#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
legendary
Activity: 2268
Merit: 18509
September 14, 2023, 03:52:21 AM
#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.
hero member
Activity: 504
Merit: 1065
Crypto Swap Exchange
September 14, 2023, 03: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?
hero member
Activity: 1643
Merit: 683
LoyceV on the road. Or couch.
September 14, 2023, 02: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.
sr. member
Activity: 406
Merit: 443
September 14, 2023, 02:45:08 AM
#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.
legendary
Activity: 3430
Merit: 10505
September 14, 2023, 02:28:58 AM
#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.
Pages:
Jump to: