Repository navigation
renepay: don't keep the onion on a pending route - #79
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
renepay serialized each route's onion onto the route, and nothing kept a pointer to it after the request was built. The route stays in the pending map until its HTLC resolves, so stopping the node with a payment in flight reported the onion as a memory leak. This made
test_renepay.py::test_limitsflaky. The onion now lives ontmpctx, and the shared secrets stay on the route.The leak check also missed the per-payment disabled channel maps, which a payment in progress reported as leaks. It now scans them.
test_pending_route_onionholds an HTLC at the middle node and stops the payer. Both leak reports appeared before this change, and neither does now.Changelog-None