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

Timestamp Block - Zero indexing? #102

Closed
MikeBishop opened this issue Dec 26, 2016 · 4 comments
Closed

Timestamp Block - Zero indexing? #102

MikeBishop opened this issue Dec 26, 2016 · 4 comments
Assignees
Labels
-transport editorial An issue that does not affect the design of the protocol; does not require consensus.

Comments

@MikeBishop
Copy link
Contributor

NumTimestamps is supposed to specify the "total number of pairs following, including the First Timestamp." If this is zero, presumably the Delta Largest Acked and First Timestamp fields are absent. If this is one, presumably these fields are present, but no others are.

The subsequent fields then say they are repeated "Num Timestamps" times, which contradicts my logic above. I'm guessing this should actually be "Num Timestamps - 1" times?

@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. -transport labels Jan 10, 2017
@swarmer
Copy link

swarmer commented Feb 20, 2017

The "including the First Timestamp" text seems to be gone and now I have no idea how to determine if this first optional timestamp is actually there. Can someone who understands how this is supposed to work please clarify?

@ianswett
Copy link
Contributor

If the num_timestamps byte is 0, the timestamp section is not present..

The currentt text also says "Delta Largest Acked 1..N(opt, repeated)" and Time Since Previous Timestamp 1..N(opt, repeated)" but I believe these should be 0..N.

I'm going to update the timestamp section in the near future, so I'll ensure that's fixed and clarify that if the num timestamps is 0, the timestamp section is absent.

@ianswett ianswett self-assigned this Feb 20, 2017
@swarmer
Copy link

swarmer commented Feb 20, 2017

So if num_timestamps is 1, then one delta and the first timestamp must be present for a total of 40 bytes in this section?

If so, I don't see how 0..N makes sense for the additional timestamps. Maybe there should be text saying that N = num_timestamps - 1.

@martinthomson
Copy link
Member

@ianswett fixed this in #360. Reopen if you think that this is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

No branches or pull requests

4 participants