-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Implement a re-org API.
You can create multiverse when an re-org happens. Instead of thinking abut it from "protection" point of view, make the API more flexible so that it's not only possible to protect from reorgs through rollback, but also allow creation of multiple states through the API.
Scenario 1. Rewind
There already is a rewind method, so the only thing that needs to happen is trigger rewind in certain situations.
One logic could be:
- Constantly monitor blocks within the range of
clock.bitcoin.now-20 ~ clock.bitcoin.now - If there's a discrepancy, rewind back to that block.
but there can be other approaches as well
Scenario 2. Create multiple states
- Keep checking
clock.bitcoin.now-20 ~ clock.bitcoin.now - If there's a discrepancy, create a new collection. or create an additional flag that tags the txs with the additional metadata.
afomi
Metadata
Metadata
Assignees
Labels
No labels