Skip to content
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

Payment Request: speed up node id computation #1203

Merged
merged 3 commits into from
Nov 14, 2019

Conversation

sstone
Copy link
Member

@sstone sstone commented Nov 8, 2019

LN payment requests almost never explicitly include a node id, instead it is recomputed using key recovery. This PR calls native secp256k1 pubkey recovery which is much faster than using Bouncy Castle (it makes a difference for mobile users), and removes the signature check that is useless when pubkey was recovered.

Even though no one AFAICT actually includes the node id field in their PR it is still something that we should implement (in another PR)

Use native secp256k1 pubkey recovery for faster node id computation
@codecov-io
Copy link

codecov-io commented Nov 8, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@e5060d9). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #1203   +/-   ##
=========================================
  Coverage          ?   76.22%           
=========================================
  Files             ?      138           
  Lines             ?     9382           
  Branches          ?      366           
=========================================
  Hits              ?     7151           
  Misses            ?     2231           
  Partials          ?        0
Impacted Files Coverage Δ
...scala/fr/acinq/eclair/payment/PaymentRequest.scala 93.08% <100%> (ø)

@sstone sstone requested a review from dpad85 November 8, 2019 10:45
@sstone sstone force-pushed the payment_request_read_faster branch from 323fd2a to df7d8aa Compare November 13, 2019 12:55
@sstone sstone merged commit 30a0e99 into master Nov 14, 2019
@sstone sstone deleted the payment_request_read_faster branch November 14, 2019 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants