Skip to content

Reorg Multiverse API #5

@unwriter

Description

@unwriter

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:

  1. Constantly monitor blocks within the range of clock.bitcoin.now-20 ~ clock.bitcoin.now
  2. If there's a discrepancy, rewind back to that block.

but there can be other approaches as well

Scenario 2. Create multiple states

  1. Keep checking clock.bitcoin.now-20 ~ clock.bitcoin.now
  2. If there's a discrepancy, create a new collection. or create an additional flag that tags the txs with the additional metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions