Questions about testnet

16 replies 289 views
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#1Apr 3, 2017, 06:41 PM
What version of testnet comes with the Bitcoin Knots executable? I'm not on my node computer right now, but I believe there's a bitcoin-test executable in the bins folder that probably runs Knots in testnet mode. My question is whether it defaults to testnet3 or testnet4. I want to switch to testnet4. Do you know the size of testnet4? I'm planning to run it in pruned mode just to try out some transactions and practice with my airgap setup, plus get a feel for how PSBT works without messing with real coins. So I need to sync testnet4 on my laptop for the node and then set up a new testnet wallet on my airgap device. But I'm unsure if it’ll automatically start with testnet3 or 4. From what I've seen, testnet4 is supposed to be faster and better since the chain is smaller. Is there anything else I should keep in mind?
6 Reply Quote Share
byte2019Senior Member
Posts: 270 · Reputation: 1836
#2Apr 3, 2017, 09:08 PM
Both. You can choose, which one you want to run. I guess testnet3, but even if that's the case, then it can be changed into testnet4. https://en.bitcoin.it/wiki/Testnet#Size It just passed 100k blocks. Assuming 4 MB max block size, it would mean up to 400 GB, but realistically, I guess it was something from 10 GB to 20 GB, when I used it last time. But it was a while, since I stopped running testnet4 node, so I will see, when I will run it again. Now, I installed ckpool, and some other stuff, when the default configuration will work fine, then I will start changing it. Well, you don't need a full node, to send some messages to the P2P network. But of course, if you never downloaded testnet4 chain, you can do so, to get a full node experience. Also, if you want to learn basic things, then you can just start from regtest first. Then stop the network activity just after launching it, and check the Genesis Block. Better? Debatable. Smaller? Of course. But it is yet another playground, that you can join, if you want to. Just run it with detached network activity, and make sure, that the Genesis Block is correct. Later, you will probably have next questions anyway.
5 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#3Apr 4, 2017, 01:03 AM
Why debatable? why was tesnet4 released? Isn't it supposed fix some bugs? I have found this: Why You Should Move to Testnet4 https://www.bitgo.com/resources/blog/transition-to-bitcoin-testnet4/ Also, you can specify to launch testnet4 mode with this:
2 Reply Quote Share
byte2019Senior Member
Posts: 270 · Reputation: 1836
#4Apr 4, 2017, 06:53 AM
Unbreaking testnet4 To fix timewarp attacks, which can be combined with blockstorms, and lead to mining a lot of blocks: Griefing Bitcoin's Testnet Yes, but it also introduced new ones, which were unexpected. For example: when CPU miners started mining a lot of blocks, then ASIC difficulty raised, and is now something around 6x bigger, than it should be, which means, that regular ASIC miners can produce one block per hour, or something around that (and by mining ASIC blocks on top of CPU-mined ones, they only make the attack stronger). In Bitcoin Knots, you can do that in exactly the same way, as in Bitcoin Core, because their codebase is very similar, and there are only small changes here and there. They didn't rewrite everything from scratch, if you are familiar with Bitcoin Core, you may notice a lot of similar things.
3 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#5Apr 4, 2017, 02:55 PM
Oh wow, so wtf im supposed to run then, testnet3 or testnet4? Im not sure now. I will definitely not waste hours syncing testnet3's 169GB (btw, why is it so difficult to find the size of the testnet blockchains? I cannot find it on mempool.space), I just want to practice PSBT. And to answer to your other thread reply, I do not want to use bitcoin-cli because it must be a nightmare doing what I easily do with Coin Control GUI using commands, let alone the added complexity of having to save this in a PSBT file.. etc etc. I just don't want to deal with that so I just use the GUI. I just want to be sure what im doing here. For instance, another question I have now is. Let's say I run tesnet3 with assumevalid=1 and use whatever blockhash was manually set by developers there which I assume it's also maintained (updated) for testnet blockchains too. And let's say I also add prune=2000 to only spend 2GB on this. So the bitcoin.conf file ends up like this: testnet=1 assumevalid=1 prune=2000 Hopefully this does not take forever to sync. Well my question is, what happens if I accidentally remove only tesnet=1 from the bitcoin.conf, or this setting gets somehow overriden by something else, and the normal blockchain is launched but it has assumevalid=1 and prune=2000? I just don't want to screw up my blockchain files, because I fully sinced it with assumevalid=0 and prune=0. So I don't want to accidentally launch BTC with these settings without disabling the tesnet setting, and then have my real blockchain files corrupted, or deleted by prune setting or something. In Windows I would just create a shortcut of bitcoin-qt and just add -tesnet=1 -assumevalid=1 -prune=2000 and I would just click on this and have it separated from the normal bitcoin.conf.. but im not sure if that would override bitcoin.conf settings... so perhaps it's better to not even use bitcoin.conf and I would just have a bitcoin-qt shortcut for the real blockchain with -testnet=0 -assumevalid=0 -prune=0 and in bitcoin.conf I would just leave the settings that don't change like dbcache value. Thing is, I don't know how to create shortcuts in linux. I think you have to create a .desktop file, then make it an executable, but not sure about that. Hope it makes sense. Edit: Asked GPT and it says I could create a .desktop file and add this: Exec=/path/to/bitcoin-knots/bin/bitcoin-qt -testnet Then this .desktop file would always launch in tesnet. I would remove the tesnet option on bitcoin.conf because supposedly bitcoin.conf overrides everything. GPT also mentioned that you can create a bitcoin.conf file inside the tesnet3 folder, however, im not sure at all this is true. I think bitcoin.conf resides on the root .bitcoin/ folder, and you cannot create a .bitcoin/testnet/bitcoin.conf file. I think this is AI being inaccurate as usual. Edit2: Okay so apparently command line options override everything: Edit3 : Here on the mempool space site it says: https://mempool.space/testnet So im just going to use testnet4
2 Reply Quote Share
byte2019Senior Member
Posts: 270 · Reputation: 1836
#6Apr 6, 2017, 09:39 PM
Run whatever you want. Who am I, to tell you that? It is similar question to "which altcoin should I use", or "which Operating System should I pick". Nothing is perfect, so just pick something, and change it, if it doesn't fit. Because nobody implemented it yet. Then use regtest. You don't need a full node, if you trust block explorers, or your SPV wallets. Regtest allows you to test everything locally, from the GUI. If you need a GUI for mainnet coins, testnet coins, or any other coins, then you can import them into your local database, and say to your node "just allow me to move them, trust me, I know what I am doing". If you create some UTXO database, where you would have 21 million coins, then the client will trust you, and allow you to make a valid signature from the GUI. Of course, other nodes will reject it, but technically, you can import any UTXO, and force the client to sign you anything from the GUI. It is enabled by default. If you don't want to change it, then simply don't add this line. You don't have to sync the chain, if you don't want to. It is your choice. And if you are going to play with test coins, then there is nothing to lose, if you believe, that they are really worthless. There are different sections for different networks in the configuration file. But as usual, if you mess it up, then it will be only your fault, and nobody else will be responsible for that. But it should be easy to do that correctly, because you have different networks in different square brackets, so you configure them separately. After starting the client, you should instantly go to the right bottom corner, disable network activity, and check, if everything is correct, before going further. You can run the client as a different user. You can move the "bitcoin" directory with all data to a different folder, or backup it first. There are many things, that can be done. Or you can use a different PC, or a virtual machine. And the effort with "being your own bank" simply means, that you should take your time, read a little bit about everything, and walk through all of that step-by-step, to not mess it up, because there is nobody else to blame than yourself, if you will make any mistake. It depends on the distro. But in general, you can always launch a terminal, navigate to a given folder, and run a given executable. If you use GNOME, then yes, something like that. But probably, your package manager already can install the Bitcoin Core client for you. And Bitcoin Knots can be handled in a similar way, then it is all about copy-pasting files, and replacing the binary you want to execute from Core to Knots. There is one configuration file for every network, where you have different sections per each network. Exactly. Which only means, that it will bring more work for software developers, because not only they will have to do the usual stuff, but also fix AI bugs, fight with content scrapers, by putting Proof of Work walls, and things like that.
3 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#7Apr 7, 2017, 02:59 AM
I was wondering, is this info possible to be displayed in the full node console command GUI? This is the default block used for testnet3: https://mempool.space/testnet/block/000000000000000465b1a66c9f386308e8c75acef9201f3f577811da09fc90ad So it goes back to 2024-08-14 05:29:01 (13 months ago) And this is the one for mainnet: https://mempool.space/block/000000000000000000006e926737e6a349f7581525ad36e743dfe5f4bc3abbb7 ‎2025-02-25 12:30:53 (6 months ago) So why does the assumevalid value go further back in time than the mainnet value? Btw, I will be using testnet3, simply because it's what was launched by default. So whenever everyone agrees we need to move to tesnet4 or whatever I will move. Anyway, I assume, it will download the entire blockchain (which I would like to find somewhere the sizes of testnet3 and 4) but with assumevalid=1, it will skip verification of the blocks, up to 000000000000000465b1a66c9f386308e8c75acef9201f3f577811da09fc90ad, meaning that this should be fast, and then it starts verifying blocks for an entire year, I guess this is how it works, just to be sure. And then once it's fully synced, prune=1000 enters in action and deletes all the blocks except the last 1GB? or as it downloads, it deletes the files to guarantee it does not go beyond 1GB of space?
3 Reply Quote Share
byte2019Senior Member
Posts: 270 · Reputation: 1836
#8Apr 7, 2017, 08:50 AM
There are many networks you can pick: Again, read help carefully, it has a lot of information. If you don't want to download any blockchain, then regtest is just for you, because then, you can run everything locally. No, everything is always downloaded. If you assume, that blocks are valid, you simply don't check signatures. But the SHA-256 of the block is still checked, to make sure, that you received, what you requested. And your node still downloads everything, because the UTXO database has to be made out of something: if you won't download old blocks, then how do you want to get information about old, unspent coins? If you use "1", then it is invalid choice, because block hashes have 256 bits. Use "0", don't use it at all, or put the block hash you want. But don't use "1". Of course. But more than that: if you have a full node executable, with the GUI, then you can also get it, just by adding "--help". Because it is manually updated every sometimes. There is no rule, when it should be updated. You can replace it with your own block, mined a day ago, if you want to. Things are removed automatically, as they are checked and downloaded. But: the size of the chain is not all: there is also the size of the UTXO database, and it can take potentially unlimited space, because the number of UTXOs is not restricted by consensus rules. Usually it won't take more than a few GBs, but still: it could grow in the future.
4 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#9Apr 8, 2017, 06:26 AM
For clarification, that "test_bitcoin" executable in bin/daemon directory isn't for launching the node in testnet3 nor testnet4. That's for unit test purposes. You must run bitcoind or bitcoin-qt with --testnet (testnet3) or --testnet4 arg to launch it in testnet. If you're also talking about the shortcut in Windows when you used the installer (set-up) version, It's in testnet3 since the shortcut has --testnet arg when you check its parameters.
3 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#10Apr 8, 2017, 11:20 AM
Well I have been running with assumevalid=1, so this meant basically it has been 0? Is there a way to know if assumevalid is enabled in the console command? getblockchaininfo doesn't show it. Using "--help" on GUI console command returns this: "Method not found (code -32601)" Is there a way to quickly find the blockhash that corresponds to 6 months ago? on mempool.space you can only search by hash or by block height number but not by date I think. With prune=1000 testnet3 has taken like 12GB at 50%. Geez. I guess assumevalid is really not enabled. Im 1 year and 9 weeks behind. So if I could find a way to know the blockhash for a reasonable time, like 6 months ago, I could skip 6 months of validations. But I don't want to manually try to find it in mempool.space, there has to be a more efficient way to search by date. Yeah, I realized that isn't it. And no im in Linux. By shortcut I meant .desktop files. I realized it's better than using the .conf file. You do not want to use the .conf file for anything that has to do with blockchain size (prune, assumevalid) because if you accidentally launch mainnet with prune (you may use prune for testnet) then you screwed up your mainnet files. So better leave bitcoin.conf for performance settings that are shared in mainnet and testnet, like dbcache, or just not use the conf file at all, and configure .desktop files separately for each executable with the settings you want. Everything you can put on bitcoin.conf you can use on shortcut type files (like windows shortcuts or .desktop files or scripts on Linux) by adding - in front of the setting. This way you guarantee no settings ever overlap.
1 Reply Quote Share
byte2019Senior Member
Posts: 270 · Reputation: 1836
#11Apr 8, 2017, 02:22 PM
Yes, check "debug.log" in your "bitcoin" directory. Then maybe it is "-?", "-help", "/?", or something similar. Which binary are you trying to run? Maybe I can download it, and check it. During the first seconds, all block headers are downloaded, so you can use "getblockhash", and compare it with block explorers, SPV wallets, or other sources of truth, that you want to trust. You can check the timestamp of each block header, and you can roughly estimate it, by knowing, that there should be one block per 10 minutes. Not in testnets, where timestamps are often faked. But yes, it can be implemented, maybe nobody just did it. But, why do you want to get a block from a particular date? Just go to the latest ASIC block, and if it has a lot of confirmations, then it probably won't be reorged. Then, you can rename mainnet data directory to something, which was never used, and also use "choosedatadir", to launch testnet in a completely different "bitcoin" folder, that could then have its own "bitcoin.conf" file.
0 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#12Apr 8, 2017, 08:27 PM
In the console, no. In your debug.log, if applied, it should show as "Assuming ancestors of block <hash> have valid signatures". But it wont tell you if the hash you provided is valid (in case of the typo or wrong chain) and instead using the default. Just drop the "--" for it to work in the GUI, use: help Now that you mentioned it (separate test chains), you can minimize those screw-ups if your put the configs under their respective tags. Settings exclusively for mainnet can be put under [main] tag. That way, it wont be applied to testnet 3/4 and regtest. Same applies to testnet 3 [test], testnet4 [testnet4] and regtest [regtest]. Here's one example conf. applicable to v29.0: The "." represents other configs.
3 Reply Quote Share
bit2017Senior Member
Posts: 278 · Reputation: 1886
#13Apr 9, 2017, 02:58 PM
You should use the latest Testnet version for sure, which is v4.  It isn't "broken".  A few people are just testing in ways that disturbs others, but that is the point of Testnet.  The mining should change with a fork Jan 2026.  Then it'll just be flat out mining, similar to Bitcoin, and should be best IMO. Anyone leaving the default as v3 is just being lazy.  Core will drop v3 and services should be long since upgraded... or it could / will be a bit of a cluster fuck (but good for learning.). You should definitely ask services/maintainers to please upgrade... There are a lot of people who don't even know Testnet v4 is out. Upgrade and prepare your project for Mainnet.  The latest Testnet should be the closest to Bitcoin. Also, if you want something in this space and it doesn't exist... build it.  Others may need it too, and it could be a business. I'm assuming the next version of Bitcoin will run v4 with the --testnet command(?) Rather than default to something that is abandoned. (like it is at the moment, cringe) It's tough to update to the latest version when the default command and instruction on https://developer.bitcoin.org/examples/testing.html don't match the current version. The Core update should prevent Bitcoin.org from needing to update for example.
1 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#14Apr 9, 2017, 07:22 PM
There's no ETA but it couldn't be the next major release since the PR containing the change is still in "draft" status. As of now, I can't see it in v30.0 and v31.0's milestones. You can bookmark this to know when it'll be released: https://github.com/bitcoin/bitcoin/pull/31974 And here's where the discussions are: https://github.com/bitcoin/bitcoin/issues/31975
1 Reply Quote Share
bit2017Senior Member
Posts: 278 · Reputation: 1886
#15Apr 9, 2017, 11:42 PM
Great links, thank you. Lol!  Eh... feels like [test] should be test, but whatever.
2 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#16Apr 10, 2017, 01:30 AM
Does anyone have a list of safe faucets to use for testnet3?
6 Reply Quote Share
bit2017Senior Member
Posts: 278 · Reputation: 1886
#17Apr 10, 2017, 01:59 AM
https://altquick.com/faucet/ Get 0.01 TBTC v3 every ten minutes.  (I own this, so I know it works and stays full) You can also check https://en.bitcoin.it/wiki/Testnet#Testnet3_Faucets
2 Reply Quote Share

Related topics