-
Notifications
You must be signed in to change notification settings - Fork 906
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
Alias privacy, as per BOLT 2 #5501
Merged
niftynei
merged 4 commits into
ElementsProject:master
from
rustyrussell:guilt/alias-privacy
Aug 9, 2022
Merged
Alias privacy, as per BOLT 2 #5501
niftynei
merged 4 commits into
ElementsProject:master
from
rustyrussell:guilt/alias-privacy
Aug 9, 2022
Conversation
This file contains 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
I decode a routehint in the next patch, and it barfed: ``` > assert only_one(l1.rpc.decode(inv['bolt11'])['routes'])['short_channel_id'] == alias23 tests/test_opening.py:1515: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ contrib/pyln-client/pyln/client/lightning.py:321: in wrapper return self.call(name, payload=args) contrib/pyln-testing/pyln/testing/utils.py:691: in call schemas[1].validate(res) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Validator(schema={'$schema': 'http://json-...ft-07/schema#', 'allOf': [{'if': {'properties': {'type': {'enum': [...], ...iption': 'if this is f... diagnostics!', 'type': 'boolean'}}, 'required': ['type', 'valid'], ...}, format_checker=None) args = ({'amount_msat': 10msat, 'created_at': 1659923931, 'currency': 'bcrt', 'description': 'desc', ...},), kwargs = {} error = <ValidationError: "1msat is not of type 'u32'"> def validate(self, *args, **kwargs): for error in self.iter_errors(*args, **kwargs): > raise error E jsonschema.exceptions.ValidationError: 1msat is not of type 'u32' E E Failed validating 'type' in schema['allOf'][6]['then']['properties']['routes']['items']['items']['properties']['fee_base_msat']: E {'description': 'the base fee for payments', 'type': 'u32'} E E On instance['routes'][0][0]['fee_base_msat']: E 1msat ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Spoiler: we don't! :( Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell
added
the
protocol
These issues are protocol level issues that should be discussed on the protocol spec repo
label
Aug 8, 2022
rustyrussell
force-pushed
the
guilt/alias-privacy
branch
from
August 8, 2022 07:22
2713333
to
15dce57
Compare
We *should* remember the channel type, since this is only required if they set the channel_type to include option_scid_alias. However, since we support channel upgrade, channel_type really needs a new table. I have a patch for that, from my abandoned original "fastopen" branch for aliases, but it's too big a chance for rc2 IMHO. Meanwhile, we allow exposeprivatechannels's scids to be either real or the aliases. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Protocol: invoice routehints will use fake short-channel-ids for private channels if channel opened with option_scid_alias-supporting peer.
Again, we should use the real channel_type, but we approximate. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Protocol: private channels will only route using short-channel-ids if channel opened with option_scid_alias-supporting peer.
rustyrussell
force-pushed
the
guilt/alias-privacy
branch
from
August 8, 2022 19:58
15dce57
to
c321596
Compare
niftynei
reviewed
Aug 9, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c321596
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
protocol
These issues are protocol level issues that should be discussed on the protocol spec repo
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.
The purpose of short-channel-id aliases is to remove the requirement to expose real short-channel-ids. Unfortunately, our implementation falls short of this; part of that is because we don't track channel_type explicitly.
This meets the requirements, by assuming all peers who support aliases at open time want us to use them exclusively in private channels.
@niftynei Note the new Changelog lines!