Pages:
Author

Topic: Requesting Testnet4 tBTC - page 6. (Read 2713 times)

copper member
Activity: 909
Merit: 2314
September 25, 2024, 10:45:13 AM
#63
Quote
Do you mean you can mine >2h in the future, and then broadcast your own blocks at exactly the right time?
Exactly. There is no way to tell, if you are a CPU miner, or an ASIC miner, if both blocks have minimal difficulty. And then, you can compete.

Quote
You've lost me even more.
If you have a regular signature, then it takes some bytes. If you put some Proof of Work into that, then you can make it smaller. If you check in the Script, if your signature has N bytes or less, then it requires grinding, to meet that condition. And even if all private keys are known, then still: your coins are safe, as long as nobody else will grind it faster.

More than that: you can have "signet-on-testnet", if you just put some signet challenge in your output script, and then require a signature, to contain less than N bytes. Then, signing is required, so nobody will sign those coins without permission, but also, Proof of Work will be needed, so it will be safe in a group of miners, with similar power. So, it will work more or less like Signet, but where you can peg testnet coins in and out, and where you can change signet challenge on the fly.

Quote
If I'd try the same thing now, it wouldn't work.
I guess you could mine a block or two per day, if you run your miner 24/7. As long as there is any ASIC, you can mine a block on top of that, because then, it brings us back to the past, and then, CPU mining is the easiest.

Another thing is that ASIC owners can reorg hundreds of CPU blocks, if they want. They just don't do that for some reason, but they are incentivized to do that, by testnet consensus rules.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 25, 2024, 10:02:30 AM
#62
Quote
The high difficulty was a flaw in testnet already
It is not a flaw. Quite the opposite: pushing time to the future, and CPU-mining blocks is "a flaw". But people decided to not patch it. However, high difficulty is just a consequence of testnet consensus rules.
I didn't really mean it on a technical level, I understand why the difficulty is high. The "flaw" is that other miners can make it very difficult for anyone to get testnet coins. It should be possible to get some testnet coins at any time when you need them, so there's no need to hoard them already.

I have enough testnet4 coins to give them away until the end of days Cheesy
I take it I did this at the right moment back then. If I'd try the same thing now, it wouldn't work.
copper member
Activity: 909
Merit: 2314
September 25, 2024, 09:16:30 AM
#61
Quote
And the remaining blocks go to the high difficulty miners.
Yes, but not all of them. I can get a block or two per day, which is still quite good result, if you consider, that I didn't improve block propagation for blocks, mined after two hours.

Quote
The high difficulty was a flaw in testnet already
It is not a flaw. Quite the opposite: pushing time to the future, and CPU-mining blocks is "a flaw". But people decided to not patch it. However, high difficulty is just a consequence of testnet consensus rules. And the reset from testnet3 into testnet4 was not, because of difficulty. Actually, you can run the same tricks, to CPU-mine blocks in both testnet4 and testnet3. I also mined many CPU blocks in testnet3, so I know, that it works. But obviously, ASICs can rule both networks, as it was in the past. And in testnet4, once per 2016 blocks, it is guaranteed, that a single block will be mined by ASICs, so if you will have only CPUs in testnet4, then they will see, how the chain stops, when they encounter the nearest difficulty adjustment.

Quote
it looks like there's an ASIC mining 20 minutes ahead in the future too
It was inevitable. And it is good, because then, testing timewarp attacks will be easier. And you can always CPU-mine some stale blocks, and test everything you want. More than that: if you try to mine on top of ASICs blocks, then you have quite high chances of getting a block, if ASIC will not manage to do it in time (which is why I can still mine one or two blocks per day).

Quote
What's the point of making it impossible for actual developers to quickly mine some testnet coins?
The test network was never designed to be ruled by CPUs. If it would be, then you would have different challenges, for example: https://mempool.space/testnet4/tx/4289097ca8ad4f63484b8e278fba5789ee2decbe453e988934c7f9dfe9537ed8

