Why Nostr? What is Njump?
2023-06-09 12:45:40
in reply to

Joseph Poon [ARCHIVE] on Nostr: 📅 Original date posted:2016-02-02 📝 Original message: On Wed, Feb 03, 2016 at ...

📅 Original date posted:2016-02-02
📝 Original message:
On Wed, Feb 03, 2016 at 11:02:50AM +1030, Rusty Russell wrote:
> I guess it depends how we count steps. Each party needs to receive the
> signature for the N+1 commit tx before handing over the Nth revocation
> preimage, but that's the only irreducible constraint isn't it?

Correct, that is a necessity for a secure implementation.

> It's probably simpler to do a three way handshake on every stage, but I
> didn't see that in your protocol?

Unlike a 3-step synchronous commitment, it doesn't wait for the other
party to send their sigantures/revocations and can happen
simultaneously.

Bob's broadcastable Commitment: Alice sends a Signature to Bob. Bob
sends the Revocation of the previous Commitment to Alice.

Alice's broadcastable Commitment: Bob sends a Signature to Alice. Alice
sends to Revocation of the previous Commitment to Bob.

It's that simple. If the HTLC is reflected in both and the previous
commitment(s) is/are revoked, then it's complete.

> If I receive "add request" "add request" "signed commit", how do I know
> what that signatures covers?

The protocol is still being optimized (deprecating the even/odd
structure, etc.), but the structure is both parties have a list of HTLC
modifications which they want to update. When the modification is
acknowledged by the other party, the HTLC modifcation request is staged
into the next Commitment signature. The inclusion of modifications are
enumerated by including both parties' higest HTLC ID (two of them) in
each Commitment signature message.

> Are you required to wait for my accept/reject message replies before
> commiting? Or does the commit message include a counter?

Any which is accepted by the other party is included. Two IDs, one for
each party, is included. Two are necessary to allow for timing issues
with HTLC Add responses in-flight not being fully synced up.

> I guess "asynchronous" is a bit nebulous: out-of-order or in-order? I
> couldn't see a good reason for out-of-order. Whereas letting both
> sides offer updates in parallel makes good sense for throughput...

In-order. I should have an update in the coming days for lnstate if that
helps (various protocol updates, e.g. fixing exchanging of revocation
hashes, etc.)

--
Joseph Poon
Author Public Key
npub1ej6vep7y2km5l6awukffelg8yeppkth2vjkjk9jypd5w336rxggs3p9cq8