Commit Graph

12 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
bba9b665ef
lnwire: all hashes within the protocol are now 32-bytes
We now enforce that the site of all revocation pre-images+hashes (used
for HTLC’s) are now 32-bytes.

Additionally, all payment pre-images are now required to be 32-bytes
not he wire. There also exists a Script level enforcement of the
payment pre-image size at a lower level.

This commit serves to unify the sizes of all hashes/pre-images across
the codebase.
2016-06-30 11:53:21 -07:00
Olaoluwa Osuntokun
913ae259de
lnwire: document commitment+HTLC update msgs
This commit adds some cursory documentation along wit minor field
modifications to all messages which deal with adding HTLC’s, or
updating remote commitment transactions.

The messages for dual funding of channel is left purposefully
undocumented as all initial negotiations will be single funder by
default.

A revamp of the testing infrastructure of lnwire will be committed in
the near future.
2016-05-23 13:54:41 -07:00
Olaoluwa Osuntokun
fcff17c336
multi: change all imports to roasbeef's forks
This commit will allow the general public to build lnd without jumping
through hoops setting up their local git branches nicely with all of
our forks.
2016-05-15 17:22:37 +03:00
Joseph Poon
f2a1c0368a Cleanup comments & removed notes on escrow 2016-01-16 17:14:35 -08:00
Joseph Poon
bf8e0d727d Added ReservationID for funding_requeset 2016-01-14 23:56:09 -08:00
Joseph Poon
84df87255f Oops typo 2016-01-14 23:56:09 -08:00
Joseph Poon
b3f812e5da Notes on payment amount 2016-01-14 23:56:09 -08:00
Joseph Poon
2d3253b95d Cleanup
* Bugfixes
* Removed whether to include sigs in txin for readElement/writeElement
2016-01-14 23:56:09 -08:00
Joseph Poon
0d4c78e90d FundReq/FundResp update / Refactor tests
* Added field
* Renamed FundingAmount and ReserveAmount to specify in FundingRequest
  and FundingResponse that it is for RequesterFundingAmount or
  ResponderFundingAmount
* Added PaymentAmount field to FundingRequest
* Added MinDepth field to FundingRequest and FundingResponse
* Fixed .Serialize() to show inputs/etc. only if there are fields
  available (prevents trying to dereference nil value)
* Add a bunch of Validate() conditions
* MASSIVE REFACTOR of tests (removed tons of redundancy)
2016-01-14 23:56:08 -08:00
Joseph Poon
a93b6dcee4 Messages for funding flow.
This is the most different due to segwit (the rest of the messages are
simple).

I still need to simplify/refactor the tests, they're "messy".
2015-12-30 05:38:57 -08:00
Joseph Poon
02a9b1e237 While making things match closely with Rusty's wire protocol, I noticed
he didn't allow for multiple HTLCs. Gotta explain the rationale for that
that... will merge the progress in the next commit tomorrow.
2015-12-29 05:24:02 -08:00
Joseph Poon
161b1b5e4c Message interface and stuff.
* Added Message interface (similar to btcd's)
* Moved Funding Request to its own file
* Refacored Funding Request Code (*MUCH* better)
* Various fixes
2015-12-28 03:24:16 -08:00