|
Title: Regtest for Students? Post by: jdoaktown on January 22, 2025, 04:27:51 PM I seek a wallet that doesn't download the entire BTC blockchain (Blockstream Green for example?) & connect to my local Regtest server.
I teach an introductory hands-on class using Testnet3 BTC. Students bring their smart phones & we send each other testnet BTC (=tBTC). But I run out of tBTC because of transaction fees. If I can teach it using Regtest I could simply generate my own Regtest BTC & never worry about supply again. How to do this, esp. architecturally? Do I need to install some kind of Electrum or Electrum Personal Server? or? (I considered modifying the Blockstream Green git code but I'm not sure that's the best way & have had a lot of trouble getting it to build/link.) Also I'm having trouble finding an Android/Iphone wallet that works w/ Regtest...? Has anyone ever done this? Any advice welcome please. Title: Re: Regtest for Students? Post by: ABCbits on January 23, 2025, 08:41:12 AM Has anyone ever done this? Any advice welcome please. I never done something like this, but how about running your own signet network[1]? Electrum wallet support it since 2021[2] and support many OS, with exception of iOS. You'll also need to run your own Electrum server, where 3 Electrum server implementation support signet[3-5]. Alternatively, run your own testnet network. [1] https://en.bitcoin.it/wiki/Signet#Custom_Signet (https://en.bitcoin.it/wiki/Signet#Custom_Signet) [2] https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES (https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES) [3] https://github.com/spesmilo/electrumx/pull/122 (https://github.com/spesmilo/electrumx/pull/122) [4] https://github.com/romanz/electrs/pull/762 (https://github.com/romanz/electrs/pull/762) [5] https://github.com/cculianu/Fulcrum/pull/108 (https://github.com/cculianu/Fulcrum/pull/108) Title: Re: Regtest for Students? Post by: BlackHatCoiner on January 24, 2025, 01:00:01 PM Instead of messing with regtest, you can use testnet4. Due to a number of reasons, testnet3 is being deprecated and will soon be replaced by testnet4 (https://mempool.space/testnet4), and this is one of the reasons fees have skyrocketed in testnet3. Electrum supports testnet4 since 4.5.6, if you don't want to download the entire chain.
You can ask me for some free coins, if you need. Title: Re: Regtest for Students? Post by: stwenhao on January 24, 2025, 02:03:33 PM Quote But I run out of tBTC because of transaction fees. If you go offline for 20 minutes, and try to generate new coins locally, then you can do that with just a CPU. Which means, that if you have any local network, and all nodes will be connected into that, then you can locally mine some coins, do any tests you want, and then, all of those coins will vanish, when you connect to the real network (but if you treat test coins as worthless, then it is not a problem).Quote How to do this, esp. architecturally? If you have any working setup, then it is all about isolating your client from the real network. Then, you can locally mine anything, with minimal difficulty, and then those coins will really be worthless (because coins from the live network are now traded for real satoshis on some exchanges).Quote Do I need to install some kind of Electrum or Electrum Personal Server? Yes, you can do that. You can just setup a local WiFi network, have some server there, and if students will connect to your server, then they should see the coins you generate on your CPU.Quote Instead of messing with regtest, you can use testnet4. Those coins are also traded on exchanges, so they are no longer worthless. If you need really worthless coins for testing, then you can use regtest, or pick any network, where you have a working setup, and just use minimal difficulty, which is available there. For example: even if you start mainnet, then you can also work with the minimal difficulty, as long as you will ignore the real chain, and start mining on top of the Genesis Block.Title: Re: Regtest for Students? Post by: BlackHatCoiner on January 24, 2025, 03:22:47 PM Those coins are also traded on exchanges, so they are no longer worthless. They are worthless in the sense that I can give him a couple for free to play with, which are far more than enough to do all sorts of testings, even to give some to all of his students to play with. Title: Re: Regtest for Students? Post by: trumu on January 25, 2025, 01:40:04 AM I did the same in the past, regtest works great. You just need one node. It might also be useful to also setup an electrum server on regtest.
With a watch command, you can easily set a shell to mine for a block every X seconds. Regtest is useful in a classroom context because it is really easy to deploy and have a consistent setup. Title: Re: Regtest for Students? Post by: ABCbits on January 25, 2025, 08:36:17 AM Quote Instead of messing with regtest, you can use testnet4. Those coins are also traded on exchanges, so they are no longer worthless. If you need really worthless coins for testing, then you can use regtest, or pick any network, where you have a working setup, and just use minimal difficulty, which is available there. For example: even if you start mainnet, then you can also work with the minimal difficulty, as long as you will ignore the real chain, and start mining on top of the Genesis Block.You can't stop people from exchanging coin on network that available publicly. But while you can your own private network (whether it's based on testnet or mainnet), i have difficulty finding such up-to-date guide. I did the same in the past, regtest works great. You just need one node. It might also be useful to also setup an electrum server on regtest. With a watch command, you can easily set a shell to mine for a block every X seconds. Regtest is useful in a classroom context because it is really easy to deploy and have a consistent setup. Thanks for sharing your experience. But since you say it's also useful in classroom context, can you mention list of Bitcoin wallet for Android/iOS which support regtest? Or do you expect all student bring their own laptop? Or do you expect OP to borrow a computer room? Title: Re: Regtest for Students? Post by: trumu on January 25, 2025, 06:53:16 PM I don't know what is available for regtest on android and IOS.
The electrum source code seems to have you covered, if you are willing to put some effort: https://github.com/spesmilo/electrum/blob/master/contrib/android/Readme.md (https://github.com/spesmilo/electrum/blob/master/contrib/android/Readme.md) |