oasis-core icon indicating copy to clipboard operation
oasis-core copied to clipboard

Have a way to access previous state data after an upgrade

Open Esya opened this issue 4 years ago • 1 comments
trafficstars

SUMMARY

Currently, once an upgrade comes in (like v21.X) and a new genesis file is generated and used by the nodes, the previous state is dismissed and the genesis contains the ledger of all active accounts. There is no documented way to access the data of past blocks, and therefore of past transactions.

Ideally, it would be possible using the existing gRPC APIs to get access to historical block data, so that new blockchain explorers can backfill and index those older transactions.

ISSUE TYPE
  • Feature Idea
ADDITIONAL INFORMATION

I'm building a web wallet for Oasis relying on https://github.com/everstake/oasis-explorer and I will require at some point to have accurate historical data of all accounts available to the end users.

Esya avatar Apr 21 '21 21:04 Esya

In case of a dump/restore upgrade (where the genesis file changes) you can keep an old node with the old state running and make queries to that node. Since such upgrades can contain state breaking changes it would be quite problematic to try to support all previous versions in a single node binary.

kostko avatar Apr 22 '21 11:04 kostko