Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add some off chain tables to regenesis (#1786)
related to: #1619 Doesn't close the issue, still need to migrate a few tables. The following tables are now part of regenesis: OnChain: * Transactions (saved in snapshot) OffChain: * TransactionStatuses (saved in snapshot) * OwnedTransactions (saved in snapshot) * OwnedMessageIds (derived from Messages in snapshot) * OwnedCoins (derived from Coins in snapshot) * ContractsInfo (derived from Transactions in snapshot) We have open questions to @xgreenx: 1. Should we regenesize `FuelBlockIdsToHeights`? We attempted it but it caused issues with the "don't commit changes related to more than one block" guard. 2. Also what about the restoring the following tables: * Metadata * Statistics * All relayer tables * ProcessedTransactions There are opportunities for optimization, namely we're reading some snapshot data twice (e.g. Transactions are read once to restore the `Transactions` table and once to derive the `ContractsInfo` table). That could probably be done in one go writing to both on chain and off chian tables at once. --------- Co-authored-by: Hannes Karppila <[email protected]> Co-authored-by: xgreenx <[email protected]>
- Loading branch information