gonano is a WIP implementation of the Nano cryptocurrency in Go.
This is a work in progress. Do not use this in production environments. All of the exported API's are subject to change and should thus not be considered stable. The same applies to the database format, configuration files and wallet files.
Protocol documentation can be found at: doc/protocol.md.
The address of my motivational back account is: xrb_1tt5p7agt63f3q37151o1yz3k1pfdan7wet9anejzrdqnuz5kgtcqiwwtfm6.
The goals of this project are to:
- Provide an alternative to the existing C++ implementation
- Learn about the protocol
- Document the protocol
- Make Nano more accessible to developers
- Network Protocol
- Documentation (see also: doc/protocol.md)
- Data structures
- Keep alive
- Publish
- Confirm Req
- Confirm ACK
- Bulk Pull
- Bulk Push
- Frontier Req
- Bulk Pull Blocks
- Synchronization
- Pull
- Push
- Pinging
- (Re)broadcasting blocks
- Voting
- Blocks
- Data structures
- Send
- Receive
- Open
- Change
- State
- Proof of Work
- Data structures
- Node
- Persist state to a database
- Blocks
- Address balance
- Pending transactions
- Representatives (voting weight)
- Votes
- Block verification
- Fork resolution
- Block rollback
- RPC interface
- Persist state to a database
- Wallet
- Data structures
- Balance
- Address
- Seed
- Persist state to an encrypted file
- RPC interface
- Data structures
- Tests
Go 1.8 or newer is required.
Run make all
to build everything. Binaries can be found in the 'build'
folder.
Run make test
to run the tests.
This project directly depends on the following packages:
- badger - Fast key-value DB in Go
- cobra - A Commander for modern Go CLI interactions
- blake2b and ed25519 - Go supplementary cryptography libraries
- uint128 128-bit unsigned integer package from CockroachDB
- decimal - Arbitrary-precision fixed-point decimal numbers in go
The above packages are vendored and can be found in the vendor directory. The ed25519 and uint128 packages are placed elsewhere as those had to be customized for gonano.
The source code of this project is licensed under the MIT license. The protocol documentation is licensed under CC BY-SA.