Fetch Blocks with Celo's Node API Implementation

Check out the blog post I wrote that walks through how to fetch blocks from Celo’s Node API implementation!

1 Like

Hi Patrick,

I’ve spent the afternoon trying to get a handle on the overall architecture of Rosetta but I’m still unclear on a number of things.

Is there a diagram anywhere?

Thank you
-Jacob

Welcome to the community, @jacobgadikian!

I put this basic diagram together to explain how a Rosetta implementation could be used by a platform like Coinbase. I purposely kept this very high-level to serve as a lightweight introduction and recommend checking out the docs for a more detailed explanation.

Let me know if you have any other questions based on this!

2 Likes

Hi!
When i try to get block-information from /block endpoint, i receive such error:
{ "code": 0, "message": "&{Blockchain:celo Network:42220 SubNetworkIdentifier:<nil>} is not supported", "retriable": false }

My request:
{ "network_identifier": { "blockchain": "celo", "network": "42220" }, "block_identifier": { "index": 3530 } }

Version of docker image: 0.6.2
Got by running: docker pull us.gcr.io/celo-testnet/rosetta:0.6.2

What i’m doing wrong?

Sorry, already found a solution.
I’ve used network id = 42220, but celo’s rosetta-api currently supports only 62320

Anyway, there is some lack of documentation, i think. It will be nice if you could provide examples of most common queries using not only rosetta-cli, but http api

Thanks for flagging this issue @ralexandr. Only in blockchain can demos become out of date in a month or two :upside_down_face:

I opted to only show examples using the rosetta-cli to avoid overwhelming readers on what is likely their first foray into Rosetta. If you’d like more details on the HTTP requests you can make (not just for Celo but for any implementation of Rosetta) you can check out the Full Reference page on the website (there are some samples there).

We will soon be working on providing more developer resources for people wishing to use Rosetta implementations. Thus far, we’ve focused pretty heavily on Rosetta API implementers.

Sounds great! Thank you! :+1:

@ralexandr you may find our recently released rosetta-bitcoin walkthrough interesting!

Hi, we’ve tried to use last version of Celo’s rosetta api implementation, but noticed that “construction” part has only two endpoints:

  • POST /construction/metadata : Get Transaction Construction Metadata
  • POST /construction/submit : Submit a Signed Transaction

According to the Rosetta Docs, there should be /preprocess, /derive, /payloads, /combine, /parse and /hash. I know that not every endpoint is required, but i think i need, at least, /payloads and /combine to get hash of a signed transaction to pass it to /submit query.

If i’m right, is there any plans to implement missing api-endpoints? Or if there is another way to create signed hash to pass it to /submit query, it will be great it you could provide example of how to do that.

Thank you

:wave: @Coinbox.org

You are correct that Celo’s implementation does not contain a few Construction API endpoints! Celo began work on Rosetta before the release of the Construction API and created their own Airgap Client to construct transactions.

Going forward, implementers will ALWAYS implement the Construction API instead of creating their own construction flow. Sorry for the confusion in this case!

I’ll leave it to the Celo team to comment on when/if they plan to implement the official Construction API. If anyone in the community is interested in taking a stab at this, it shouldn’t be too difficult to build given that the Airgap Client already exists.