Can you see, what I did here?
Code:
$ ./bitcoin-cli -testnet4 decodescript 82013c9f69210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac
{
  "asm": "OP_SIZE 60 OP_LESSTHAN OP_VERIFY 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 OP_CHECKSIG",
  "desc": "raw(82013c9f69210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac)#y8swm8mh",
  "type": "nonstandard",
  "p2sh": "2N794vgkX9KyJqfFPtqB1jTUx7QwvZgurZr",
  "segwit": {
    "asm": "0 14253cba80c4fd4cd7006c31a195874c894cce1d9e01b62bea99d4178289a2ff",
    "desc": "addr(tb1qzsjnew5qcn75e4cqdsc6r9v8fjy5ensancqmv2l2n82p0q5f5tls758l9d)#swj9w4n7",
    "hex": "002014253cba80c4fd4cd7006c31a195874c894cce1d9e01b62bea99d4178289a2ff",
    "address": "tb1qzsjnew5qcn75e4cqdsc6r9v8fjy5ensancqmv2l2n82p0q5f5tls758l9d",
    "type": "witness_v0_scripthash",
    "p2sh-segwit": "2N9LCwnfvYcCCtapo2E3hcTr1SqStuJTuMo"
  }
}
You want CPU-mineable coins? Then try to apply OP_SIZE on DER signatures. If you have 56 bytes, then you have to use half of the generator, as the R-value (which means, that your private key will be known), and s-value of 60 bytes (which means, that the first four bytes would have to be zero, so you would need some mining, to get a valid signature here).

And note one more thing: if you have an ASIC, then you can always beat all CPUs, if you have a competition, based on Proof of Work. Because ASICs can just produce much more work, in much shorter time. So: ASIC domination on testnets is inevitable. But: you can still compete with network propagation, so this is the place, where you should focus.

And one more thing: CPU-mined block, even if mined by ASIC, can still be reorged with a CPU. Just be faster, and produce two blocks in a row. It sometimes happens, if you are lucky.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 25, 2024, 02:43:15 AM
#60
Yes, because https://mempool.space/testnet4/address/tb1q3u8f5899ymkatx69h0n3sw0qpalgwdmrcj80dm is mining 90% blocks. But probably you mined a lot of stale blocks, if you changed the rules, to mine blocks above 2 hours.
And the remaining blocks go to the high difficulty miners. The high difficulty was a flaw in testnet already, now it looks like there's an ASIC mining 20 minutes ahead in the future too. What's the point of making it impossible for actual developers to quickly mine some testnet coins?
copper member
Activity: 944
Merit: 2257
September 25, 2024, 12:26:53 AM
#59
Yes, because https://mempool.space/testnet4/address/tb1q3u8f5899ymkatx69h0n3sw0qpalgwdmrcj80dm is mining 90% blocks. But probably you mined a lot of stale blocks, if you changed the rules, to mine blocks above 2 hours.
newbie
Activity: 3
Merit: 1
September 24, 2024, 11:55:23 PM
#58
The address is tb1pzpkzz0hlqa63cz43j5azw27343ddxy6zcfsr7j50fa9neq8uzkwql5gjpd
I sent you 10.
Thank you very much. We have been running for 26 hours according to the method in this post. So far, no block has been successful.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 24, 2024, 11:32:43 AM
#57
The address is tb1pzpkzz0hlqa63cz43j5azw27343ddxy6zcfsr7j50fa9neq8uzkwql5gjpd
I sent you 10.
newbie
Activity: 3
Merit: 1
September 24, 2024, 09:17:03 AM
#56
I'm sorry to bother you. Do you have any extra tbtc on testnet4? If you have any, can you give us some for testing? We are implementing a lending project for BTC, ord (runes, nft, brc-20) on the l1 network. The address is tb1pzpkzz0hlqa63cz43j5azw27343ddxy6zcfsr7j50fa9neq8uzkwql5gjpd
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 04, 2024, 06:03:08 AM
#55
Weird, since yesterday testnet3 was busy where mempool.space recommend over 500 sat/vB for high priority TX. I wonder if most ordinal/rune created on testnet3 no longer have value.
Just like I've speculated about it on real Bitcoin, I think here the ordinal spam also comes from only one person. That explains why all transactions are in the same style, and start and stop at the same time too.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
September 04, 2024, 05:59:32 AM
#54
I'm not sure what's the best thread, so I'll just post it here: testnet3's mempool is currently empty. For the past months, mempool was full and fees where high. It looks like the "data spam" suddenly stopped, while ASIC miners and "20 minute miners" have halved the block time.

Weird, since yesterday testnet3 was busy where mempool.space recommend over 500 sat/vB for high priority TX. I wonder if most ordinal/rune created on testnet3 no longer have value.

Amazingly, that means testnet3 can now actually be used again for testing Smiley

Although i wonder how easy is it to obtain testnet3 coins now (aside from mining). Tesnet faucet was abused on many occurrence.
newbie
Activity: 26
Merit: 63
September 04, 2024, 05:33:38 AM
#53
Quote
Amazingly, that means testnet3 can now actually be used again for testing
Not only that. It also means, that mining testnet3 is now less profitable, and switching into testnet4 is a better idea. But a short while before that, it was the opposite, when it was not certain, if testnet4 will be reorged or not. Now we know, that those, who consider 00000000000000263393ce5f648afd53676f13d360cc9f264b89351623bf1242 as a valid block, are simply mining coins, which will vanish, after upgraded ASICs will mine an alternative chain, on top of 0000000000000016be66ab39af9f97e1294080c94d0a34cc304e391794a481bd.

In general, we are about to see at least 360 blocks reorg, at the time of writing. I guess it could be 500 blocks reorg, or even 1000 blocks reorg, depending on how many people will mine blocks, when using some older version.
copper member
Activity: 909
Merit: 2314
September 04, 2024, 02:47:34 AM
#52
Quote
testnet3's mempool is currently empty
It's nothing new. There are waves of transactions: sometimes mempools are full, sometimes they are empty. And the cost to fill up the whole 300 MB is quite low.

And note that even if mempool.space shows you a fully filled mempool, then it doesn't mean, that you have to pay that much. For example: if some CPU mining node is just starting up, then it could have an empty mempool, and fetching all of those transactions in P2P way is quite slow process, and if you can see a low block health, then it doesn't always mean censorship: it could mean as well, that this particular miner just turned on its node, and it was turned off recently, for whatever reason. And during that time, you can get your transactions confirmed cheaper, if you send it to that particular node. Which means that again: the default fee estimation is far from being optimal, because it doesn't consider such details.

Quote
that means testnet3 can now actually be used again for testing
You can always mine future blocks, and prioritize your own transactions. And you can pay zero fee in your own transactions, if you are a miner. And even if there is some opportunity cost, then statistically, sometimes blocks are not fully filled, and in a general case, it makes a lot of sense to send and mine your own transactions with a low feerate (also because if you use less than 1000 sat/kvB, then you can "cancel" that easier, in case of mistakes).

Also note, that if you want to mine some coins, then you can do that on signet, too: https://delvingbitcoin.org/t/proof-of-work-based-signet-faucet/937
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 04, 2024, 01:50:31 AM
#51
I'm not sure what's the best thread, so I'll just post it here: testnet3's mempool is currently empty. For the past months, mempool was full and fees where high. It looks like the "data spam" suddenly stopped, while ASIC miners and "20 minute miners" have halved the block time.
Amazingly, that means testnet3 can now actually be used again for testing Smiley
newbie
Activity: 13
Merit: 16
September 02, 2024, 07:17:25 AM
#50
By the way, I think what happened here is that someone tried to CPU mine coins on testnet by setting their clock > 20 minutes into the future.

