Gocoin bitcoin software
An open-source Bitcoin solution written in Go language (golang). It can be built for every platform that has a working Go compiler. It uses a proprietary license, though is free to use for non-commercial purposes.
Gocoin's architecture is quite different from the reference implementation (of the satioshi client).
The core of the software is a library that essentially provides the blockchain protocol parser. That includes script parsing, ECDSA signature verification, but also things like address encoding, parsing of canonical signatures or extracting hashes that need to be signed for specific inputs of a given transaction.
It is a relatively big library, that contains many useful bitcoin function.
Inside the package, there is also a blocks persistent storage database (blockdb.go) - it is just a simple plain storage (that can only grow), with an index. It uses snappy compression, allowing to save about 30% of the disk space.
The core library interfaces directly with a UTXO database backed. For this purpose Gocoin uses its own database engine, that has been designed to deal with the specific characteristics of bitcoin's UTXO database.
To speed up the ECDSA operations the secp256k1 library by sipa has been ported to Go. It is used as a default ECDSA library by the online node (client).
The online client is a kind of a server software that is meant to be running all the time.
It handles the network related communication, feeds the core lib with new incoming blockchain data, monitors balances on the wallets' addresses, manages transaction memory pool and the peers database. It also provides an interactive user interface.
The wallet application is responsible for creating private keys (from a seed password) and for signing transactions with them. It can also sign text messages with private keys and decode raw transactions.
Unlike the client, the wallet is not an app that is meant te be running continuously. A user runs it with the requested task - the wallet does the job and exits (back to the command prompt).
Block chain downloader
For optimized initial block chain download, Gocoin has a dedicated application called downloader.
Among other optimizations, the downloader allows a user to skip verification of all the blocks up to a certain one that he defines as trusted. This can speed up the bootstrap process significantly (e.g. from days to hours).
After it finishes downloading of all the blocks, it will exit automatically. In that moment the client should be started and it will keep up with all the new blocks, that will appear in the network.
There is also a set of more and less useful tools (github.com/piotrnar/gocoin/tools) that are an integral part of the Gocoin bitcoin software.
For instance btcversig can verify a validity of a bitcoin signature - it is the substitute of the reference client's verifymessage RPC-API.
The tool type2determ can, at the other hand, calculate Type-2 deterministic addresses, without a need to access the wallet (the private keys).
Gocoin has a several unique features, that distinguish it from the original bitcoin client.
Node / Client
- All the unspent outputs are kept in memory, which makes switching between different wallets, as well as checking a balance of any address, relatively fast (few seconds max).
- Allows a user to limit the upload and download network bandwidth used by the client.
- Can be monitored and controlled through a web interface (from a web browser).
- Works with its own implementation of a cold storage wallet.
- For security reasons, it is supposed to be used with a PC that has never been (and will never be) connected to a network.
- The wallet is deterministic and a seed-password based. As long as you can remember the password, there is no need for any backups.
- Additionally it can import private keys from an existing bitcoin wallet (that comes in the base58 format).
- Has very low hardware requirements. Can be run on i.e. Raspberry Pi
- Can generate Type-2 deterministic keys/addresses
- Supports signing of P2SH multisig transactions.
It is possible to use Gocoin's wallet, without a need to have a running client node.
The client node requires 64-bit platform and at least 4GB of system memory. It also requires a file system that can handle files larger than 4GB.
- No GUI, though the online node has web interface
- No RPC API
- No IPv6
- No UPnP
Gocoin was written by a single person for a private purposes.
The software's first public release was announced in May 2013 on Bitcointalk forum. Ever since then, the software has been actively maintained and further developed, being armed with new features, further optimized and cleaned up from issues.
It happened twice that the client wasn't able to catch up with the block chain, because of the implementation difference of the chain parsing protocol that was causing it to reject a block (transaction) that the reference implementation would accept. In both cases the issue was fixed within single days. The fist case happened in July 2013 and the fix was introduced in version 0.5.7. The second time was in March 2014 - the fix came with release 0.9.3.