Rusty Russell
613b65eede
onchaind: use the HSM to get the per-commitment-point.
This means onchaind doesn't need the per-channel secret at all (aka. peer seed)
so we remove that from the onchaind_init message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
14d6fc4a31
onchaind: use HSM for signing htlc transactions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
4098f47cfc
onchaind: use HSM to sign "to-us" transactions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
dd2773dfc0
common/keyset: use struct basepoints rather than open-coding fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
b2b85100d7
common/derive_basepoints: add routines for marshal/unmarshal.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
6c98457ef2
per-peer seed is a 'struct secret' not a 'struct privkey'.
They're both 32 bytes, but it's not a privkey at all.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
c78afa9201
onchaind: use lowball fee instead of donating to miners.
As of bitcoind 0.16.1, you can't send a single-input OP_RETURN output,
as you get 'tx-too-small'.
sendrawtx exit 26, gave error code: -26?error message:?tx-size-small (code 64)?'
So instead we use the minimum fee we can, but otherwise ignore it and
don't wait for it to be mined.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
practicalswift
abf510740d
Force the use of the POSIX C locale for all commands and their subprocesses
7 years ago
Rusty Russell
1764d6c907
grind_htlc_tx_fee: benchmark.
Takes 15 seconds on my laptop to do the worst-case grind:
$ onchaind/test/run-grind_feerate 250001
250001 iterations in 15893 msec = 63574 nsec each
It's not worth optimizing as it's 75% in libsecp:
29.65% run-grind_feera run-grind_feerate [.] secp256k1_fe_mul_inner
23.51% run-grind_feera run-grind_feerate [.] secp256k1_fe_sqr_inner
11.04% run-grind_feera run-grind_feerate [.] secp256k1_gej_double_var.part.6.constprop.34
9.56% run-grind_feera run-grind_feerate [.] secp256k1_scalar_reduce_512
5.70% run-grind_feera run-grind_feerate [.] Round
Even forcing a compile with -O3 -flto, it's only 13883 msec = 55534 nsec each.
Fixes : #291
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
c52222848d
onchaind: support tests.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago