-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
router+build: update to the latest version of lightning-onion #3027
Commits on May 1, 2019
-
Configuration menu - View commit details
-
Copy full SHA for cba803b - Browse repository at this point
Copy the full SHA cba803bView commit details -
router: convert Route.ToHopPayloads() to Route.ToSphinxPath()
In this commit, we update the process that we use to generate a sphinx packet to send our onion routed HTLC. Due to recent changes in the `sphinx` package we use, we now need to use a new PaymentPath struct. As a result, it no longer makes sense to split up the nodes in a route and their per hop paylods as they're now in the same struct. All tests have been updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for bab9573 - Browse repository at this point
Copy the full SHA bab9573View commit details -
Configuration menu - View commit details
-
Copy full SHA for 558c8ca - Browse repository at this point
Copy the full SHA 558c8caView commit details -
htlcswitch: for UpdateFailMalformedHTLC packets mark fail as needing …
…conversion In this commit, we start the first phase of fixing an existing bug within the switch. As is, we don't properly convert `UpdateFailMalformedHTLC` to regular `UpdateFailHTLC` messages that are fully encrypted. When we receive a `UpdateFailMalformedHTLC` today, we'll convert it into a regular fail message by simply encoding the failure message raw. This failure message doesn't have a MAC yet, so if we sent it backwards, then the destination wouldn't be able to decrypt it. We can recognize this type of failure as it'll be the same size as the raw failure message max size, but it has 4 extra bytes for the encoding. When we come across this message, we'll mark is as needing conversion so the switch can take care of it.
Configuration menu - View commit details
-
Copy full SHA for 649e080 - Browse repository at this point
Copy the full SHA 649e080View commit details -
htlcswitch: add new EncryptMalformedError method to ErrorEncrypter
In this commit, we add a new method to the ErrorEncrypter interface: `EncryptMalformedError`. This takes a raw error (no encryption or MAC), and encrypts it as if we were the originator of this error. This will be used by the switch to convert malformed fail errors to regular fully encrypted errors.
Configuration menu - View commit details
-
Copy full SHA for c67ca0a - Browse repository at this point
Copy the full SHA c67ca0aView commit details -
htlcswitch: properly handle direct link malformed HTLC failures
In this commit, we fix a bug that caused us to be unable to properly handle malformed HTLC failures from our direct link. Before this commit, we would attempt to decrypt it and fail since it wasn't well formed. In this commit, if its an error for a local payment, and it needed to be converted, then we'll decode it w/o decrypting since it's already plaintext.
Configuration menu - View commit details
-
Copy full SHA for cdc4aca - Browse repository at this point
Copy the full SHA cdc4acaView commit details -
htlcswitch: properly convert multi-hop malformed HTLC failures
In this commit, we now properly convert multi-hop malformed HTLC failures. Before this commit, we wouldn't properly add a layer of encryption to these errors meaning that the destination would fail to decrypt the error as it was actually plaintext. To remedy this, we'll now check if we need to convert an error, and if so we'll encrypt it as if it we were the source of the error (the true source is our direct channel peer).
Configuration menu - View commit details
-
Copy full SHA for be63c7d - Browse repository at this point
Copy the full SHA be63c7dView commit details -
htlcswitch: add new TestUpdateFailMalformedHTLCErrorConversion test
In this commit, we add a new test to ensure that we're able to properly convert malformed HTLC errors that are sourced from multiple hops away, or our direct channel peers. In order to test this effectively, we force the onion decryptors of various peers to always fail which will trigger the malformed HTLC logic.
Configuration menu - View commit details
-
Copy full SHA for 56c969c - Browse repository at this point
Copy the full SHA 56c969cView commit details -
test: update itest to no longer expect incorrect message for sphinx r…
…eplay test In this commit, we update the itests to expect the correct message for the sphinx replay test. Before the fixes in the prior commits, we expected the wrong error since we were actually unable to decrypt these converted malformed HTLC errors. Now, we'll properly return a parse able error, so we assert against that error instead of the failure to decode an error.
Configuration menu - View commit details
-
Copy full SHA for 2f2a907 - Browse repository at this point
Copy the full SHA 2f2a907View commit details