coinbase / mesh-specifications

Specification files for the Mesh Blockchain Standard
Apache License 2.0
324 stars 92 forks source link

Support Omitted Blocks #35

Closed patrick-ogrady closed 4 years ago

patrick-ogrady commented 4 years ago

In some blockchains, blocks may be "omitted" at certain indexes (i.e. skipped). In this case, the BlockResponse.Block should be left unpopulated.

It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the PartialBlockIdentifier of a block after an omitted block should reference the last non-omitted block.

Related Post: https://community.rosetta-api.org/t/what-rosetta-expects-as-block-response-when-a-block-was-not-produced/156

Related PRs:

Changes

heimdall-asguard commented 4 years ago

Review Error for frol @ 2020-08-09 05:22:08 UTC User must have write permissions to review

patrick-ogrady commented 4 years ago

What are the expected responses for /block/transaction and /account/balance handlers when the partial block identifier points to an omitted block?

Our tooling will never call either of these with the "identifier" of an omitted block. If it does, you should return an Error indicating "Block Omitted" or something like it (the error message and code are up to you on that one).

Looks like you beat the Coinbase folks to an approval @frol haha.