-
Notifications
You must be signed in to change notification settings - Fork 268
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
Variable-length onion payloads #976
Merged
Merged
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## master #976 +/- ##
==========================================
+ Coverage 82.6% 82.74% +0.14%
==========================================
Files 99 101 +2
Lines 7612 7616 +4
Branches 295 301 +6
==========================================
+ Hits 6288 6302 +14
+ Misses 1324 1314 -10
|
41afd9d
to
fe81564
Compare
32f0740
to
2b2dc52
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
08d5c8e
to
5c0a2e5
Compare
d2c6516
to
c618698
Compare
Grouped functions that belonged together under objects. Abstracted the OnionPacket in a sealed trait. This paves the way for onions of different sizes (trampoline, hornet) and with different stopping conditions.
Refactor and rename sphinx onion packet functions. Comply with BAD_ONION spec sub-errors.
Add codec that prepends a valid mac. Refactor to harmonize methods with onion packet.
- Rename Mac to Mac32 - Move onion types and codecs to their own files - Small refactorings
* Remove redundant comments * Rename InvalidOnion error
It's clearer like that.
d378a44
to
5a1c3b2
Compare
We only use an empty next HMAC to signal termination.
pm47
reviewed
Jul 23, 2019
eclair-core/src/main/scala/fr/acinq/eclair/payment/Relayer.scala
Outdated
Show resolved
Hide resolved
pm47
previously approved these changes
Jul 23, 2019
pm47
approved these changes
Jul 23, 2019
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.
This pull request implements the variable-length onion proposal submitted in lightning/bolts#619
I also took this opportunity to heavily refactor our onion code:
scodec
BAD_ONION
errors and not the more fine-grained errors detailed in the spec -> that's now fixedLAST_PACKET
: this was misleading because this was the (invalid) next packet created when unwrapping the last packet, not actually the last packetThere are two minor spec details that may change depending on the discussion on the spec PR:
0x00
)These are fairly minor changes so I think you can start reviewing now to fix all eclair/scala specific stuff @pm47 @sstone