option to not add stale blocks to database?
Hi.. at this moment a stale block
https://bitcoin.org/en/glossary/stale-block
is added to the database and thus counting towards the total amount an address has. These blocks have a -1 confirmation.
Is there a way to "exclude" them from the totals? or maybe even from the database? Any suggestion is welcome. I just hope that reindex is not the only way
it is not: i've employed ZFS storage for mongo and filesystem snapshotting as a workaround. https://zfsonlinux.org/ https://docs.mongodb.com/manual/tutorial/backup-with-filesystem-snapshots/
rough & incomplete:
to snapshot: call db.fsyncLock(), zfs snapshot filesystem@$(date %s), call db.fsyncUnlock()
to roll back: stop iquidus, stop mongo, zfs rollback -r filesystem@timestamp, start mongo, start iquidus, node scripts/sync.js index update
with some preparation a full rollback takes minutes down to seconds to complete :+1:
to cleanup snapshots use zfs destroy filesystem@from%to
@BloodyNora thanks for sharing.
We're planning (eventually) to handle this internally but it requires quite a few changes.
That's a very interesting workaround, but it would be a lot cleaner to handle this properly internally.
i'm certainly looking forward to that day. reindex is the one painful point about iquidus.
Also looking forward to the internal changes. Thanks for the update