Bitcoin Forum
May 02, 2024, 06:05:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Setting up a workspace for Bitcoin Core patching for less than $5  (Read 106 times)
NotATether (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 6723


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 01, 2021, 12:11:27 PM
Merited by LoyceV (4), hugeblack (4), ABCbits (2), Heisenberg_Hunter (1)
 #1

There aren't a lot of people here who attempt to write patches or features for Bitcoin Core, so in case anybody's reason is because of the large disk space requirements, I want to share my setup which runs entirely online, making fast IBDs and compile times possible. Also the bitcoin repository is quite large so cloning it will take several minutes on slower network connections (if it finishes at all).

There are two parts to my setup, the IDE and the server running bitcoind.

1. Gitpod (https://gitpod.io)

Gitpod is an online instance of the VScode IDE, which includes a git client and syntax highlighting. If the C/C++ extension is installed it can also provide semantic error checking.

They have a free tier for public Github repositories and give you your own private build environment which is just big enough to install bitcoind dependencies and compile it successfully. However, the disk space is likely shared and so is not sufficient to run bitcoind itself.

2. A VPS provider

We are going to run bitcoind on a VPS by copying the build files using SFTP. By only running on testnet3, we just need to find a box that provides 50GB of disk storage, instead of 350GB for mainnet.

I have my own (more expensive) server for this purpose, but a much cheaper option is BitVPS (https://bitvps.com/) which lets you rent different kinds of servers for a certain number of days. If you check out s-1vcpu-2gb, for example, renting it for 7 days costs only $4.75, after which it gets destroyed, which isn't a problem as you're only using the server for bitcoind testing purposes. 7 days is usually enough time to test code changes and reproduce problems mentioned in pull requests.

For GUI testing, a VNC server can be set up for free, for example by using vnc-server on Red Hat distros.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
1714673111
Hero Member
*
Offline Offline

Posts: 1714673111

View Profile Personal Message (Offline)

Ignore
1714673111
Reply with quote  #2

1714673111
Report to moderator
1714673111
Hero Member
*
Offline Offline

Posts: 1714673111

View Profile Personal Message (Offline)

Ignore
1714673111
Reply with quote  #2

1714673111
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714673111
Hero Member
*
Offline Offline

Posts: 1714673111

View Profile Personal Message (Offline)

Ignore
1714673111
Reply with quote  #2

1714673111
Report to moderator
1714673111
Hero Member
*
Offline Offline

Posts: 1714673111

View Profile Personal Message (Offline)

Ignore
1714673111
Reply with quote  #2

1714673111
Report to moderator
NotATether (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 6723


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 02, 2021, 10:56:45 AM
 #2

I never know there's online editor which offer environment to compile the software. Does it work well with slow connection?

It works well on connections that can sustain 250kbps, lower than that and the IDE starts disconnecting itself which makes you start an annoying cycle of reloading the page.

Isn't it inconvenient if you regularly make patch? On each new rent you need to download whole blockchain and few basic VPS configuration (such as SSH key and few application you need to install).

Mainnet's IBD on a 1gbps colocation VPS is only a few hours so I wouldn't be surprised if testnet can finish in one or two hours.

Regarding the configurations, I actually haven't thought about that, though it shouldn't be too hard to write a bash script to initialize everything you had set up the first time, as well as keeping copies of modified config files alongside it..

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!