Check failure on Rosetta-cli (not able to remove genesis block)

Hi, thank you for developing the rosetta-api. While we are testing our implementation against rosetta-cli 0.3.1, we encounter the following error output: Check failed: cannot remove genesis block: unable to sync to 999.

The full output is as follows:

Initialized reconciler with 0 previously seen accounts
2020/07/24 17:13:11 Syncing 0-999
[STATS] Blocks: 1 (Orphaned: 0) Transactions: 0 Operations: 0 Reconciliations: 0 (Inactive: 0)
Check failed: cannot remove genesis block: unable to sync to 999

There are no error output from our implementation side and we are abled to query the view:block 999 and also view:block 1000 successfully.

We would appreciate if you could give us some insights on what the checker is trying to perform at this point.

Thanks in advance.

@fluffy I’m not sure if it’s your problem is exactly the one we were having but maybe it might give you some hints: Traversing by block index problem

tl;dr: our issue was related to having two blocks linked by hash but not by consecutive indexes (and it’s not a bug).

Hey @fluffy!

From what I can tell, @alan.verbner’s suggestion is correct. It appears the block you are returning at index 1 does not link to your genesis BlockIdentifier.

To debug this, I’d run 2 commands: rosetta-cli view:block 0 and rosetta-cli view:block 1. You should see that the ParentBlockIdentifier in block 1 is not equal to the BlockIdentifier in block 0.

Let me know if you have any follow-up questions!

@alan.verbner and @patrick.ogrady, thanks for the suggestions! It appears so that our block 1’s parent is indeed not the genesis block. Probably we will consider skipping the “additional” block, will look into it more. Thanks so much!

1 Like