What Rosetta expects as /block response when a block was not produced?

What Rosetta expects as /block response when a block was not produced? If I return an error (404 not found, not retriable) it still keeps retrying and eventually stops

Hi @frolvlad! Can you elaborate on what you mean by “when a block was not produced”? Do you mean if you’re querying block 99999999 when the tip is block 100, or something else?

In NEAR Protocol we can have a situation when after block 10 goes block 12 just because the block-producing node missed its scheduled time for block production and the next block-producing node is not trying to fill the gap and instead of producing block with height 11 it creates a block with height 12 referencing block 10 as its parent. It is absolutely legal situation to have a block 50 to have its parent block with height 40, which means that we had 10 block producers miss their time slot for block production.

Makes total sense @frolvlad!

To support this, we had to make a few changes (all are pending review right now):



Once rosetta-specifications@v1.4.2 is released (in the next day or so), you should return a non-error status on /block and a BlockResponse with no fields populated (i.e. BlockResponse.block is omitted) for blocks that were not produced. You will be able to test this with rosetta-cli@v0.4.1 (once released).

1 Like

All these changes have been released! :rocket:



1 Like