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

onion messages #9039

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

accumulator
Copy link
Member

No description provided.

@accumulator
Copy link
Member Author

this branch is now onion_messages only, all bolt12 stuff has been moved to the bolt12 branch, which builds on top of this branch/PR

@accumulator accumulator force-pushed the onion_messages branch 2 times, most recently from 4ce8580 to 9c4bec1 Compare June 6, 2024 12:08
@accumulator accumulator force-pushed the onion_messages branch 5 times, most recently from d7d81e9 to 20b8bd9 Compare July 3, 2024 16:40
@accumulator accumulator changed the title onion messages wip onion messages Jul 3, 2024
@accumulator accumulator marked this pull request as ready for review July 3, 2024 16:58
@accumulator
Copy link
Member Author

accumulator commented Jul 3, 2024

@ecdsa, @SomberNight, this PR is getting ready to be reviewed.

  • I have successfully sent onion messages across electrum instances Alice <-> Bob <-> Carol <-> Dave using node_ids and blinded paths as destination.
  • added CLI commands
    • get_blinded_path_via to construct a blinded path (only via a direct peer currently, but longer routes should be trivial to add)
    • send_onion_message to send a text onionmsg_tlv.message payload to a node_id or blinded path (destination node will log these on info level)
  • route finding over onion message capable nodes using channels as edges (however not yet tested outside unit-tests as regtest with only electrum nodes lacks a channel graph)
  • initial OnionMessageManager class implementing a send queue which should match replies to requests, rate-limiting, alternate route retries in case no reply within x seconds etc. (not needed for text onionmsg_tlv.message payloads, but eventually bolt12 will need this)
  • serialization and deserialization of subtype declarations in wire definitions
  • TODOs added where applicable
  • Of note, there's extra variants of new_onion_packet and get_shared_secrets_along_route that need to be unified..

move optional params to process_onion_packet to kwargs, add tlv_stream_name param
pass tlv_stream_name to OnionHopsDataSingle.from_fd()
store proper tlv_stream_name in OnionHopsDataSingle when reading from fd
- add support for `subtype`/`subtypedata` type declarations
- add new primitive type `sciddir_or_pubkey`
commands: add send_onion_message, get_blinded_path_via
lnworker: add OnionMessageManager to lnworker
lnrouter: add node filter to LNPathFinder
electrum/lnmsg.py Outdated Show resolved Hide resolved
electrum/lnpeer.py Outdated Show resolved Hide resolved
@accumulator accumulator force-pushed the onion_messages branch 2 times, most recently from fce6b5c to 7bb7596 Compare July 17, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants