-
Notifications
You must be signed in to change notification settings - Fork 913
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
Offers: Part 1, Spec import and basic infrastructure #4255
Offers: Part 1, Spec import and basic infrastructure #4255
Conversation
The Travis CI bot is failing on every PR! |
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This is a bridge for offers which use x-only pubkeys, and the current code which doesn't. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
BOLT 12 introduces this as a new fundamental type, which lets us easily validate them. 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>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…sage. Offers don't use the checksum, as they're signed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
896bfa8
to
4021701
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice PR, just some minor clarifications :-)
ACK 4021701
@@ -348,3 +348,15 @@ void towire_bitcoin_signature(u8 **pptr, const struct bitcoin_signature *sig) | |||
towire_secp256k1_ecdsa_signature(pptr, &sig->s); | |||
towire_u8(pptr, sig->sighash_type); | |||
} | |||
|
|||
void towire_bip340sig(u8 **pptr, const struct bip340sig *bip340sig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not call this with something more memorable? I personally find referencing by BIP number confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the name I used in the spec. I can change both, but we called the previous type signature
so I need something distinct from that.
num_chains = tal_count(chains); | ||
if (num_chains == 0) { | ||
num_chains = 1; | ||
chains = &chainparams_for_network("bitcoin")->genesis_blockhash; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this lead to a leak?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it points into a static array.
common/bolt12.c
Outdated
int badf; | ||
|
||
badf = features_unsupported(our_features, features, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: merge these lines or move int badf
to top.
…voice Note the collapse of '+\s*' and the test cases from the spec. 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>
For inclusion in the onion as a reply path. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4021701
to
b374dd9
Compare
Trivial change to make |
BOLT 12 import, and various helpers to support that (offers, invoice_request, invoice) including signing infrastructure.
Almost all is EXPERIMENTAL_FEATURES, though we'll probably move to a runtime option before release.
Changelog-None