Github GitHub - rosetta-dogecoin/rosetta-dogecoin: Dogecoin Rosetta API implemen...
source link: https://github.com/rosetta-dogecoin/rosetta-dogecoin
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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 dependenciesmake test
to run testsmake lint
to lint the source codemake salus
to check for security concernsmake build-local
to build a Docker image from the local contextmake coverage-local
to generate a coverage report
Without Docker
Dependencies
Download and install the latest (current 1.16.2) 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
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK