How to populate genesis_block_identifier when nodes prune history?

The NetworkStatusResponse requires the genesis_block_identifier. However, our nodes are able to prune history from time to time in a safe way. Since the nodes - per default - don’t keep all the history, nodes might not be able to access the genesis block.

So I’m wondering how we should populate the genesis_block_identifier field?
We could populate it with the id of the oldest block that is available on the node, would this be fine? Nodes however might have a different pruning state, for example: node A might have pruned everything below block X, whereas node B might have pruned everything below block Y.

Many thanks for the help!

Hi Rick!

That is an interesting use case. Are there no full nodes in your network i.e. nodes that can provide entire history?

Hey swapna, thanks for your answer!

We have “special nodes” that store the entire history, however most users don’t run such nodes since of storage constraints. Also these nodes are more special to setup and to maintain.

Our “default nodes” can:

  • start up securely from a recent block instead of having to synchronize from the genesis transaction
  • delete old transaction data below a given block

We are aiming for a more reliable integration and better performance with limiting state storage. Our “default nodes” basically implement this feature Storage Pruning · Rosetta

Different ideas how to solve the issue:

  • populate genesis_block_identifier with a the hash of the oldest available block
  • populate genesis_block_identifier with a string of zeros to “emulate” the genesis milestone (even if it’s not 100% correct)
  • or if genesis_block_identifier wouldn’t be required, don’t populate the field

Thanks for the help!

Hi @rickm !

Apologies for the late reply.

Thank you for the detailed explanation! And I am glad you have already looked through the storgae pruning related info to the Rosetta site! :raised_hands:

After chatting with some folks reached the conclusion that it would be best for the node to return the true genesis block identifier even if it does not store it itself.

Let me know if that helps. Thank you!!

Hello swapna! Thanks for all the help.
Then I will do that!

1 Like