Such a block would be accepted by all nodes (upgrade or not). But v28 nodes then require the next block to be >10 minutes in the future, whereas before they would allow 1 hour and 50 minutes in the past (which includes the present).

v28.0rc1 contains a fix for the Bitcoin Core miner code (getblocktemplate, etc) that ensures timestamps are adjusted: https://github.com/bitcoin/bitcoin/issues/30614

---

Update: the above invalidateblock / reconsiderblock sequence won't work.

The only way to get an upgraded node to re-check the timewarp rules is:

Code:
bitcoind -tesnet4 -reindex
newbie
Activity: 13
Merit: 16
September 02, 2024, 07:11:27 AM
#49
The timewarp attack mitigation for testnet4 requires the first block of a new difficulty adjustment period to have a timestamp later than that of the last block of the previous period.

Initially there was a 7200 second (2 hour) grace period. This was changed to 600 seconds (10 minutes) two weeks ago: https://github.com/bitcoin/bitcoin/pull/30647 (matching the original Great Consensus Cleanup proposal).

This change is effectively a soft fork on testnet4, but with no activation mechanism.

Anyone who runs the v28.0rc1 release candidate, or a very recent master, will enforce it. Anyone who runs an older version won't enforce it.

My guess is that most miners on testnet4 haven't updated yet. Even if they did that today, the node won't automatically go back to validate old blocks.

If enough miners switch to v28.0(rc...) and call `invalidateblock 00000000000000263393ce5f648afd53676f13d360cc9f264b89351623bf1242 ` followed by `reconsiderblock 00000000000000263393ce5f648afd53676f13d360cc9f264b89351623bf1242 ` they will reject the block at height 42336. This will lead to a one day reorg, or more if it's done later.

An alternative approach would be to change Bitcoin Core to enforce the modified timewarp rule from a certain flag height in the future, but that seems like a lot of complexity for a test network that hasn't even been released yet.

As an aside: the SegWit soft fork did have a mechanism for handling this situation. If a user upgrade their pre-segwit node to a segwit node sometime after activation, it would roll back the chain and check everything again.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 02, 2024, 06:09:42 AM
#48
Because the difference between block 42335 and block 42336 is 11 minutes and 6 seconds. And if you enforce 600 seconds rule, then this ASIC block doesn't meet it. Which means, that if you enable BIP 94, then you land on a shorter chain.
I take it BIP 94 is enabled already by default. I read bip-0094.mediawiki:
Quote
To protect against the time warp attack, the following rule proposed as part of The Great Consensus Cleanup[5] is enforced: "The nTime field of each block whose height, mod 2016, is 0 must be greater than or equal to the nTime field of the immediately prior block minus 600. For the avoidance of doubt, such blocks must still comply with existing Median-Time-Past nTime restrictions."
I won't claim to understand it entirely, but it looks like the problem arose because 21*2016=42336. And that block gets rejected.
But, if that's the default, how come most nodes continue nonetheless? I guess this does explain why mining 20 minutes in the future is no longer possible.

Quote
So, if you want to switch to a longer chain, then upgrade your master, switch MAX_TIMEWARP from 600 to 7200, or use some version, where it is entirely disabled, like probably mempool.space is doing.
I guess this is the path to go. I don't want it to be stuck until someone changes something.

Code:
vi test/functional/mining_basic.py
MAX_TIMEWARP = 1200

src/consensus/consensus.h
static constexpr int64_t MAX_TIMEWARP = 1200;
Update: my testnet4 node is now processing blocks again. Let's see if it mines blocks again Smiley
copper member
Activity: 909
Merit: 2314
September 02, 2024, 05:10:19 AM
#47
Quote
I think the 20 * 60 * 60 code changes did #3 by default, right?
It starts with #3, and then, it rejects your own blocks, which is the same, what happens, if you run out of two hours. By changing from 2 to 20 hours, you just accept more blocks, but in general, if they are CPU-mined, then there is a huge risk, that they will be reorged.

