route-blinding: recover blinding point from forwarding packages#37
Closed
calvinrzachman wants to merge 8 commits intocarlaKC:7298-3-forwardblindedroutesfrom
Closed
Conversation
This new hodl flag will prevent the switch from opening circuits for ADDs it's attempting to forward. This simulates arbitrary delays in the switch during forwarding and can be leveraged to test the switch going down while trying to forward a batch of HTLCs.
…dpkg We expand our tests to verify that a forwarding node which receives a blinded HTLC (bob) is able to restore the blinding point from disk. NOTE: He's only able to do so if he's revoked his local commitment.
Miscellaneous changes as well
c0efd59 to
10c9653
Compare
…ind hops We expand the capability of the mockHopIterator such that it is able to handle both normal and blind hops. The destinction is made via a check for sentinel value which delineates the byte boundary between serialized hops. The implemenation is functional yet somewhat propietary in the sense that it is specific to handling blind hops and not as general as it could be. This lack of generality leaves the door open to eventual inclusion of the full blown TLV serialization scheme into the mock iterator. Without this or something like TLV we do not have a way to know whether we should or even how to deserialize a variable length field like the route blinding payload. htlcswitch/mock: use TLV for route blinding payload Allow the mock hop iterator to use TLV for the route blinding deserialization. We assume the route blinding payload is already serialized via TLV and add a length prefix before so it can be properly parsed from the onion packet.
10c9653 to
2b397b2
Compare
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.
Change Description
Here's a not quick and very dirty set of commits which try to determine whether or not we need to worry about recovering blinding point from forwarding packages now that we persist HTLC extra data to disk as part of channldb.HTLC.
If you try adding and removing the last commit, you'll notice that the payment fails.
-vwhich kind of show what's going on.NOTE: This is NOT intended for inclusion or merging alongside the rest of the route blinding code! Rather, it is meant to aid discussion on the relevance of restoring blinding points from forwarding packages!