analyzer: genesis: parse compute nodes for each runtime #458
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR slightly expands genesis processing: We now also populate the
chain.runtime_nodes
table from the genesis.While working on #457, this was the only piece of data that could/should be extracted from genesis (because it's available in the genesis, and interesting in that we track it during block processing), but is not.
This table is also the basis for the "active nodes" query which is used by the Explorer to show the number of nodes supporting each runtime: https://github.com/oasisprotocol/oasis-indexer/blob/4a5120057ec008e8b40ce18f4b8068716eb47318/storage/client/queries/queries.go#L500-L504
Once this PR and #456 (which will introduce the use of
GenesisAtHeight()
) are both merged, we can start the consensus indexer at a recent height, ignore non-recent blocks, and expose up-to-date node registry info to the Explorer. (NB, other stuff like list of txs, events etc will be missing for non-recent blocks; but short-term the Explorer does not care about those.)Related: https://app.clickup.com/t/866agmn0m