Quote
But then why doesn't it find new blocks anymore after block 42335?
Because the difference between block 42335 and block 42336 is 11 minutes and 6 seconds. And if you enforce 600 seconds rule, then this ASIC block doesn't meet it. Which means, that if you enable BIP 94, then you land on a shorter chain.

So: do you want to disable 600 seconds rule?
Quote
Code:
if (consensusParams.enforce_BIP94) {
    // Height of block to be mined.
    const int height{pindexPrev->nHeight + 1};
    if (height % consensusParams.DifficultyAdjustmentInterval() == 0) {
        nNewTime = std::max(nNewTime, pindexPrev->GetBlockTime() - MAX_TIMEWARP);
    }
}
I really wonder, if ASICs will follow that kind of timewarp fixes. Because there is a risk, that people may ignore 600 seconds rule, or you may have some nodes, with MAX_TIMEWARP of 600 seconds, and some with 7200 seconds, and then there will be some competing chains.

For now, I simply use some version without those timewarp protections. I don't know, what will happen after block 42335: maybe the current chain will be reorged, or maybe it will be grandfathered in, and the activation of all BIP 94 rules will come later. Who knows, time will tell.

So, if you want to switch to a longer chain, then upgrade your master, switch MAX_TIMEWARP from 600 to 7200, or use some version, where it is entirely disabled, like probably mempool.space is doing.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 02, 2024, 04:26:50 AM
#46
I started my default bitcoin-qt on testnet4:
Code:
Number of blocks left: Unknown. Syncying Headers (42335, 99.8%)...
I know it's testnet, but doesn't this mean it's broken? Could it be the code changes that removed the "block storm" created something unexpected, that makes standard nodes unable to keep syncing?

Quote
Shouldn't it reorg on it's own to follow the longest chain?
Maybe some developers are testing "7200 seconds rule" or "600 seconds rule"? If CPU miners push the time too much into the future, then after Median Time Past (MTP), miners have no chance to adjust the time backwards, and put the current time in their blocks. Which can cause some additional inflation, if it happens around difficulty adjustment.
I've been wondering for a while what happens if most Bitcoin miners adjust their clock to the future.

Quote
it has someone who mines a block 2 hours ahead all the time
Yes, I put "20 minutes and 1 second" for a reason: in this case, you can mine six CPU blocks for two hours. However, if you put instead "1 hour 59 minutes 59 seconds", or something like that, then your single CPU block will knock every CPU miner out, for the next 20 minutes. But: there is a catch: if someone will mine more CPU blocks in a row, then that single block will be reorged.
Doesn't that mean you'd have to adjust your code to mine 2 blocks starting from the previous block, instead of mining on top of the 1:59:59-ahead block? So it requires more code changes, right?

Quote
So, it is a game of CPU-mined chain reorgs. But: winning the game, and picking an optimal strategy, is a big challenge. Because the default implementation is definitely not the best one, and can be beaten by someone, who will write a better code, specifically for testnets.
Do I get it right that this only works on testnet because of the difficulty drop after 20 minutes? Wouldn't it be better to change the default rules, let's say the difficulty drops only after 3 hours, so normal mining isn't affected? Or reduce the time difference between miners to no more than 10 minutes instead of 2 hours?

Quote
Edit: One more thing: any CPU miners can be easily stopped by ASIC miners, if they will simply change their strategy, to fully fill the queue of easy blocks, and only then mine their ASIC blocks on top of that. The fact, that CPU miners still have some chances, is a signal, that ASIC miners are just sticking with unmodified Bitcoin Core, and are not trying to get the maximum number of blocks, out of it. Or: maybe they don't have enough knowledge, to write a better code, and they don't want to risk mining invalid ASIC blocks.
Thanks for the explanation. I'm still amazed people have been burning ASIC power on testnet for years.

