Author

Topic: Setting up a workspace for Bitcoin Core patching for less than $5 (Read 106 times)

legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Quote
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.

Quote
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..
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
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.
Jump to: