oxen-core/src/blockchain_db
Sean Darcy ed161e2ec4
Creates archiving for reward batching
This adds a new table to the batching schema to copy the accrued
balances every so often. This means that we can jump back to a
previous point without popping blocks.

The archiving is triggered in sql every 100 blocks and added to the
archive table, then pruned from the archive table at a later time to
ensure the size is kept small. Rebuilding 100 blocks is pretty
reasonable and should be less than 10s.

For longer distance pop_blocks and blockchain detached every 10k blocks
is kept in the archiving table. This takes longer to rebuild but is
better than rebuilding from scratch.

The blockchain detached function is also added to our regular blockchain
detached hooks so that it gets called every time the blockchain
detaches. Which appears to have caused some issues previously when some
of the modules would detach but batching would be stuck in an advanced
state.
2022-10-24 21:40:30 -03:00
..
lmdb Fail if tx blob is empty 2022-06-01 15:44:24 -03:00
sqlite Creates archiving for reward batching 2022-10-24 21:40:30 -03:00
CMakeLists.txt Split up sqlitedb into a compiled unit 2022-05-24 17:36:24 -03:00
blockchain_db.cpp Remove stupid typedef 2022-05-20 18:30:55 -03:00
blockchain_db.h Remove stupid typedef 2022-05-20 18:30:55 -03:00
locked_txn.h Merge commit 'c038cc8b791ffb4bcd5f13e47de1ea98815059fe' into MergeUpstream3 2020-05-28 12:23:19 +10:00
testdb.h Remove stupid typedef 2022-05-20 18:30:55 -03:00