Decred's Rosetta Middleware Implementation

We’re happy to announce a new, Rosetta-compatible implementation for Decred named dcrros.

Decred is a community-directed, blockchain-based cryptocurrency focused on becoming a better store of value by gamifying decision making (a.k.a. Governance).

We are strong believers in the power of Free Software, open ecosystems and interoperability between blockchain projects, thus providing a Rosetta implementation seems like a natural step to further advance the goals of the entire crypto community.

dcrros leverages our widely respected dcrd full node implementation (originally written by the Bitcoin btcd authors) and creates a new middleware service that can respond to queries following the Rosetta spec. It tracks and processes the underlying blockchain, creating a high performance cache that is compatible with Rosetta’s Node API and enables teams to quickly integrate Decred on their projects.

To try out dcrros today, you can use the Rosetta-recommended way of using docker to build and run an image that contains all of Decred’s software stack:

$ docker build --tag dcrros:stable
$ docker run --rm -p 9128:9128/tcp dcrros:stable

After syncing up to the blockchain and creating all indexes, you can perform queries by using the rosetta-cli tool:

$ rosetta-cli --server-url http://localhost:9128 view:block 0

And that’s it! No step two required! For additional parameterization available for the docker runs (including running on testnet, persisting changes, etc), please read our doc on running dcrros via docker.

To download and start hacking on dcrros code, please access our github repo. Since this is a Decred project, contributors are welcome to dip their toes into Decred and maybe even become paid contractors.

These are still early days for dcrros, so feedback and contributions are very much welcome!

Thanks for sharing your team’s work, @matheusd!

Developers implementing the Rosetta API should follow your team’s example of checking out source code from GitHub at specific hashes (in your Dockerfile).

For context, this expectation is mentioned in the docs here.

On a different note, thanks for posting an issue in the rosetta-sdk-go about custom loggers. This has been a common request among developers and we should add support for this soon.

/block/transaction endpoint returns

    "code": 6,
    "message": "unimplemented",
    "retriable": false

And /construction/derive returns 404 error :frowning:

Is there any plans to implement that queries?

I’m in the process of implementing them. I’m about halfway through but had to divert to a different task for an upcoming release of Decred software.

I’ll probably get back to it in the next few weeks.

1 Like