From 7cc25bfea8b3e00be90f02fda6d1b7b401682eda Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 15 Nov 2021 10:25:50 +0100 Subject: [PATCH] Bifrost: multipeer channel draft --- lnpbp-0053.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ lnpbp-0055.md | 2 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 lnpbp-0053.md diff --git a/lnpbp-0053.md b/lnpbp-0053.md new file mode 100644 index 0000000..3f93a25 --- /dev/null +++ b/lnpbp-0053.md @@ -0,0 +1,74 @@ +``` +LNPBP: 0053 +Layer: OSI Application (i7) +Vertical: Lightning network protocol +Title: Muli-peer payment channels for Bifrost +Author: Dr Maxim Orlovsky +Comments-URI: https://github.com/LNP-BP/lnpbps/pulls/97 +Status: Draft +Type: Standards Track +Created: 2021-11-14 +Finalized: not yet +License: CC0-1.0 +``` + +## Abstract + +## Background + +## Motivation + +## Design + +## Specification + +### Messaging + + +### Funding transaction + +Transaction containing multiple inputs, each of which MUST signal S2C commitment type. + +Output descriptor: `tr(musig(KEY_LOCAL_FUNDING, KEY_REMOTE_FUNDING))` + + +### Commitment transaction + +Input: +- Spends funding output +- nSeq: `0x80800000 + COMMITMENT_NO & 0xFFFF` (signals S2C DBC) +- Witness stack: + - `KEY_LOCAL_FUNDING + KEY_REMOTE_FUNDING` + - `SIG*(KEY_LOCAL_FUNDING + KEY_REMOTE_FUNDING)` + where * denotes optional presence of sign-to-contract commitment + +Outputs: +- "To local": `tr(KEY_REVOCATION, and_v(v:pk(KEY_LOCAL),older(SELF_DELAY)))` + * `KEY_LOCAL`: proposed by the local node + * `SELF_DELAY`: proposed by the remote node, may be rejected by local +- "To remote": `tr(musig(KEY_LOCAL, KEY_REMOTE), and_v(v:pk(KEY_REMOTE),older(REMOTE_DELAY))` + * `KEY_LOCAL`: proposed by the local node + * `KEY_REMOTE`: propsoed by the remote node + * `REMOTE_DELAY`: proposed by the local node, may be rejected by remote +- "Anchor": `tr(musig(KEY_LOCAL, KEY_REMOTE), {v:pk(KEY_LOCAL), v:pk(KEY_REMOTE)})` + * `KEY_LOCAL`: proposed by the local node + * `KEY_REMOTE`: propsoed by the remote node + * The ooutput must contain a fixed amount of satoshis above dust limit proposed by + the node adding this output to the channel proposal + + +## Compatibility + +## Rationale + +## Reference implementation + +## Acknowledgements + +## References + +## Copyright + +This document is licensed under the Creative Commons CC0 1.0 Universal license. + +## Test vectors diff --git a/lnpbp-0055.md b/lnpbp-0055.md index caee153..6b90b11 100644 --- a/lnpbp-0055.md +++ b/lnpbp-0055.md @@ -121,7 +121,7 @@ The input of *HTLC spending transactions* spends *offered HTLC* (for *HTLC timeo - 0 for HTLC-success - `CLTV_EXPIRY` for HTLC-timeout - Input: - - nSeq: `SELF_DELAY` (must be odd to use P2C deterministic bitcoin commitments) + - nSeq: `SELF_DELAY` (must be even to use P2C deterministic bitcoin commitments) - control block: `0xC0/0xC1 ` - rest of witness stack for *HTLC-success*: - `KEY_HTLC_LOCAL`