Skip to content

Dealing with block reorgs #29

Open
@cygnet3

Description

@cygnet3

I'm wondering how clients to blindbit-oracle should deal with block reorgs.

I imagine clients need some kind of endpoint to get the block hash at a given height. Clients should remember the block hash of the last n blocks. Before scanning, they check if the hash of the last scanned block matches the hash given by the server. If not, they 'roll back' the changes in that block, and check the same for block n-1. Then n-2, et cetera.

I don't think n needs to be very big, since most reorgs are only of height 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions