lightning: implement channel types#7636
Merged
ecdsa merged 4 commits intospesmilo:masterfrom Feb 21, 2022
Merged
Conversation
* channel_type is put into storage, serialized as int and deserialized as ChannelType * check for static_remotekey is done via channel type
e3a23e3 to
c203ce0
Compare
Member
|
looks good to me. |
SomberNight
added a commit
that referenced
this pull request
Feb 25, 2022
I still have a mainnet wallet with some pre-static-remotekey channels (though those channels are closed) that I do not want to delete yet. follow-up #7636 ``` E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter Traceback (most recent call last): File "...\electrum\electrum\gui\qt\__init__.py", line 307, in wrapper return func(self, *args, **kwargs) File "...\electrum\electrum\gui\qt\__init__.py", line 332, in start_new_window wallet = self._start_wizard_to_select_or_create_wallet(path) File "...\electrum\electrum\gui\qt\__init__.py", line 377, in _start_wizard_to_select_or_create_wallet db = WalletDB(storage.read(), manual_upgrades=False) File "...\electrum\electrum\wallet_db.py", line 73, in __init__ self.load_data(raw) File "...\electrum\electrum\wallet_db.py", line 106, in load_data self.upgrade() File "...\electrum\electrum\util.py", line 439, in <lambda> return lambda *args, **kw_args: do_profile(args, kw_args) File "...\electrum\electrum\util.py", line 435, in do_profile o = func(*args, **kw_args) File "...\electrum\electrum\wallet_db.py", line 195, in upgrade self._convert_version_44() File "...\electrum\electrum\wallet_db.py", line 859, in _convert_version_44 if item['static_remotekey_enabled']: KeyError: 'static_remotekey_enabled' ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec: lightning/bolts#880
This PR adds a TLV to
open_channelandaccept_channelmessages. The initiator checks the peer's node features and selects a channel type that is supported by both peers, which signals the type of the channel to be opened explicitly. This lets us remove thestatic_remotekey_enabledfield in the storage, which is now a IntFlag (ChannelType).This should also be applied to #7509.
Tests:
option_channel_type(testnet)