Archive-Node-API icon indicating copy to clipboard operation
Archive-Node-API copied to clipboard

Support different chain-tip selection methods

Open MartinMinkov opened this issue 1 year ago • 1 comments

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.

MartinMinkov avatar Mar 21 '23 21:03 MartinMinkov

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

rpanic avatar Mar 31 '23 08:03 rpanic