@garlonicon's signature: I still can't wrap my head around dealing with private keys in descriptor wallets, so brainwallets aren't really an option at the moment. I'll give it a try when Electrum supports testnet4.



It turns out I did mine block 42335. How come multiple nodes can't get passed this block?
copper member
Activity: 944
Merit: 2257
September 02, 2024, 03:47:35 AM
#45
Quote
it has someone who mines a block 2 hours ahead all the time
Yes, I put "20 minutes and 1 second" for a reason: in this case, you can mine six CPU blocks for two hours. However, if you put instead "1 hour 59 minutes 59 seconds", or something like that, then your single CPU block will knock every CPU miner out, for the next 20 minutes. But: there is a catch: if someone will mine more CPU blocks in a row, then that single block will be reorged. So, if some CPU miner will send one block with "20 minutes 1 second", and second block with "40 minutes 2 seconds", then those two blocks will knock out that "1 hour 59 minutes 59 seconds" block.

So, it is a game of CPU-mined chain reorgs. But: winning the game, and picking an optimal strategy, is a big challenge. Because the default implementation is definitely not the best one, and can be beaten by someone, who will write a better code, specifically for testnets.

Edit: One more thing: any CPU miners can be easily stopped by ASIC miners, if they will simply change their strategy, to fully fill the queue of easy blocks, and only then mine their ASIC blocks on top of that. The fact, that CPU miners still have some chances, is a signal, that ASIC miners are just sticking with unmodified Bitcoin Core, and are not trying to get the maximum number of blocks, out of it. Or: maybe they don't have enough knowledge, to write a better code, and they don't want to risk mining invalid ASIC blocks.
copper member
Activity: 909
Merit: 2314
September 02, 2024, 03:28:18 AM
#44
Quote
Shouldn't it reorg on it's own to follow the longest chain?
Maybe some developers are testing "7200 seconds rule" or "600 seconds rule"? If CPU miners push the time too much into the future, then after Median Time Past (MTP), miners have no chance to adjust the time backwards, and put the current time in their blocks. Which can cause some additional inflation, if it happens around difficulty adjustment.

Quote
So you'll kinda need to "manually" keep track and upload them?
Only those, which are above two hours. And only if you use different settings, than most of the network. Because if 99% nodes would use 20 hours rule, then it would be "de facto standard", and if the heaviest chainwork would be there, then 2 hours rule would simply be lifted. Because there is no centralized source of time: if you have a brand new node, and it tries to download the whole chain history, it doesn't know, if the chain with 2^70 chainwork contains many years of history, or are there just two 2^69 blocks, with today's timestamp (and a lot of smaller ones, to adjust the difficulty).

Quote
I just wanted to feel the fun of mining blocks that I missed out of in 2009
After reaching two hours limit, you have those options:

1. Stick to two hours rule, and stop mining, waiting for some ASIC block, to put the current time.
2. Stick to two hours rule, and still try to mine something, but with ASIC difficulty on CPU, which will likely just burn that power for nothing.
3. Produce a secret, longer chain, and do your testing, knowing that after a while, a new ASIC block will come, and destroy your chain (but in the meantime, you will have a fully working playground, to test non-standard transactions, mining power, or anything else).

Also note, that when there was almost no competition, and we were mining CPU blocks alone, or with a few friends, or when it was "my first node vs my second node" or even "garlonicon's node vs vjudeu's node" then we didn't need to think about all of those consequences, and implications of those rules. But now, when more bitcointalk users will try CPU mining, we will probably encounter more issues, than we found, when we were alone, or with some small, closed and well-coordinated group of friends. We simply didn't put enough CPU power, to test some corner cases, like "more than 51% of blocks, mined by CPUs".

To sum up: it is nice to see some competition: if more bitcointalk users will start mining testnet coins, then maybe some people will get some knowledge, for example "how hard is to CPU-mine things at difficulty one".
Pages:
Jump to: