Post
Topic
Board Development & Technical Discussion
Re: Why LN needs SegWit?
by
stdset
on 10/12/2016, 07:55:51 UTC
Thanks for the answers.
With this:
Outputs 0 and 2 aren't needed at all?
I meant of course this:
Alice unilaterally funds it (initial state: Alice: x, Bob: 0)
not a general case.
But thanks for considering general case too.

For a unilateral channel, Bob still needs to provide a deposit during the setup, but gets it back once the channel is setup.
To make it clear, we are still talking about bidirectional channel, it's just the initial state what is unilateral.

The times could be made shorter (1-2 hours), since they are only for initial setup.
Now, when blocks are full, I think it's better not to make times shorter. Otherwise the following can happen:
Let's say Bob becomes uncooperative.
1) Alice waits t hours, claims output 0.
2) Alice's tx is hanging unconfirmed, but since Bob runs a full node, he receives it, gets HA1 from it.
3) Bob immediately claims outputs 2 and 3, his accomplice pool confirms this tx.
4) After 2t hours Alice's tx is still unconfirmed, Bob claims output 0 as well, his pool confirms all Bob's txes.
Only output 1 is left for Alice, everything else is taken by Bob and his pool.

Edit: to make time considerations clearer, let's rewrite tx1 the following way:

Code:
TX1:
0) Pays 1.1*y: (Alice + HA1 after t) or (Bob after (t + T)) or (2 of 2 Alice + Bob)
1) Pays x: (HB1 + Alice) or (2 of 2 Alice + Bob)
2) Pays y: (HA1 + Bob) or (2 of 2 Alice + Bob)
3) Pays 1.1*x: (Bob + HB1 after t) or (Alice after (t + T)) or (2 of 2 Alice + Bob)
4) Pays Alice's change: (Alice)
5) Pays Bob's change: (Bob)
I agree, that t can be safely shortened to several hours, but T must be long enough (a week or even more), so that channel opening could be safely aborted regardless of network congestion.