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

Bolt 12 #806

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Bolt 12 #806

wants to merge 1 commit into from

Conversation

benthecarman
Copy link
Collaborator

@benthecarman benthecarman commented Oct 25, 2023

This can pay bolt 12 offers!

bolt12 made by the LSP:

lno1qgs0v8hw8d368q9yw7sx8tejk2aujlyll8cp7tzzyh5h8xyppqqqqqqgqvqcdgq2qenxzatrv46pvggrv64u366d5c0rr2xjc3fq6vw2hh6ce3f9p7z4v4ee0u7avfynjw9q

need to add tests that all the storage around bolt11 vs bolt12 is handled properly, probably some cleanup can be done too

Copy link

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see some early adoption! Please let us know if you run into any issues.

Comment on lines +1693 to +1747
if !offer.supports_chain(ChainHash::using_genesis_block(self.network)) {
return Err(MutinyError::IncorrectNetwork(self.network));
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChannelManager::pay_for_offer should already checks this when it sets the chain on the InvoiceRequestBuilder.

Comment on lines +1216 to +1304
if !self.channel_manager.list_usable_channels().is_empty() {
break;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, to be certain this would need to check for a usable channel with an introduction node in the Offer's blinded path (or with its signing pubkey if doesn't have any blinded paths).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we just do this to make sure the node is fully booted up

@jkczyz
Copy link

jkczyz commented Oct 26, 2023

FYI, if you implement your own MessageRouter that simply copies the default one but uses your LSP's node id as the only intermediate node, then I believe two Mutiny users could pay each other without a direct connection assuming the LSP supports onion messages.

https://github.com/lightningdevkit/rust-lightning/blob/d2242f604dc7c5c51de8f5612274ca73c2bb809a/lightning/src/onion_message/messenger.rs#L206

@benthecarman
Copy link
Collaborator Author

@jkczyz pusshed up what i have, isn't currently working however, gets this error
image

@jkczyz
Copy link

jkczyz commented Oct 27, 2023

@jkczyz pusshed up what i have, isn't currently working however, gets this error image

Hmm... seems like you are getting an invoice at least. The failure is from trying to pay it. The "retry" portion of the message may be misleading though as it used for the initial send. Let's sync up tomorrow to debug.

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.

None yet

2 participants