Skip to content

xanimo/rosetta-dogecoin

 
 

Repository files navigation

Dogecoin Rosetta API implementation

ROSETTA-DOGECOIN IS UNDER INITIAL DEVELOPMENT AND IF IT IS NOT BROKEN, THIS IS ACCIDENTAL. DO NOT USE THIS SOFTWARE, YET.

Overview

rosetta-dogecoin provides an implementation of the Rosetta API for Dogecoin in golang, based off the rosetta-bitcoin reference implementation provided by Coinbase. If you haven't heard of the Rosetta API, you can find more information here.

Target features for v1.0

  • Rosetta API implementation (both Data API and Construction API)
  • UTXO cache for all accounts (accessible using /account/balance)

Target Architecture

rosetta-dogecoin plans to use the syncer, storage, parser, and server package from rosetta-sdk-go instead of a new Dogecoin-specific implementation of packages of similar functionality. Below you can find a high-level overview of how everything fits together:

                               +------------------------------------------------------------------+
                               |                                                                  |
                               |                 +--------------------------------------+         |
                               |                 |                                      |         |
                               |                 |                 indexer              |         |
                               |                 |                                      |         |
                               |                 | +--------+                           |         |
                               +-------------------+ pruner <----------+                |         |
                               |                 | +--------+          |                |         |
                         +-----v-----+           |                     |                |         |
                         | dogecoind |           |              +------+--------+       |         |
                         +-----+-----+           |     +--------> block_storage <----+  |         |
                               |                 |     |        +---------------+    |  |         |
                               |                 | +---+----+                        |  |         |
                               +-------------------> syncer |                        |  |         |
                                                 | +---+----+                        |  |         |
                                                 |     |        +--------------+     |  |         |
                                                 |     +--------> coin_storage |     |  |         |
                                                 |              +------^-------+     |  |         |
                                                 |                     |             |  |         |
                                                 +--------------------------------------+         |
                                                                       |             |            |
+-------------------------------------------------------------------------------------------+     |
|                                                                      |             |      |     |
|         +------------------------------------------------------------+             |      |     |
|         |                                                                          |      |     |
|         |                     +---------------------+-----------------------+------+      |     |
|         |                     |                     |                       |             |     |
| +-------+---------+   +-------+---------+   +-------+-------+   +-----------+----------+  |     |
| | account_service |   | network_service |   | block_service |   | construction_service +--------+
| +-----------------+   +-----------------+   +---------------+   +----------------------+  |
|                                                                                           |
|                                         server                                            |
|                                                                                           |
+-------------------------------------------------------------------------------------------+

Development

All Rosetta implementations must be deployable via Docker and support running via either online or offline mode.

However, if you prefer not to use Docker during development in your own fork (e.g for low-end machines), feel free to follow the instructions in the Without Docker section.

With Docker

  • make deps to install dependencies
  • make test to run tests
  • make lint to lint the source code
  • make salus to check for security concerns
  • make build-local to build a Docker image from the local context
  • make coverage-local to generate a coverage report

Without Docker

Dependencies

Download and install the latest (current 1.16.3) version of Go.

https://golang.org/doc/install

Build

go build

Running

MODE=OFFLINE NETWORK=TESTNET PORT=8080 ./rosetta-dogecoin -d

Testing

To validate rosetta-dogecoin, install rosetta-cli and run one of the following commands:

  • rosetta-cli check:data --configuration-file rosetta-cli-conf/testnet/config.json
  • rosetta-cli check:construction --configuration-file rosetta-cli-conf/testnet/config.json
  • rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/config.json

License

This project is available open source under the terms of the Apache 2.0 License.

rosetta-bitcoin is © 2020 Coinbase

About

Dogecoin Rosetta API implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.9%
  • Shell 2.1%
  • Other 2.0%