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

[ESD-2032] Correct spec for fwd_payload member of MSG_FWD #991

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

woodfell
Copy link
Contributor

fwd_payload is currently defined as a string. In reality the contents of this field is binary data with an undefined structure.

This isn't causing problems at the moment, most languages handle strings in a way which is suitable. For the improvements to the C bindings which are required for portability and language compliance this field encoding would need special handling. It can be simplified by altering it so that it's an array of u8 rather than a string.

@woodfell woodfell requested review from jayvdb and silverjam May 31, 2021 01:30
@silverjam
Copy link
Contributor

Should we deprecate and create a new message?

@woodfell
Copy link
Contributor Author

Should we deprecate and create a new message?

Not sure. If we deprecate it and the old definition hangs around then we'd still need special handling for this string-but-not-a-string field such as the implementation of sbp_binary_string_t here. And if we have to have this special case anyway there isn't really any point in deprecating it.

This change doesn't actually change the wire encoding, only how it's represented in the language bindings. There will be some changes to types all languages, not just C, but this message isn't exactly widely used. If you think this is too much of a change to make to the spec then it's probably better to just go with the special case sbp_binary_string_t in C

Copy link
Contributor

@silverjam silverjam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved since there's no change in the wire encoding

@woodfell woodfell merged commit 790e25c into master Jun 3, 2021
@woodfell woodfell deleted the woodfell/correct_msg_fwd_spec branch June 3, 2021 00:54
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

Successfully merging this pull request may close these issues.

3 participants