Rusty Russell
f78ea05fc5
test-cli/extract-escape-secret: helper to get escape secret from other side.
...
When other side uses their escape tx, we extract the secret to we
can use our fast-escape.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-24 16:00:11 +09:30
Rusty Russell
7564e3f475
test-cli/create-secret-spend-tx: more general tool to spend secret-or-delay outputs
...
Immediately replaces create-commit-spend-tx and create-steal-tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-24 16:00:11 +09:30
Rusty Russell
ebb068e975
Escape transaction support, test tools to create/check them.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-24 16:00:11 +09:30
Rusty Russell
98d994f930
protocol: add open-complete.
...
This is where we expose the revocation preimages for the escape
transactions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-24 16:00:10 +09:30
Rusty Russell
c03c878afc
Split into two anchors.
...
This is a major change; instead of creating a mutual anchor (funding)
transaction, each side creates its own. We use escape transactions in
case anything goes wrong; these will be revoked later.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-24 16:00:10 +09:30
Rusty Russell
114161a6a5
test-cli/scripts/test.sh: send_after_delay()
...
Extract and generalize: we're about to get more.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-24 16:00:10 +09:30
Rusty Russell
a663dc322c
Remove signature leaking.
...
Alpha has segregated witnesses, so txid doesn't include the inputs.
That means we can create the first commit transaction before we sign
the anchor tx.
Bitcoin will need to do this differently: presumbly via new sipops
(a OP_CHECKSIG2VERIFY I imagine).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-03 14:00:54 +09:30
Rusty Russell
c660629760
test.sh: (alpha) make sure that spending tx fails too soon, succeeds after delay.
...
This only makes sense when we have CSV support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-03 10:47:29 +09:30
Rusty Russell
20bb6c65aa
protocol fix: use locktime from *other* side.
...
Which emerged clearly when setting one side's locktime differently than
the other.
Each side specifies the (minimum) time they need to notice a fraud attempt:
this constrains the *other* side.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-03 10:44:49 +09:30
Rusty Russell
90e4160862
test.sh: handle appended amounts in transactions.
...
cut -d: -f1 gets just the transactions, or passed through if no ":".
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-01 16:55:11 +09:30
Rusty Russell
9851436d4d
test.sh: restore --steal and --unilateral options
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-07-01 16:27:52 +09:30
Rusty Russell
783aa35aa6
Make test.sh inputs script arguments.
...
Hardcoding my defaults isn't useful. Even for me.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-06-30 12:54:48 +09:30
Rusty Russell
f38382fd3c
test.sh: handle variances in bitcoin-cli formatting.
...
In particular, there may or may not be a space between "pubkey" and :.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-06-30 12:34:35 +09:30
Rusty Russell
8f4426e09b
scripts: move to scripts/ subdir, prepare for alpha.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2015-06-30 12:08:18 +09:30