Skip to content

Commit

Permalink
Bifrost: multipeer channel draft
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Nov 15, 2021
1 parent f19358c commit 7cc25bf
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
74 changes: 74 additions & 0 deletions lnpbp-0053.md
Original file line number Diff line number Diff line change
@@ -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 <orlovsky@lnp-bp.org>
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
2 changes: 1 addition & 1 deletion lnpbp-0055.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <first branch tapleaf-hash>`
- rest of witness stack for *HTLC-success*:
- `KEY_HTLC_LOCAL`
Expand Down

0 comments on commit 7cc25bf

Please sign in to comment.