Add migration for remaining off chain tables
segfault-magnet opened this issue · comments
@xgreenx wrote:
We need to migrate as well:
FuelBlocks
- for that we need to disable guard on commit.
FuelBlockIdsToHeights
- Cab be generated form theFuelBlocks
.
SpentMessages
- can be derived from Transactions or removed entirly
ProcessedTransactions
- can be derived from Transactions
FuelBlockConsensus
and
Actually, maybe transactions and blocks should be migrated to the off-chain database. Because we are only migrating them for GraphQL service and only to support queries for old data.
and
[...] the idea is to have
OldFuelBlocks
andOldTransactions
as part of the off-chain database. If the requested block is lower than genesis block height, we go tooff_chain::OldFuelBlocks
, otherwise toon_chain::FuelBlocks
. In the case of transactions, yeah, first we go to on_chain::Transactions and if no success, go tooff_chain::OldTransactions
From the above, we should have a table for blocks and transactions in the off chain db and populate it upon regenesis.