Skip to content

Fetch last known good block number +1, instead of latest block. #28

@MicahZoltu

Description

@MicahZoltu

When polling for new blocks, don't poll for latest but instead poll for last known good block number + 1. This will result in 1-block reorgs not being noticed, but that could be beneficial when speaking with load balanced nodes, and shouldn't ever happen normally. It will also make it so if we start many blocks back from head, we don't hit the backfill logic, and instead just fill from that block forward. This allows us to resume a stream that has been paused for thousands of blocks and while catching up won't be fast (due to the number of round trips) it will happen eventually and the service will be live while it is doing so.

We may also be able to delete some code with this change, would be good to review some of the edge cases and evaluate if we still need to handle them.

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