o1-labs / Archive-Node-API

This is a GraphQL server that is built with the intention of exposing information from Mina's Archive Node
17 stars 4 forks source link

Support different chain-tip selection methods #69

Open MartinMinkov opened 1 year ago

MartinMinkov commented 1 year ago

Suggestions to improve the best tip chain selection was made in a Discord channel, see here: https://discord.com/channels/484437221055922177/1086196859627917343/1087343997812486174

For those without Discord, the contents of the message are:

" Potential options for the archive node api could be: the latest finalized block by some num of confirmations n the latest undisputed block (what I mean by that is that if there are multiple blocks proposed in a slot, the next proposer has selected a block out of those) the latest unconfirmed block (for example the block in the latest filled slot with the lowest timestamp) all blocks with the potential of becoming canonical

Doing it this way keeps the possibility of only retrieving confirmed data while also giving the developer the option to modify that behaviour if needed. "

By supporting these different options, we can let the user define how they want to query the data for the Archive Node.

rpanic commented 1 year ago

I think a useful addition would be the retrieval of the selected tip block. That could be used to check whether the archive api already picked up a newly mined transactions