Skip to content

lnmsg decode/encode message needs rewrite; to support TLVs #6006

@SomberNight

Description

@SomberNight
  • lightning.json should be updated to reflect current BOLTs
    • It was generated by a script (structured.py), that @ysangkok wrote and got upstreamed. It worked by processing the output of another script extract-formats.py, which in turn processes the BOLT documents directly. However the BOLTs and the output of extract-formats.py seemingly changed a lot in the meantime and structured.py is now broken and unmaintained.
    • We should either fix structured.py, or rather, we could use extract-formats.py directly. This script looks to be actively maintained as the BOLTs change, by Rusty.
  • Accordingly, lnmsg.py will need to be rewritten.
  • Note that this is a requirement of implementing TLV support.
  • btw, ChannelDB.load_data() became significantly slower when we changed to storing raw messages in the db. Most of the time is spent in lnmsg.decode_msg. I believe lnmsg.decode_msg could be made faster, perhaps even as-is, but there is no point now if it will need significant changes anyway.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions