Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analyzer: genesis: parse compute nodes for each runtime #458

Merged
merged 1 commit into from Jun 27, 2023

Conversation

mitjat
Copy link
Collaborator

@mitjat mitjat commented Jun 22, 2023

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

@mitjat mitjat force-pushed the mitjat/genesis-runtime-nodes branch from 106736c to 4ee639d Compare June 27, 2023 01:02
@mitjat mitjat enabled auto-merge June 27, 2023 01:03
@mitjat mitjat merged commit 8ba0410 into main Jun 27, 2023
6 checks passed
@mitjat mitjat deleted the mitjat/genesis-runtime-nodes branch June 27, 2023 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants