-
Notifications
You must be signed in to change notification settings - Fork 266
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
Wake up wallet nodes before relaying messages or payments #2865
Commits on Aug 21, 2024
-
Reorder functions in
NodeRelay.scala
This commit doesn't contain any logical change, we just move code to align with the FSM flow. It makes it easier to follow the progress of the state machine to always scroll down when advancing states.
Configuration menu - View commit details
-
Copy full SHA for cfb6c9c - Browse repository at this point
Copy the full SHA cfb6c9cView commit details -
We refactor `NodeRelay.scala` to re-order some steps, without making meaningful functional changes. The steps are: 1. Fully receive the incoming payment 2. Resolve the next node (unwrap blinded paths if needed) 3. Wake-up the next node if necessary (mobile wallet) 4. Relay outgoing payment Note that we introduce a wake-up step, that will be enriched in future commits and can be extended to include mobile notifications. The file is now also easier to follow, as steps are done linearly by simply scrolling down.
Configuration menu - View commit details
-
Copy full SHA for 54185b0 - Browse repository at this point
Copy the full SHA 54185b0View commit details -
Add wake-up step to channel and message relay
We allow relaying data to contain a wallet `node_id` instead of an scid. When that's the case, we start by waking up that wallet node before we try relaying onion messages or payments.
Configuration menu - View commit details
-
Copy full SHA for f4c1354 - Browse repository at this point
Copy the full SHA f4c1354View commit details
Commits on Aug 26, 2024
-
Create
peer-wake-up
config sectionCreate a dedicated `peer-wake-up` configuration section. This can be enriched with mobile notification sub-sections.
Configuration menu - View commit details
-
Copy full SHA for a395f9f - Browse repository at this point
Copy the full SHA a395f9fView commit details -
Make
walletNodeId_opt
a field inChannelRelay
It turns out that we can keep `requestedShortChannelId_opt` and `walletNodeId_opt` as fields of this actor instead of resolving them once and forwarding the value in every function.
Configuration menu - View commit details
-
Copy full SHA for 3a3d39e - Browse repository at this point
Copy the full SHA 3a3d39eView commit details -
Include
recipient
inNodeRelay.sending
This field is used in feature branches, so we include it to minimize the diff.
Configuration menu - View commit details
-
Copy full SHA for fbc4577 - Browse repository at this point
Copy the full SHA fbc4577View commit details -
Introduce
PeerReadyNotifier
private classThis commit doesn't contain any changes apart from using a private class to factor common fields of the `PeerReadyNotifier`.
Configuration menu - View commit details
-
Copy full SHA for 893aac2 - Browse repository at this point
Copy the full SHA 893aac2View commit details -
- clean-up `SomePeerConnected` / `SomePeerDisconnected` - include supervision directly inside the actor itself
Configuration menu - View commit details
-
Copy full SHA for aad3226 - Browse repository at this point
Copy the full SHA aad3226View commit details -
Track pending
PeerReadyNotifier
instancesIt can be useful to track pending `PeerReadyNotifier` instances to avoid performing duplicate actions when multiple `PeerReadyNotifier` spawn for the same peer (e.g. sending a mobile notification). When a `PeerReadyNotifier` actor is started, it registers itself into a singleton `PeerReadyManager`, which tells it whether there are other pending attempts for the same peer.
Configuration menu - View commit details
-
Copy full SHA for 5613204 - Browse repository at this point
Copy the full SHA 5613204View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea613a9 - Browse repository at this point
Copy the full SHA ea613a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28e92c2 - Browse repository at this point
Copy the full SHA 28e92c2View commit details -
Move
register
outside of private classThis way we can have `isFirstAttempt` as a class field, which makes sense since this value won't change.
Configuration menu - View commit details
-
Copy full SHA for bfb9090 - Browse repository at this point
Copy the full SHA bfb9090View commit details
Commits on Aug 27, 2024
-
This makes testing easier. We also do small refactorings in the relay actors without any behavior changes.
Configuration menu - View commit details
-
Copy full SHA for 3e23b85 - Browse repository at this point
Copy the full SHA 3e23b85View commit details