Payer proofs#9116
Open
rustyrussell wants to merge 14 commits intoElementsProject:masterfrom
Open
Conversation
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We missed this. It's experimental, so no changelog needed. Spotted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We no longer have offer_recurrence, we have offer_recurrence_compulsory and offer_recurrence_optional. Decode was changed in v25.12, but we never properly tested it (recurrence is experimental, after all). I opted for simplicity over truth here, and simply modified decode to match the schema, but add a "compulsory" flag. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
If we have 5 fields, ilog64(5) is 3, and (1 << 3) is 8. Adding one made it 16. In fact, since ilog64(4) is also 3, we should *subtract one*, but this handles 0 more neatly (ilog64(0) is defined to return 0, as a special case). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Allow a callback to tell us the hash of unknown branches. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Proof code needs this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Claude helped debug, using the LDK implementation at first, then modified heavily. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
[Adapted for my decode routines --RR]
1e20cdf to
bdfcbb6
Compare
[Adapted for my decode routines --RR] Changelog-EXPERIMENTAL: JSON-RPC: `decode` now supports the `lnp` payer proof format.
Create canonical JSON test vectors, using SUPERVERBOSE. We remove the ones from bolt12_merkle.c. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: JSON-RPC: `createproof` to create a payment proof for a (successful) BOLT12 payment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
bdfcbb6 to
ee91292
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.
This is an implementation of the latest lightning/bolts#1295 draft proposal.
Experimental at this stage, as format may change.