Implement reorgs
notes from meeting 30.7.2021:
- possible approaches in DB:
- historize all tables with from-to validity fields
- pro: can also be used for historic queries if needed
- con: all queries are more complex
- con: grows with time when not pruned (can't prune if we want to support historic queries)
- add history table for each relevant table
- pro: simple + queries stay as they are
- needs special handling when rolling back a removal?
- con: needs to copy the state of an entry into the history table every time the state changes with a new block
- historize all tables with from-to validity fields
- currently, only balances need historization (other tables have "immutable" entry types, they are simply removed with rollback)
Edited by Miroslav Bodecek