[x] add tx hash to the database (see #392 which calculates them, but doesn't store them. See scheduled_data_tx_hash)
[x] create a block header standard and a block hash based off of it. Notably, we need to make sure it has the following properties:
[x] it includes a timestamp (see #402 which adds it in-memory, but we need it from the database)
[x] it includes a pointer to the previous block hash
[x] ensure that a timestamp field is present in block headers
[x] fetch logs for a transaction (see #409)
[ ] a way to fetch the transaction nonce (low priority I think)
[x] A definition of "tx index" in a block. The natural definition for this is to sort by the database ID for values that have the same block, but this is tricky because there are 2 tables (historical_game_inputs and scheduled_data). The order of these IDs is also funnel-dependent which makes breaking changes frequent because of the way funnel fetch ordering works, but I don't think we can get around that. Right now we process the scheduled data in the STF before the historical data, so we can keep the same order
[ ] Right now we delete scheduled data after it gets processed, but this breaks these historical queries
scheduled_data_tx_hash
)historical_game_inputs
andscheduled_data
). The order of these IDs is also funnel-dependent which makes breaking changes frequent because of the way funnel fetch ordering works, but I don't think we can get around that. Right now we process the scheduled data in the STF before the historical data, so we can keep the same order