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

Do not send channel_id values over the wire #2

Open
remyers opened this issue Jul 21, 2020 · 0 comments
Open

Do not send channel_id values over the wire #2

remyers opened this issue Jul 21, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@remyers
Copy link
Collaborator

remyers commented Jul 21, 2020

A Lightning channel_id is 32-bytes and takes up bytes 3-34 of most messages.

Once a channel has been established, these bytes can be inferred and do not need to be sent over the wire with each message; there is only ever one active channel per peer when using Mesh (and perhaps in normal Lightning).

ht/ @Snyke who searched through c-lightning and noticed 14 redundant instances of channel_id in peer messages.

In LNProxy we could include a switch on message type and strip out the channel_id before sending the message. On the receiver side the channel_id can be reinserted with a similar switch statement.

@remyers remyers added the enhancement New feature or request label Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant