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

A little more offers #4630

Merged
merged 6 commits into from
Jul 14, 2021
Merged

Conversation

rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Jul 3, 2021

First fix a crash where we decode a signatureless offer. Doh! Then add a developer-only option to override the fetchinvoice logic with a custom secret payer key.

Compat break with merkle (i.e. signature, offer_id) calculation

@rustyrussell rustyrussell added this to the v0.10.1 milestone Jul 3, 2021
@rustyrussell rustyrussell force-pushed the guilt/more-offers branch 2 times, most recently from 4558609 to e74fbc7 Compare July 3, 2021 06:13
We usually assume we're fetching an invoice we are going to pay, so we
look up the previous payment for the payer key, and other sanity
checks.

This adds a developer option to fetchinvoice, which allows it to force
its own payer key, which it uses to sign directly and bypasses these
checks.

Signed-off-by: Rusty Russell <[email protected]>
And fix up the mess we'd made:
1. We didn't order merkles by lesser-first.
2. We didn't correctly construct tree with last nodes on shortest path.

Now we have tests!

Signed-off-by: Rusty Russell <[email protected]>
Changelog-EXPERIMENTAL: protocol: offer signature format changed.
The one about size needs the offers PR rebased onto the latest
onion-message PR.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell marked this pull request as ready for review July 6, 2021 21:41
And add annotation so compiler spots it!

Signed-off-by: Rusty Russell <[email protected]>
@niftynei
Copy link
Collaborator

ACK 225a598

@niftynei niftynei merged commit 6aaecbc into ElementsProject:master Jul 14, 2021
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.

2 participants