Skip to content

WS publisher skips logs during reconnects #777

@shaspitz

Description

@shaspitz

Our websocket publisher accepts a ProgressStore interface which makes it seem like it should receive all log messages, even when restarted. Upon the publisher starting, it sets a FromBlock that's passed to evmClient.SubscribeFilterLogs. However the underlying eth_subscribe json rpc does not accept a block number for backfilling logs. eth_subscribe only observes logs from the current block onward. Therefore the FromBlock arg is silently thrown out, and our wsPublisher only receives logs from the current block onward.

We should either introduce backfilling, using eth_getLogs instead of eth_subscribe for the backfill. Or we can remove ProgressStore from the wsPublisher so it's clear events are only received from the current block onward. Many components in this repo rely on the wsPublisher so the former idea sounds more robust.

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