It would be nice to be able to query the genesis block as height 0.
We can query blocks, validatorsets, transactions and others by block height. For the block 0 (genesis block) we can't.
It would be nice to unify this experience by indexing the block, transactions and others as height 0 even if they miss some properties.
Why can't you get block 1?
It's not the genesis block isn't it? So I wouldn't see the genesis transactions.
we can query the genesis txs using the /genesis rpc endpoint and parse the gen_txs property
Great! Can we close this issue then?
we could do something like /txs/genesis or /txs?tx.height=0 to get the txs, bc technically it's not a block
I think the biggest case is genesis transactions. So I change the title.
@fedekunze why not make /txs?tx.height=0 parse genesis and pull out the gentx? (i.e. sugar)
That's what he is suggesting I think ;)
@colin-axner want to take on this one when you have time?
The scope would be:
For the next iteration, we could add events for each of the genesis txs to make them queryable
@fedekunze yea I can take this on
What is the reasoning for not just adding a new endpoint as suggested above, /txs/genesis? I think this would be a cleaner implementation then using /txs?tx.height=0
👍 let’s go for that one instead
I don't think /txs/genesis is a cleaner API. If I want to show all transactions I need to stitch again results of multiple requests together.
Also on a side note /txs/genesis conflicts with /txs/{TX_HASH}.
@faboweb lets do the cleaner API then, I think I can make /txs?tx.height=0 work
Great!
Pausing work on this until #4751 is resolved and genutils is updated
Most helpful comment
I don't think
/txs/genesisis a cleaner API. If I want to show all transactions I need to stitch again results of multiple requests together.Also on a side note
/txs/genesisconflicts with/txs/{TX_HASH}.