rgb-cln/bitcoin
Rusty Russell 1245ffaae3 script: add check for 32-byte preimage.
We need to enforce this onchain as we do in the protocol off-chain,
otherwise we can have an onchain redemption we can't redeem upstream
via the protocol.  While Laolu points out there's a 520 byte limit on
witness stack element, that can still make for a larger tx and make
problems for the steal tx case.

The downside is that even the timeout transaction, which used to spend
the HTLC with an empty 'secret', now needs a 32-byte secret, making it
a little larger.  We create a 'bitcoin_witness_htlc' helper for this
case.

See: http://lists.linuxfoundation.org/pipermail/lightning-dev/2016-May/000529.html

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-03 11:28:50 +09:30
..
test utils: tal_hexstr() helper. 2016-05-03 11:28:49 +09:30
Makefile
README
address.h misc: remove some unused functions. 2016-04-24 19:33:13 +09:30
base58.c
base58.h
block.c bitcoind: use correct endianness for block hashes. 2016-04-24 19:41:20 +09:30
block.h bitcoind: use correct endianness for block hashes. 2016-04-24 19:41:20 +09:30
locktime.c
locktime.h
privkey.h
pubkey.c
pubkey.h
script.c script: add check for 32-byte preimage. 2016-05-03 11:28:50 +09:30
script.h script: add check for 32-byte preimage. 2016-05-03 11:28:50 +09:30
shadouble.c
shadouble.h
signature.c misc: remove some unused functions. 2016-04-24 19:33:13 +09:30
signature.h misc: remove some unused functions. 2016-04-24 19:33:13 +09:30
tx.c Remove unused script functions now we use witness. 2016-04-24 20:09:39 +09:30
tx.h Remove unused script functions now we use witness. 2016-04-24 20:09:39 +09:30
varint.c
varint.h

README

These are standard bitcoin manipulation routines which should be
provided by any normal bitcoin library in whatever language you choose.

The ones here are standalone ones taken from bitcoin core and some I
wrote, many taken from bitcoin-iterate and pasted in here.