Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the behaviour of chain-sync server #3443

Closed
coot opened this issue Oct 20, 2021 · 2 comments · Fixed by #3594
Closed

Document the behaviour of chain-sync server #3443

coot opened this issue Oct 20, 2021 · 2 comments · Fixed by #3594
Assignees
Labels
consensus issues related to ouroboros-consensus documentation Network Documentation related tasks node-to-client Issues & PRs related to node-to-client protocols

Comments

@coot
Copy link
Contributor

coot commented Oct 20, 2021

Specifically document that sending MsgFindIntersect with empty list of points
would not result in a MsgIntersectNotFound replay, and the server
read-pointer is not touched.

@coot coot added consensus issues related to ouroboros-consensus documentation Network Documentation related tasks networking node-to-client Issues & PRs related to node-to-client protocols labels Oct 20, 2021
@HeinrichApfelmus
Copy link
Contributor

HeinrichApfelmus commented Oct 28, 2021

I have additional questions regarding the documentation of the ChainSync protocol (from the point of view of the wallet client), specifically the section labeled "Consumer starts with an arbitrary fork":

  1. It has been indicated in conversations that after the sequence
    MsgFindIntersect [pt]; MsgIntersectFound (pt,tip); MsgRequestNext;
    
    the next message from the node to the client will be
    MsgRollBackward (pt,tip')
    
    if pt was different from the read-pointer before the first message sequence. However, this behavior is currently not apparent from reading the specification.
  2. The spec currently says that upon receiving MsgFindIntersect (pt1:pt2:…) and finding that an intersection exists, the node will reply with "the best (i.e. the newest) of the points that it knows". For example, if pt1 is older (lower slot number) than pt2, then the node would reply with MsgIntersectFound (pt2,tip). However, if I read the code correctly, then the node replies with the first point it can find an intersection for, as opposed to the best point. In this example, this would often be pt1 instead of pt2. I suppose that it's just a matter of applying sort to the list of points, but if the client should do that, then documentation helps figure that out.

@coot
Copy link
Contributor Author

coot commented Jan 31, 2022

Looking at the implementation it seems that the server will replay with MsgIntersectNotFound to MsgFindIntersect [], but it's true that the read-pointer is not touched (ref).

@coot coot self-assigned this Jan 31, 2022
@coot coot moved this to In Progress in Ouroboros Network Jan 31, 2022
iohk-bors bot added a commit that referenced this issue Feb 4, 2022
3594: Update chain-sync documentation r=coot a=coot

Fixes #3443.


Co-authored-by: Marcin Szamotulski <[email protected]>
@iohk-bors iohk-bors bot closed this as completed in 0fc21ba Feb 4, 2022
Repository owner moved this from In Progress to Done in Ouroboros Network Feb 4, 2022
coot added a commit that referenced this issue May 16, 2022
3594: Update chain-sync documentation r=coot a=coot

Fixes #3443.


Co-authored-by: Marcin Szamotulski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus issues related to ouroboros-consensus documentation Network Documentation related tasks node-to-client Issues & PRs related to node-to-client protocols
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants