1
0
mirror of https://github.com/lightning/bolts.git synced 2024-11-19 10:00:04 +01:00
Commit Graph

158 Commits

Author SHA1 Message Date
Hiroki Gondo
626fff28c9 BOLT 3: fix the rationale of Closing Transaction. 2019-01-07 19:38:55 +00:00
Hiroki Gondo
eba1c70f6b BOLT 3: fix trivial typo. 2019-01-07 20:18:31 +01:00
Hiroki Gondo
e64c9863b5 BOLT 3: add description of remote_htlcpubkey in Key Derivation. 2018-12-06 21:30:01 +09:00
Hiroki Gondo
56ada3d85c BOLT 3: commitment number not commitment transaction number.
Be consistent.
2018-11-29 04:24:28 +00:00
Orfeas Litos
24d5d33d67 Specify valid signature hash flags (SIGHASH_ALL)
Clarify that this flag is only used for signing and not transmitted
2018-11-29 04:18:04 +00:00
Mykola Sakhno
8e62fd3a08 BOLT 3: fix private key in internal part 2018-11-29 04:17:43 +00:00
Hajime Yamaguchi
a9195a84d0 BOLT 3/BOLT 7: Fix broken links. 2018-08-07 00:07:26 +00:00
Janus Troelsen
5c11b6a402 Fix TOC indentation and links 2018-06-25 10:58:03 +00:00
Carsten Otto
acfd90e009 fix fee calculation numbers 2018-06-11 11:18:16 +00:00
Li Xuanji
a495b3a74f Define P2WSH earlier 2018-04-11 03:42:05 +00:00
practicalswift
316882fcc5 Use a vs an consistently 2018-02-20 01:12:29 +00:00
Rusty Russell
4c8cb512d0 BOLT 2,3,5: always refer to shared/pubkey/private key.
Make it clear what kind of key we're talking about.  We use the abbreviation
pubkey for public key (as it's quite common to use in field names), but
generally spell out 'private'.

(I generally prefer 'secret' to 'private' but we use private far more often
already, and we use 'secret' for things which don't directly derive keys).

Fixes: #368
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 01:10:38 +00:00
Shannon Appelcline
852f1904f6 Updates for FIXMEs 2018-02-05 23:49:32 +00:00
Shannon Appelcline
9a04862469 BOLT-3 Edits
This is my final first-pass BOLT. Some grammar changes, some remote/local additions, a few questions.
2018-02-05 23:49:32 +00:00
Rusty Russell
ee5f4352bb BOLT 3: closing tx must also round outputs down to whole satoshis.
We specify this for the commitment tx, but not for the closing tx.

Reported-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-05 19:19:10 +00:00
practicalswift
2c3466a2af Remove trailing whitespace 2018-01-30 04:54:31 +00:00
William Casarin
b2960b4267 transactions: fix broken anchor links
Signed-off-by: William Casarin <jb55@jb55.com>
2018-01-22 14:01:01 +01:00
Rusty Russell
47b8851037 BOLT 3: note that key derivation test vectors apply to HTLC keys too.
Reported-by: Matt Corallo
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-22 13:58:45 +01:00
Matt Corallo
2551b602c5 BOLT 3: fix secret gen requirements layout
It misrenders on GitHub. Matt had a patch which changed the actual
form of the requiremnt, this uses ``` instead.

Based-on-Patch-By: Matt Corallo @TheBlueMatt
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-22 00:40:29 +00:00
Rusty Russell
a83f2b42e9 BOLT 0, BOLT 3: minor typo fixes.
Reported-by: Shannon Appelcline <shannon.appelcline@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-21 14:39:06 +10:30
Landon Mutch
214e5d7f57 BOLT 3: remove rogue a.k.a. 2017-12-21 04:08:33 +00:00
Landon Mutch
34eec6ce14 BOLT 3: apply a.k.a. abbreviation 2017-12-21 04:08:33 +00:00
Landon Mutch
641c6ab7b1 stylesheet update and apply to BOLT 2,3 2017-12-21 04:08:33 +00:00
Olaoluwa Osuntokun
f4d2d62920 BOLT3: the closing transaction now uses version 2
In this commit, we modify the cooperative closing transaction to use
version 2. Currently eclair and lnd already use version 2, while
c-lightning uses version 1. The commitment transaction already uses
version 2, so making this additional transaction (which spends the
funding output) also use version 2 would be consistent. Additionally,
as a best practice, we should be using the highest currently
defined/use transaction version.
2017-12-11 22:58:56 +00:00
Landon Mutch
5db55df16a BOLT 1,2,3: apply updated stylesheet guidelines for list capitalization, punctuation 2017-12-07 02:36:10 +00:00
Landon Mutch
7a8a5d88dd BOLT 2,3: fix changes requested 2017-11-28 23:11:55 +00:00
Landon Mutch
cd3c49eb88 BOLT 3: fix typo 2017-11-28 23:11:55 +00:00
Landon Mutch
785d69de41 BOLT 3: complete first pass copy-edit according to stylesheet guidelines; 2017-11-28 23:11:55 +00:00
Landon Mutch
f23e3dd56b BOLT 1,2,3: first pass copy-edit;
BOLT 1,2: minor header spacing fixes
BOLT 3: first pass copy edit, according to capitalization, formatting stylesheet guidelines;
2017-11-28 23:11:55 +00:00
Rusty Russell
4f91f0bb2a htlckey: new basepoint avoid holding the payment secret.
This is stolen from @sstone's #243 "reduce attack surface".

This breaks compatibility, as agreed at the 2017-11-13 meeting.
Note also that it does not update the test vectors.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-14 22:58:11 +00:00
ueno
6d43b28258 fix some links 2017-10-17 07:25:48 +00:00
Pierre-Marie Padiou
2aa9f971af fixed typo htlc->HTLC (#262) 2017-10-12 11:40:05 +02:00
Jim Posen
31ae0035c0 BOLT 03: Correct txid of funding transaction in test vector.
The txid has the wrong endianness since Bitcoin reverses the byte
order of double-SHA256 hashes.
2017-09-25 12:28:40 +09:30
Jim Posen
fc31c379e2 BOLT 03: Remove extra 0x01 byte from private keys in test vectors.
An 0x01 byte is appended to the end of private keys in the test
vectors to mark them as using compressed serialization to derive the
pubkeys. Two of the private keys have two 0x01 bytes appended,
presumably by accident.
2017-09-25 12:28:40 +09:30
Jim Posen
22dfcbabcc BOLT 03: Fix appendix numbers and TOC links. 2017-09-25 12:28:40 +09:30
Jim Posen
a01f4c55d3 BOLT 03: Fix pseudcode for shachain algorithm.
When deriving a secret from a seed and index, the bits of the index
must be iterated in reverse order.
2017-09-25 12:28:40 +09:30
Janus Troelsen
49edc5417f Fix link to localkey-remotekey-local_delayedkey-and-remote_delayedkey-derivation 2017-08-26 16:42:32 +09:30
Rusty Russell
4dc97605cc BOLT 3: define closing transaction.
The only surprise here (maybe?) is that we use the commitment number encoding.
I think that makes sense, but it was unspecified before.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-08 10:05:18 +09:30
Rusty Russell
95e7196560 BOLT 3: fix references to RIPEMD160(revocationkey)
They should be HASH160, aka RIPEMD160(SHA256()).

Closes: #179
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-23 17:56:53 +02:00
Olaoluwa Osuntokun
61b5b3f7b4 BOLT 3: clarify description of revocation key derivation (#170)
This commit attempts to clarify some ambiguity in the way the
revocation key derivation was formerly described. Rather than framing
the description in terms of local vs remote nodes, we instead frame the
description around the _process_ of creating a new commitment
transaction for a remote node,

[ minor typos and remove weird part-sentence -- RR ]
2017-05-20 09:50:51 +09:30
Rusty Russell
f0da3978e9 Underscores for all terms, not just fields.
Plus a few more missing ones, and some consistency fixes in names
as pointed out by Roasbeed and Fabrice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
5f06896403 BOLT 3: instead of ripemd-of-X, use RIPEMD160(X).
This is more specific and clearer.

Reported-by: Olaoluwa Osuntokun <laolu32@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
63edd2e869 BOLT 3: use correct field name for HTLC timeout value.
It's called cltv_expiry in BOLT 2's update_add_htlc.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
407b9927bf BOLT 3: Replace many hyphens with underscores in descriptions.
Not sure how I missed these:
1. funding-pubkey -> funding_pubkey
2. to-self-delay -> to_self_delay
3. per-commitment-point -> per_commitment_point
4. per-commitment-secret -> per_commitment_secret
5. revocation-basepoint -> revocation_basepoint
6. delayed-payment-basepoint -> delayed_payment_basepoint
7. payment-basepoint -> payment_basepoint

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
c0fa965036 BOLT 3: Add URL for BIP69.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
8c0e55ac37 BOLT 4: underscores and backticks everywhere.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
925b39a619 BOLT 3: typo fixes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
5ed243de2d BOLT 3: fix labels on test vectors.
As per ElementsProject/lightning#134 Fabrice points out that to calculate
our own commitment tx, we use the *other* side's revocation basepoint:

	The revocationkey is a blinded key: the remote node provides the base,
	and the local node provides the blinding factor which it later
	reveals

Thus, we fix the test vectors by renaming "local_revocation_basepoint"
to "remote_revocation_basepoint", which is what we should be using.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-24 12:24:24 +10:30
Rusty Russell
e6aa70ebc0 BOLT 3: update test vectors for new scripts and weight calculation.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-08 05:50:44 +10:30
Rusty Russell
aeb6e45d7e BOLT 3: fix internal remote_secret_key documentation.
We didn't update it for 394da29189
"BOLT 3: fix test vector derivation."

This doesn't actually change any results, just fixes an intermediate
calculation.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-08 05:50:44 +10:30
Rusty Russell
7c59d6990b BOLT 3: update numbers in example calculation.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-08 05:50:44 +10:30
Rusty Russell
392008a7d3 BOLT 3,5: update weight calculations for revocation key hash in script.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-08 05:50:44 +10:30
Rusty Russell
a597738b94 BOLT 3: Use revocation key hash rather than revocation key in scripts.
This means more bytes if we need to create a penalty tx, but less for
normal operation:

Witness script for offered htlcs: 139 bytes -> 133 bytes.
Witness script for accepted htlcs: 156 bytes -> 139 bytes.

It's also a little simpler; it's just an OP_IF around the old scripts
to test for the revocation key being the top arg.

Suggested-by: Joseph Poon <joseph@lightning.network>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-08 05:50:44 +10:30
pm47
557db43378 make htlc outputs of the commitment tx spendable with revocation key
(Merge conflict in test vectors fixed by selecting Pierre's, will have to
 be re-evaluated).

Closes: #105
2017-03-07 09:21:40 +10:30
Rusty Russell
034c234829 BOLT 2,3: SHOULD NOT create malleable funding tx.
But note that our funding transaction example is.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-07 06:39:28 +10:30
Rusty Russell
dc0b529161 BOLT 3: update test vectors for ec99f893f3
The weights of HTLCs were corrected by Pierre in "fixed htlc weight
calculation": this adjusts the test vectors to match.

This also means that the feerate thresholds change.

In addition, this fixes feerate on "maximum feerate" tests,
and corrects the fee for the htlc-timeout tx.

Reported-by: Fabrice Drouin <fabrice.drouin@acinq.fr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-22 09:59:37 +10:30
Rusty Russell
0801f05795 BOLT 3: Note the HTLC number when annotating witness scripts.
This is more distinctive than amount.

No normative changes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-22 09:59:37 +10:30
Rusty Russell
394da29189 BOLT 3: fix test vector derivation.
The test vectors themselves were fine, but they're supposed to be derived
from known basepoints (and I was actually testing this with some new code).

I accidentally used the *remote* per-commitment-point, instead of the *local*
per-commitment-point to derive the remotekey/remote_privkey; since we are
generating the local transaction, this is wrong.  We don't need to know
the remote per-commitment-point at all, in fact.

Thus, the remotekey (and signatures) in the test vectors change.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-22 09:59:37 +10:30
pm47
ec99f893f3 fixed htlc weight calculation 2017-02-10 11:33:41 +10:30
Rusty Russell
fb5e8667bb bolt3 fix and enhance tx testvectors (#99)
This is a smerge of Fabrice Drouin and my work: he update them, I updated them and enhanced them, he found bugs, I re-derived them, etc.

- rename keys properly
- fix fees
- sign all transactions
- Derive test transaction vectors from minimal subset of parameters.
- rewrite test vectors to test edge cases for trimming.
- add funding tx test vector, make testable on regtest.

This adds a funding transaction test (really, we only specify the output), but importantly adds enough information to duplicate a blockchain with that particular funding tx:

$ rm -rf ~/.bitcoin/regtest/
$ bitcoind -regtest=1 &
$ bitcoin-cli -regtest=1 submitblock  0000002006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910fadbb20ea41a8423ea937e76e8151636bf6093b70eaff942930d20576600521fdc30f9858ffff7f20000000000101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff03510101ffffffff0100f2052a010000001976a9143ca33c2e4446f4a305f23c80df8ad1afdcf652f988ac00000000
$ bitcoin-cli -regtest=1 generate 431
$ bitcoin-cli -regtest=1 sendrawtransaction 0200000001adbb20ea41a8423ea937e76e8151636bf6093b70eaff942930d20576600521fd000000006b48304502210090587b6201e166ad6af0227d3036a9454223d49a1f11839c1a362184340ef0240220577f7cd5cca78719405cbf1de7414ac027f0239ef6e214c90fcaab0454d84b3b012103535b32d5eb0a6ed0982a0479bbadc9868d9836f6ba94dd5a63be16d875069184ffffffff028096980000000000220020c015c4a6be010e21657068fc2e6a9d02b27ebe4d490a25846f7237f104d1a3cd20256d29010000001600143ca33c2e4446f4a305f23c80df8ad1afdcf652f900000000

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-07 11:15:33 +10:30
Rusty Russell
0dd1d383ed BOLT 3: fix trimming typo.
If the htlc amount, after htlc fee is *subtracted*, is less than the dust limit,
trim it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-01 12:42:04 +10:30
Rusty Russell
d907eacbac BOLT 3: use P2WPKH instead of P2PKH.
Not only is it shorter and cheaper, but the rest of the document (including
test vectors and weight calculation) assumed it already.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-31 13:09:53 +10:30
Rusty Russell
76937db387 BOLT 3: minor cleanup.
Remove redundant sentence about commitment txin; it's specified exactly
3 lines later.

Refer to the Commitment Transaction section in "Commitment Transaction
Construction".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-25 16:05:11 +10:30
Rusty Russell
de8be3072d BOLT 3: Spell out how to construct the commitment transaction.
* I add the term "trimmed outputs" for sub-dust outputs; this matters
  for both fee calculation and transaction construction.

* Introduce the concept of "base fee": this is what needs to be
  extracted from the funder.

* The requirements are spread between the different sections, let's
  tie it together in a new section at the end.

* Spell out all the steps in the example which calculates fees.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-25 06:23:28 +10:30
Rusty Russell
1819ff9355 BOLT 3: dust-limit should be dust-limit-satoshis
That's the name of the field in BOLT 2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-25 06:23:28 +10:30
Rusty Russell
b29269419a BOLT 3: Fix amounts in example.
Since we changed from / 1024 to / 1000 in fddc992b2d, the example is
out-of-date.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-25 06:23:28 +10:30
Rusty Russell
30e0cc6782 BOLT 3: Fix one-letter URL typo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-24 06:55:45 +10:30
Rusty Russell
6aaa9322a1 BOLT 3: Add test vectors for key derivation. (#83)
* BOLT 3: Add test vectors for key derivation.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-24 06:52:29 +10:30
Rusty Russell
fddc992b2d BOLT 2, BOLT 3: fee-per-kw kilo == 1000, not 1024.
I checked the bitcoin source to be sure, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-22 16:17:30 -08:00
Christopher Jämthagen
f1eaa25446 BOLT 3: Use 0x20 as high byte for locktime in commitment transaction
The most significant byte of the locktime in a commitment transaction
must be set to 0x20. This is to make sure that the locktime value
is always higher than 500,000,000, making it interpreted as a Unix
epoch timestamp, and not a block height. It also makes sure that the
locktime is below the current time, allowing the commitment transaction
to be included in a block.

Since the sequence field in the input of the commitment transaction is
used for the other half of the obscured commitment transaction number,
it will never assume the maxInt value (0xFFFFFFFF) which would disable
locktime checking.
2017-01-13 22:57:14 +01:00
Christopher Jämthagen
2045d6d632 witnessScript is part of witness + null dummy for OP_CHECKMULTISIG (#70)
* Add null dummy consumed by OP_CHECKMULTISIG
* scriptsig -> witness.
* witness script -> witness.
2017-01-04 16:09:18 +10:30
pm47
7751ee11f2 added test vectors for transactions 2017-01-04 15:55:41 +10:30
pm47
2c4cd03b4c added a section about who pays the fee 2017-01-04 15:55:41 +10:30
pm47
4339f033e6 moved weight computation to Appendix section, fixed index 2017-01-04 15:55:41 +10:30
Pierre-Marie Padiou
856331e347 fixed numbering 2016-12-21 11:44:15 +01:00
Fabrice Drouin
d02681a53b BOLT 3: fix fee computations
1. HTLC must be able to pay for their HTLC success/timeout transaction fees
2. add examples
2016-12-21 14:55:26 +10:30
Pierre-Marie Padiou
bf68c6253e fixed typo 2016-12-20 19:00:58 +01:00
pm47
951fe14775 added a table of contents to bolt3 2016-12-20 16:43:08 +01:00
fivepiece
66ffc6c624 BOLT 3: Fix funding output script
remove `0` from the funding output script as it is not part of a normal 2-of-2 multisig script
2016-12-18 10:36:49 +10:30
pm47
93f948cbd9 typos and consistency 2016-12-13 15:44:14 +01:00
Rusty Russell
125b9a3657 BOLT 3: Fix commitment transaction input sequence number.
From BIP 68:

	If bit (1 << 31) of the sequence number is set, then no consensus
	meaning is applied to the sequence number and can be included in any
	block under all currently possible circumstances.

Which is what we want.

Reported-by: Olaoluwa Osuntokun <laolu32@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-12 11:13:29 +10:30
Rusty Russell
2f998f3741 BOLT 3: make upper bits of commit tx locktime and sequence explicit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-12 10:38:10 +10:30
Christopher Jämthagen
f8f5fa6312 Make it clear that lower 24 bits of locktime is lower 24 bits of the obscured commitment transaction number 2016-12-12 10:37:45 +10:30
Christian Decker
3378afe028 trivial: Consolidating inline code
Now using `<>` on inline code only when part of a script and extra
emphasis is warranted. Outside of scripts the variable names are
already highlighted, so no need to add further emphasis.
2016-12-11 11:08:53 +10:30
Christian Decker
71514b92df trivial: Minor markup fixes 2016-12-11 11:08:53 +10:30
Christopher Jämthagen
6e4f7f0cc2 Consistently use 'transaction' instead of 'tx' 2016-12-09 10:41:48 +01:00
Rusty Russell
e6faf71c30 BOLT 3: Add test vectors for per-commitment-secret generation
These were generated (and recovery tested) by the command-line tool at:

	https://github.com/rustyrussell/ccan/tree/master/ccan/crypto/shachain/tools

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-08 11:00:05 +10:30
Christopher Jämthagen
6750398c97 Some spelling and language fixes in BOLTs 3,4,5 2016-12-07 10:04:57 +01:00
Rusty Russell
aa594c2608 BOLT 3: per-commitment not per-commit.
Be consistent.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-02 11:45:01 +10:30
Rusty Russell
10f49ecb84 BOLT 3: Fix incorrect secret derivation.
There was talk of using a simple increment, but it was removed after
Tadge educated me.  Somehow this didn't get updated.

Reported-by: Tadge Dryja <tdryja@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-01 11:53:29 +10:30
Rusty Russell
e88dd27d12 BOLT 3: expand and correct HTLC transaction weights.
Inspired by Andrew Shvv's work, this expands the HTLC weight calculation
and fixes the gross errors (the witness program itself wasn't counted in
the weights!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-30 06:58:27 +10:30
Rusty Russell
970b39a40d BOLT 3: Note assumption about to-remote output existing.
Commit a0c4f7cfd1 "BOLT 3: add more detailed commitment transaction
estimation (#26)" simplified the weight formula to assume there was a
to-remote output.

This worst-case 18% error, but it's simple.  Document it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-30 06:58:27 +10:30
andrew.shvv
a0c4f7cfd1 BOLT 3: add more detailed commitment transaction estimation (#26)
* add more detailed estimation
* fix miscalculations
2016-11-30 06:50:05 +10:30
Rusty Russell
1a1dc1e70f Merge pull request #22 from lightningnetwork/fix-fee-calc
BOLT 3: Fix fee calculation.
2016-11-28 13:17:29 +10:30
Fabrice Drouin
de87eaa147 BOLT 3: fix witness scripts
1. Add a short paragraph on P2WSH (the witness script is omitted for brevity in all descriptions) and fix witness scripts for spending the different tx outputs.
2. use CHECK(MULTI)SIG instead of CHECK(MULTI)SIGVERIFY
3. Fix order and nulldummy for witness in HTLC transactions
4. Fix a minor typo (if -> it)

(Commits rebased and squashed together by Rusty)
2016-11-24 11:05:31 +10:30
Rusty Russell
1e7e21b5c6 BOLT 3: Fix fee calculation.
I forgot to add in the amount+scriptsize overhead for each HTLC.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-24 10:56:13 +10:30
Christian Decker
4dde8e6a26 Merge pull request #18 from lightningnetwork/license
Add CC-BY.
2016-11-23 15:49:46 +01:00
Rusty Russell
5f5f87d124 Merge pull request #10 from lightningnetwork/feerate
BOLT 02/03: Add fee calculation details.
2016-11-23 06:27:50 +10:30
Rusty Russell
193bbef972 Add CC-BY.
Closes: #2
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-23 06:22:59 +10:30
Fabrice Drouin
f51f5c8690 'to-local output': add revocation key
The 'to local' output in the commit tx should be spendable without delay if you know the revocation key.
2016-11-22 15:33:07 +01:00