Skip to content

Commit

Permalink
BOLT 3: commitment number not commitment transaction number.
Browse files Browse the repository at this point in the history
Be consistent.
  • Loading branch information
Hiroki Gondo authored and rustyrussell committed Nov 29, 2018
1 parent 7163c52 commit 56ada3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 03-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ Most transaction outputs used here are pay-to-witness-script-hash<sup>[BIP141](h
## Commitment Transaction

* version: 2
* locktime: upper 8 bits are 0x20, lower 24 bits are the lower 24 bits of the obscured commitment transaction number
* locktime: upper 8 bits are 0x20, lower 24 bits are the lower 24 bits of the obscured commitment number
* txin count: 1
* `txin[0]` outpoint: `txid` and `output_index` from `funding_created` message
* `txin[0]` sequence: upper 8 bits are 0x80, lower 24 bits are upper 24 bits of the obscured commitment transaction number
* `txin[0]` sequence: upper 8 bits are 0x80, lower 24 bits are upper 24 bits of the obscured commitment number
* `txin[0]` script bytes: 0
* `txin[0]` witness: `0 <signature_for_pubkey1> <signature_for_pubkey2>`

The 48-bit commitment transaction number is obscured by `XOR` with the lower 48 bits of:
The 48-bit commitment number is obscured by `XOR` with the lower 48 bits of:

SHA256(payment_basepoint from open_channel || payment_basepoint from accept_channel)

Expand Down Expand Up @@ -904,7 +904,7 @@ Here are the points used to derive the obscuring factor for the commitment numbe

local_payment_basepoint: 034f355bdcb7cc0af728ef3cceb9615d90684bb5b2ca5f859ab0f0b704075871aa
remote_payment_basepoint: 032c0b7cf95324a07d05398b240174dc0c2be444d96b159aa6c7f7b1e668680991
# obscured commitment transaction number = 0x2bb038521914 ^ 42
# obscured commitment number = 0x2bb038521914 ^ 42

And, here are the keys needed to create the transactions:

Expand Down

0 comments on commit 56ada3d

Please sign in to comment.