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

Possible mistake in createHistoryStream documentation #65

Open
boreq opened this issue Apr 4, 2022 · 2 comments
Open

Possible mistake in createHistoryStream documentation #65

boreq opened this issue Apr 4, 2022 · 2 comments

Comments

@boreq
Copy link
Contributor

boreq commented Apr 4, 2022

I noticed an interesting behaviour exhibited by Patchwork. When receiving createHistoryStream requests for sequence n patchwork returns messages with sequence >= n. The protocol guide seems to imply that this is incorrect and instead messages with sequence > n should be returned.

Only return messages later than this sequence number. If not specified then start from the very beginning of the feed.

https://ssbc.github.io/scuttlebutt-protocol-guide/#createHistoryStream

Example: when Patchwork receives a createHistoryStream request with seq set to 10 it will start returning messages from sequence 10. Therefore if we have an up to date feed and ask patchwork for newer messages it will always return at least one message - the least message that we have.

I wonder if this is some kind of a legacy behaviour?

Originally posted here %ptQutWwkNIIteEn791Ru27DHtOsdnbcEJRgjuxW90Y4=.sha256.

@boreq
Copy link
Contributor Author

boreq commented Apr 7, 2022

Example session with Patchwork. I redacted some of the values.

Patchwork receives:

{
"name":["createHistoryStream"],
"type":"source",
"args":[
  {
     "id":"@1234=.ed25519",
     "sequence":76,
     "limit":100,
     "keys":false
  }
]
}

Patchwork replies with:

{
"previous":"%5678=.sha256",
"author":"@1234=.ed25519",
"sequence":76,
"timestamp":1648903409043,
"hash":"sha256",
"content": {...},
"signature": "..."
}

@boreq
Copy link
Contributor Author

boreq commented Apr 14, 2022

This is further corroborated by replies from certain pubs exhibiting the same behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant