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

[WIP] multi: use ChannelAnnouncement2 to advertise Taproot Channels #8079

Closed
wants to merge 31 commits into from

Conversation

ellemouton
Copy link
Collaborator

@ellemouton ellemouton commented Oct 10, 2023

In this PR, we start making use of the new channel_announcement_2 message
for advertising simple taproot channels. All itests are updated to use public taproot
channels.

Part of Gossip 1.75 epic
Based on #8044 (so ignore the first 11 commits)

NOTE: currently, the legacy channel_update message is still used for the taproot
channels. The switch to channel_update_2 will be addressed in the next PR.

TODO:
- a bunch of cleanup.
- more abstractions
- more tests
- add migration for the waiting proof store
- flesh out & clean up the nonce generation/persistence logic

Before this commit, any MuSig2Nonce TLV field used within a message is
expected to use the same tlv type number. This is changed in this commit
so that each message must specify which type number it wishes to use.
This is necessary for if there is ever more than one MuSig2Nonce used
within the same message.
This commits defines the RawFeatureVectorRecordProducer type which will
allow RawFeatureVector type to be used for a TLV record.
This commit is a set up for the next commit. The current way that the
channel edge is encoded in the channel db has no identifying prefix but
intead just directly starts writing the various fields. This will need
to be adjusted for taproot edges and so instead of migrating this very
large bucket, we instaed take advantage of the fact that because the
first byte will always either be 0x02, 0x03 (the prefix for a compressed
public key) or potentially 0x00 (an empty node ID key), we now assert
that if the first byte is 0xff, then a new encoding type is being used.
This commit adds a new ChanAnn interface which abstracts away things
from the lnwire.ChannelAnnouncement message that the
handleChanAnnouncement and processRejectedEdge methods require. This
will be useful in a follow up commit where handling of the
lnwire.ChannelAnnouncement2 message is added since these methods will
then be reusable.
TODO: will need to add a migration for this new encoding format.
@ellemouton ellemouton marked this pull request as draft October 10, 2023 19:41
@ellemouton
Copy link
Collaborator Author

closing this as it will be replaced by a series of PRs that result in the full flow - the rough version of which can be seen here: ellemouton#94

@ellemouton ellemouton closed this Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant