Bitcoin Forum
October 06, 2024, 03:12:06 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: How does a testnet netwok die?  (Read 303 times)
vjudeu
Copper Member
Legendary
*
Offline Offline

Activity: 863
Merit: 2103



View Profile
September 29, 2024, 07:42:51 PM
 #21

Quote
Ordinals developers were testing their projects in testnet 3?
It is good, that Ordinals are in testnets, if that stops them from using mainnet. Testnet coins are worthless, so pushing data is the only thing you can do there. And if you also add non-standardness, then testnets are even better for Ordinals, because then, they can push their data easier, without some mainnet restrictions.

Quote
the disruption was caused by an "Ordinals hater"
No. It was all about timewarp testing. And using testnet3 was quite obvious, because you cannot use signet, if you don't have the private keys for signet challenge. For regtest, nobody would see your tests, so nobody would care. So, what other test network would you pick to test timewarp? As I said, some test cases require mining, and timewarp is one of them.

Quote
and that he tried to stop the testnet to therefore also stop all Ordinals testing
Even if there is a blockstorm, then you can still use a network, if you have a full node. Which is why if you check the latest block on mempool.space, then it can often show you some old block, hundreds of blocks behind, while your full node is up-to-date. Another thing is if there is any blockstorm, and someone requires for example 100 confirmations, then you can get it after around 15-20 seconds.

Also, as you can see, testnet3 blocks still contain a lot of Ordinals, so even if someone's end goal was to stop them, then it failed. Because if you make coins worthless by definition, then pushing data is the only thing, that is left, and testnet3 was used as a data pushing network, long before Ordinals.

Quote
testnet3 is already dead to me
Well, technically, it still works. And it will probably live as an altcoin, at least for a while. I will consider testnet3 "dead", if no peers will be there.

Meanwhile, testnet4 is going to achieve "one ASIC block per difficulty adjustment" state, so testnet4 chain can even "halt" for a while, if ASIC miners will turn their devices off, after they see the current difficulty. Also, testnet4 already had UASF, related to timewarp rules. So, it is alive, but unfinished, and miners may still switch into testnet3 for a while, if testnet4 will for example halt, when 99% blocks will be CPU-mined, and when everyone will wait into the next ASIC block (because consensus rules require at least one ASIC block per difficulty adjustment).

Quote
So the fact that no regular developer with a regular PC can mine on the blockchain makes it dead to me
Well, the code shared by Garlo Nicon, works on both testnet3 and testnet4. And also, testnet3 will never be "stuck", because you can push the whole chain forward, by just having a single CPU miner, while testnet4 will wait for the next ASIC block, because of the new timewarp rules.

Quote
even if you are using an S21s on it, your are still subject to infinite block reorgs caused by the other stupid people
Meanwhile in testnet4:
Code:
getchaintips
...
{
    "height": 47300,
    "hash": "00000000104ace9976e4d88537269fb24dbff9b6d4c24d43a4f5ea765a6c0c6e",
    "branchlen": 114,
    "status": "valid-fork"
},
...
When testnet4 network will be dominated by CPUs, and when 99% blocks will be mined by them, it will be normal to see a lot of reorgs, up to the 2016 block reorg, when some ASIC will come in, and pick the proper chain.

Quote
the irony with testnet3 is that block subsidy is now 0.00152
Test coins are worthless, so they can work as well with zero coins. As long as CPU mining works, you can mine a block or two every day, and do all tests you need. Also, as long as some people would want to test things, block rewards from fees would be sufficient. Another thing, is that eventually, the mainnet will also get there, so if low fees is a problem, then testnet3 is the best network to check, how people would react to any changes in that matter.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
garlonicon
Copper Member
Legendary
*
Offline Offline

Activity: 877
Merit: 2114


Pawns are the soul of chess


View Profile
October 02, 2024, 08:58:23 PM
Last edit: October 03, 2024, 03:48:18 AM by garlonicon
 #22

Quote
Meanwhile, testnet4 is going to achieve "one ASIC block per difficulty adjustment" state, so testnet4 chain can even "halt" for a while, if ASIC miners will turn their devices off, after they see the current difficulty.
Here we are. Testnet4 is now stuck on block number 48383: https://mempool.space/testnet4/block/00000000761cd6bff5e11258943e401e1bb094a8013e810e1d6031ce273a4b7c

Now, we are waiting for ASICs. Which means, that testnet4 may be resistant to timewarp attacks, but on the other hand, it is not resistant to being stuck, if only CPU miners will be there.

Edit: This time, someone pushed us forward: https://mempool.space/testnet4/block/000000000000000926c6550e123e4825ae9210bf79bb1efbc7af0d11e18a8b8a

However, it took around 4 hours (blocks were 2 hours in the future, and then, the actual time was put there). If nothing changes, it will take longer and longer, until the difficulty will start falling.

NotATether
Legendary
*
Offline Offline

Activity: 1750
Merit: 7310


In memory of o_e_l_e_o


View Profile WWW
October 03, 2024, 08:21:41 AM
Merited by vjudeu (1)
 #23

Quote
Meanwhile, testnet4 is going to achieve "one ASIC block per difficulty adjustment" state, so testnet4 chain can even "halt" for a while, if ASIC miners will turn their devices off, after they see the current difficulty.
Here we are. Testnet4 is now stuck on block number 48383: https://mempool.space/testnet4/block/00000000761cd6bff5e11258943e401e1bb094a8013e810e1d6031ce273a4b7c

Now, we are waiting for ASICs. Which means, that testnet4 may be resistant to timewarp attacks, but on the other hand, it is not resistant to being stuck, if only CPU miners will be there.

Edit: This time, someone pushed us forward: https://mempool.space/testnet4/block/000000000000000926c6550e123e4825ae9210bf79bb1efbc7af0d11e18a8b8a

However, it took around 4 hours (blocks were 2 hours in the future, and then, the actual time was put there). If nothing changes, it will take longer and longer, until the difficulty will start falling.

How trivial is it to configure an ASIC to point it to a testnet mining pool? Or set one up that mines testnet4 block templates?

vjudeu
Copper Member
Legendary
*
Offline Offline

Activity: 863
Merit: 2103



View Profile
October 03, 2024, 10:16:15 AM
 #24

Quote
How trivial is it to configure an ASIC to point it to a testnet mining pool?
It is similar to mainnet configuration. You call "getblocktemplate", pass the result of that into your mining software, and then, your miner should submit the final block back into Bitcoin Core, which will propagate it into the whole network.
Code:
$ ./bitcoin-cli -testnet4 getblocktemplate '{"rules":["segwit"]}'
{
  "capabilities": [
    "proposal"
  ],
  "version": 536870912,
  "rules": [
    "csv",
    "!segwit",
    "taproot"
  ],
  "vbavailable": {
  },
  "vbrequired": 0,
  "previousblockhash": "00000000e4638c4e530c074a2703024445b8f3786c2b54f0977e67958f90bfe5",
  "transactions": [
    {
      "data": "02000000027ebb48a39075aaac83c831500dd7a16ff6801e65cc10b8a9df1708c7be99ea2f010000006a47304402201e5e09eca4236c171f40c536e1d3df9a5004386ce23d037405f46922c32eba4e0220346cb04655fbb64f2951691c78c077c7d482252023e9c330679749c15183bec90121035d3c761a498da64b60b19eca302ed3fc7de2cf387c43e28ff53eddfac751dd65fdffffff2aa29fa2fd6b1d97508e1fc4ecd6327c4265e3ecd9864a609e29db4fac70e0a6010000006a473044022042a8a8b5bd0ca68e28b8be39a196eef568a0f5871ad91acaa899b59d5f07251d0220217e86f84e845b491eda7022781f09efe4b3576f876af4c54e7679129146d0f101210265d606112603849e67670012a6a45b1f5d1e1860bbd52a3a0b5f3578f479c203fdffffff020ac203000000000017a9145ba02b1f091846fd46893b93ced478f1172cc63c8782b00b00000000001600145fa28881cb5b0764a6461a2dc849118143ee0d6548bd0000",
      "txid": "24e2fa9f084af2814fb8fe7eb57424c3822f9065df0c58d2efcc6f670bf22e1a",
      "hash": "24e2fa9f084af2814fb8fe7eb57424c3822f9065df0c58d2efcc6f670bf22e1a",
      "depends": [
      ],
      "fee": 5386,
      "sigops": 0,
      "weight": 1468
    },
    {
      "data": "02000000000101eea5f8f694506a9068858d2494748bbcd04c205a1d23dcebf028e41e6a3158a20100000000fdffffff022b0b000000000000160014306a4705f4554444b40bc852663faa0d18c643264ce90000000000001600144685d4c4dc66311f7828cb859e87138035b955fe0247304402203ed33ec2f600e9ff7ef5c2d5b57d21519756f3415f4fcf59858a94ba211b3786022030a76a74c41105e6a73bf50ad19306b4b8413c27b806ee78a7754f43d6efe77201210359ee745c5dde9692df29ef98894b6d87485d49031e24f830a7a5475ff9ae874b00000000",
      "txid": "b122f43a346be288bd2da4c470b798112b5ae5d5c5a090c375a5225917eef4de",
      "hash": "f4be9b8a7bbeed83994886c8985682ae0a09e838f29b23a4b45041d22e84c2e4",
      "depends": [
      ],
      "fee": 141,
      "sigops": 1,
      "weight": 561
    }
  ],
  "coinbaseaux": {
  },
  "coinbasevalue": 5000000000,
  "longpollid": "00000000e4638c4e530c074a2703024445b8f3786c2b54f0977e67958f90bfe5577",
  "target": "00000000ffff0000000000000000000000000000000000000000000000000000",
  "mintime": 1727952073,
  "mutable": [
    "time",
    "transactions",
    "prevblock"
  ],
  "noncerange": "00000000ffffffff",
  "sigoplimit": 80000,
  "sizelimit": 4000000,
  "weightlimit": 4000000,
  "curtime": 1727958156,
  "bits": "1d00ffff",
  "height": 48457,
  "default_witness_commitment": "6a24aa21a9ed5d6ff26aa2222eed24a58f76598eab0740a06f1a36325180bf2f5cc4b96a63d6"
}
And then, if you want to get CPU-mined block, you can just make sure, that Bitcoin Core will give you "1d00ffff". In other case, it is usually too difficult to mine on CPU (for example during difficulty adjustment), and then, it is usually a good idea to turn them off, and let them mine a single block, to push the chain forward.

Quote
Or set one up that mines testnet4 block templates?
If you want to do some CPU mining, then Bitcoin Core is the only thing you need. However, if you want to do ASIC mining instead, then embedding the code for mining into Bitcoin Core is probably not what you want. Because you probably don't want to rebuild Bitcoin Core, every time you improve your mining setup.

So, as you can see above, getblocktemplate command can give you everything you need. Then, the rest of your configuration is hardware-specific. The simplest case is to extract 80-byte block header, pass it to bitcoin-util, and then pass it back. This is what you can do on just a CPU. If you can do that, then you can use the same trick with any external tool, because usually, it just grinds a given 80-byte header (optionally, in case of stratum, it may also require a coinbase transaction, to grind the extra nonce).

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!