AllCode recently has developed a few Cryptocurrency Exchanges in Ruby on Rails. These exchanges are tricky to build, test, and operate.
In the process of building these exchanges, we’ve had to interact with Bitcoin Core, Ethereum, and NEO. These networks can be a bit unwieldy to develop on because the blockchains are inherently slow. In order to speed up development, we recommend running local versions or private versions of each of the blockchains.
For Bitcoin Core, the test network can be even slower than the production blockchain to write data. On average, blocks are written every 10 minutes, which means that you can wait a long time to have your transaction processed. When doing development on Bitcoin Core, you will want to spin up a dockerized node running Bitcoin Core in Regtest mode. Regtest is a mode where your Bitcoin core node does not have to communicate with other nodes, which makes it much faster to develop on.
Regtest mode is ideal for development, but when it comes to deploying to your test environment, you’ll want other people to deposit and transfer BTC without doing command line operations. You’ll want to leverage the Bitcoin Test network. To get started with the Bitcoin Test Network, you’ll need to use a wallet that supports the network. We recommend following the instructions at BitPay to acquire a wallet that can communicate with the test network, and to tap into a faucet to generate test BTC. The same rules apply for Bitcoin Cash. The best faucet that we’ve found for BCH is here, but it can be a little slow.
When it comes to developing on Ethereum, you’re either going to want to run geth as your own private node where you establish the genesis block or leverage Truffle’s TestRPC. We have articles on how to setup your private testnet here. When it comes to the test environment, we’re big fans of the Ropsten test environment. For a testnet wallet, you can leverage either myetherewallet.com or MetaMask.
If you’re developing on NEO, then there isn’t a really good solution for running NEO locally. If you want to use the NEO or CoZ testnet, then you’ll need testnet GAS. In order to acquire testnet GAS, you have to fill out a form with NEO. The form asks for your public key address, which is not your public wallet address nor is it your private key. We actually built out our own private test network on NEO to make development significantly easier. You can find our NEO monitor solution here. Reach out if you need any of our GAS or a wallet.