Skip to content

improv (flashblocks): implement ping/pong on websocket connection + set deadline on reads #304

@0x416e746f6e

Description

@0x416e746f6e
  • presently the flashblocks websocket connection is one-way (rollup-boost reads from builder, but never sends any data back).

  • rollup-boost does not verify liveness of the above connection in any way.

    • meaning that if builder would vanish w/o explicitly closing the connection (which is more likely to happen if the builder is truly remote), then rollup-boost would have no idea about that and keep trying to read from the socket that is long since has no remote party to push the flashblocks into it.
  • normally, the above issue can be mitigated by 2 means:

    • both sides implement websocket ping-pong protocol, with certain deadlines on read/write operations (meaning that if either of the messages if failed to be consumed by remote party, then the connection is considered corrupt, and is closed)

    • and additionally, the "meaningful" messages (i.e. not ping/pong ones) are also deadlined (e.g. in case of flashblocks we could say that if the websocket connection didn't deliver any payload for longer than a second, then it's broken, should be close - and we should try to set up a new one).

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