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

Improvements to ln spec message type definition #1074

Open
vincenzopalazzo opened this issue May 3, 2023 · 0 comments
Open

Improvements to ln spec message type definition #1074

vincenzopalazzo opened this issue May 3, 2023 · 0 comments

Comments

@vincenzopalazzo
Copy link
Contributor

I didn't find the time to finish my prototype on the code generation for the ln spec message in https://github.com/lnspec-tools/lncodegen.rs, but when I saw this pull request (https://gist.github.com/HenningTimm/ab1e5c05867e9c528b38599693d70b35), I thought it was a good moment to bring up some more issues.

  1. With our BOLT 1, it's not quite clear when and how certain types are used (for example, truncated vs untruncated integers).

  2. We should provide more examples of how the Type-Length-Value (TLV) format works. At least one example should show how to serialize values to the TLV format and how to deserialize them back.

  3. We can change our type definition from a custom format to JSON. In this way, the init method will look like this:

{
     "type":  16,
     "gflen": "u16" 
      ...
}

This approach will provide a standard format for flen*byte that may not be trivial for someone who is new to the project.

Regarding BOLTs being more related to the implementor, as well as the BOLT 1 type definition, I think there's an incentive to clarify these points in the spec.

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