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

open_channel message can use default values #3

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

open_channel message can use default values #3

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

We can reduce the size of the open_channel message by using default values for negotiated values:

[chain_hash:chain_hash]
[32*byte:temporary_channel_id]
[u64:funding_satoshis]
[u64:push_msat]
[u64:dust_limit_satoshis]
[u64:max_htlc_value_in_flight_msat]
[u64:channel_reserve_satoshis]
[u64:htlc_minimum_msat]
[u32:feerate_per_kw]
[u16:to_self_delay]
[u16:max_accepted_htlcs

This can save enough bytes to almost fit the open_channel message into a single 210 byte mesh payload. Other savings may also be possible with the channel_flags and tlvs.

This could be implemented by detecting the open_channel message and stripping the redundant data. The same system could reconstitute these values using defaults on the receiving end.

@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