Bitcoin Forum
October 22, 2025, 05:24:20 AM *
News: Latest Bitcoin Core release: 30.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Regtest for Students?  (Read 134 times)
jdoaktown (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 10


View Profile
January 22, 2025, 04:27:51 PM
Merited by pooya87 (2), ABCbits (2), vapourminer (1), stwenhao (1)
 #1

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.
ABCbits
Legendary
*
Offline Offline

Activity: 3402
Merit: 9265



View Profile
January 23, 2025, 08:41:12 AM
Merited by vapourminer (4), pooya87 (4)
 #2

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
[2] https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES
[3] https://github.com/spesmilo/electrumx/pull/122
[4] https://github.com/romanz/electrs/pull/762
[5] https://github.com/cculianu/Fulcrum/pull/108

BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1820
Merit: 8814


Bitcoin is ontological repair


View Profile
January 24, 2025, 01:00:01 PM
Merited by vapourminer (4), pooya87 (4), ABCbits (1), stwenhao (1)
 #3

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, 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.



▄▄▄▄▄▄▄▄▄▄▄░▄▄▄▄▄███▄▄▄▄▄▄▄▄▄███▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄░▄▄▄▄▄▄░░▄▄▄▄▄▄▄▄▄▄▄▄▄▄░▄▄▄▄▄░▄▄▄▄▄▄▄░███████████████████░░████████▄▄░███████████████████████████████
▄█████████████████████████████████████████████████████████████░░██████████▄█████████████████▀▀███████████▀
████████████████████████████████████████████████████████████░░█████████████████████████▀████▄███████▀░░
████▄▄███████████████████████████████▄▄██████████████████████░▄██████████████████████████▄███▄███████░░░░
▀█████████████████████████████████████████████████████▀██████████████████▀▀████████████████▄▄▄█████████▄░░
██████████░▀███▀█████████████▀░▀████▀███████▀█████████████▀████████████████░░▀▀████████░▀█████████████████▄
█████████████▀███████▀▀▀████▀████▀████▀░░▀██████████████████
█████████████████████████████████████████████████████████████████████████████████▀▀▀▀▀▀
███████████████████████████████████████████████▀███▀
.
..100% WELCOME BONUS  NO KYC  UP TO 15% CASHBACK....PLAY NOW...
stwenhao
Hero Member
*****
Offline Offline

Activity: 526
Merit: 1087


View Profile
January 24, 2025, 02:03:33 PM
 #4

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.

Proof of Work puzzle in mainnet and testnet4.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1820
Merit: 8814


Bitcoin is ontological repair


View Profile
January 24, 2025, 03:22:47 PM
 #5

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.



▄▄▄▄▄▄▄▄▄▄▄░▄▄▄▄▄███▄▄▄▄▄▄▄▄▄███▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄░▄▄▄▄▄▄░░▄▄▄▄▄▄▄▄▄▄▄▄▄▄░▄▄▄▄▄░▄▄▄▄▄▄▄░███████████████████░░████████▄▄░███████████████████████████████
▄█████████████████████████████████████████████████████████████░░██████████▄█████████████████▀▀███████████▀
████████████████████████████████████████████████████████████░░█████████████████████████▀████▄███████▀░░
████▄▄███████████████████████████████▄▄██████████████████████░▄██████████████████████████▄███▄███████░░░░
▀█████████████████████████████████████████████████████▀██████████████████▀▀████████████████▄▄▄█████████▄░░
██████████░▀███▀█████████████▀░▀████▀███████▀█████████████▀████████████████░░▀▀████████░▀█████████████████▄
█████████████▀███████▀▀▀████▀████▀████▀░░▀██████████████████
█████████████████████████████████████████████████████████████████████████████████▀▀▀▀▀▀
███████████████████████████████████████████████▀███▀
.
..100% WELCOME BONUS  NO KYC  UP TO 15% CASHBACK....PLAY NOW...
trumu
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 25, 2025, 01:40:04 AM
 #6

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.
ABCbits
Legendary
*
Offline Offline

Activity: 3402
Merit: 9265



View Profile
January 25, 2025, 08:36:17 AM
 #7

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?

trumu
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 25, 2025, 06:53:16 PM
 #8

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

Pages: [1]
  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!