Skip to content

Introduce a blocking version of MsgFindIntersection for a specific blockNo #3538

Open
@kderme

Description

@kderme

In db-sync we periodically publish checkpoints on specific points in the chain that users can download and start syncing from. This creates a strange case where the client can be ahead of the server. Indeed the chainsync protocol doesn't handle this case very, well: the node tells db-sync to rollback to genesis. The rollback however is not needed, since db-sync is at the correct fork, but the node doesn't know yet. This rollback is also very costly and defies the reason of using snapshots.

The solution we agreed was that we add a new message similar to MsgFindIntersection, which specifies a block no that the server needs to wait and send an intersection. If there is no intersection at this point, ie the node has a different block at this block no, only then it should rollback the client.

In addition, in the blocking state, the server can periodically send Messages to inform about its current tip, that don't change the agency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    chain-syncnode-to-clientIssues & PRs related to node-to-client protocols

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions