At the moment, for our or their unilateral close, we create a resolved[] entry for our output, their output, and each HTLC, in cstate order. Some of these outputs might not exist (too small), so it's actually better to simply keep a resolved[] entry for each of the tx's actual outputs. (We already changed the steal resolved[] array to work like this, but these are trickier, since we rely on that order if we need to fulfill an on-chain HTLC). It also helps as we are weaning off knowing the cstate and permutation mapping for each commitment transaction. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Lightning Protocol Reference Implementation
In this repository we're developing a reference implementation of bitcoin lightning (see: http://lightning.network which proposed the original "lightning network").
This implementation is being developed in parallel with the protocol definition, which you can find on my fork of the protocol description repository.
So far, we are working on the inter-node encryption and transaction negotiation phases.
Later steps will enhance the protocol to network individual daemons, advertise their IP addresses, publish routes and fees, and use that information to pay specific nodes. These details are currently being hashed out on the mailing list and the IRC channel #lightning-dev on Freenode.
Final note: This is very much a testbed and work in progress; expect All The Things to change, all the time.
Welcome aboard!
Rusty.