Commit Graph

18 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
9324a503c9
lnwire: allow up to 35-bytes in pkScripts to account for P2WSH 2017-04-19 16:04:46 -07:00
Olaoluwa Osuntokun
f6b3c25f95
lnwire: on Message interface convert Command to MsgType
This commit modifies the Message interface to convert the Command
method to a MsgType method that uses a new set of message type for all
the defined messages. These new messages types nearly exactly match the
message types used within the current draft of the BOLT specifications.
2017-04-19 15:57:50 -07:00
Olaoluwa Osuntokun
c8d978261b
lnwire: remove the Validate method from the Message interface
This commit revues the Validate method from the Message interface as
the method is no longer used and is a relic from an older version of
the codebase.
2017-04-19 15:03:51 -07:00
Olaoluwa Osuntokun
c06894a2e6
lnwire: replace ChannelPoint with ChannelID, use new PendingChanID 2017-04-16 15:22:27 -07:00
Andrey Samokhvalov
61991a1c89 lnd: fix latest goclean.sh lint warning 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov
fd97a4bd19 lnd: partially fix golint warnings 2017-03-13 16:30:23 -07:00
bryanvu
e549a3f0ed fundingmanager: move final funding steps from wallet to funding manager.
Once a channel funding process has advanced to the point of broadcasting
the funding transaction, the state of the channel should be persisted
so that the nodes can disconnect or go down without having to wait for the
funding transaction to be confirmed on the blockchain.

Previously, the finalization of the funding process was handled by a
combination of the funding manager, the peer and the wallet, but if
the remote peer is no longer online or no longer connected, this flow
will no longer work. This commit moves all funding steps following
the transaction broadcast into the funding manager, which is available
as long as the daemon is running.
2017-02-24 11:37:33 -08:00
Trevin Hofmann
40c7bac3aa multi: fix a variety of typos throughout the repo 2017-01-17 17:02:56 -08:00
Olaoluwa Osuntokun
d884efea29
lnwire+lnd: Make Logging Messages Great Again
This commit modifies the login of sent/recv’d wire messages in trace
mode in order utilize the more detailed, and automatically generated
logging statements using pure spew.Sdump.

In order to avoid the spammy messages due to spew printing the
btcec.S256() curve paramter within wire messages with public keys, we
introduce a new logging function to unset the curve paramter to it
isn’t printed in its entirety. To insure we don’t run into any panics
as a result of a nil pointer defense, we now copy the public keys
during the funding process so we don’t run into a panic due to
modifying a pointer to the same object.
2017-01-14 17:52:18 -08:00
Olaoluwa Osuntokun
35776a9906
lnwire: add new 'PushSatoshis' field to SingleFundingRequest
This commit adds a new paramter to the initial channel creation:
‘PushSatoshis’. This new field allows the funder of a channel to push
over a certain amount to the responder as part of the initial channel
state. This ability creates a new streamlined UX of finalizing a
payment as a part of the channel creation.
2017-01-09 17:24:32 -08:00
Olaoluwa Osuntokun
81767eb8fd
lnwire: add IncorrectValue as HTLC error type, fix typos
This commit adds a new HTLC error type: IncorrectValue. This error type
is to be used when an HTLC that’s extended to the final destination
does not match the expectation of the destination.
2017-01-07 21:21:58 -08:00
Andrey Samokhvalov
c731156ac8 lnwire: add DustLimit to SingleFundingRequest and SingleFundingResponse 2016-12-13 11:01:57 -08:00
Olaoluwa Osuntokun
fd02c1c1aa
lnwire: update single funder workflow to use revocation keys
This commit updates the messages sent during a single funder workflow
to utilize revocation keys rather than revocation hashes. This now
matches the latest updates to the commitment transaction.

The changes to the workflow are as follows:
  * the response message now carries the responder’s revocation key
  * the complete message now carries the initiator’s revocation key

Once the initiator receives the response message, it can construct both
versions of the commitment transaction as it now knows the responder’s
commitment key. The initiator then sends their initial revocation key
over to the responder allowing it to construct the commitment
transactions and give the initiator a sig for their version.
2016-06-30 11:50:27 -07:00
Olaoluwa Osuntokun
3c11006b12
lnwire: add forgotten godoc comment for SFR 2016-06-21 13:13:10 -07:00
Olaoluwa Osuntokun
6c7880ef76
lnwire: channels are now identified by outpoint
This commit modifies most of the wire messages to uniquely identify any
*active* channels by their funding output. This allows the wire
protocol to support funding transactions which open several channels in
parallel.

Any pending channels created by partial completion of the funding
workflow are to be identified by a uint64 initialized by both sides as
follows: the initiator of the connection starts from 0, while the
listening node starts from (1 << 63). These pending channel identifiers
are expected to be monotonically increasing with each new funding
workflow between two nodes. This identifier is volatile w.r.t to each
connection initiation.
2016-06-21 13:13:07 -07:00
Olaoluwa Osuntokun
4d763e07f7
lnwire: add basic encode/decode tests for single funder workflow 2016-05-30 20:52:13 -07:00
Olaoluwa Osuntokun
3bf2d62035
lnwire: document start of single funder workflow
This commit adds some additional documentation in the form of comments
to the start of the revised single funder workflow.

A primary change lies in the introduction of the exchange of Channel
Derivation Points (CDP’s) for both sides. Using CDP’s we can derive
channel authentication proofs which are both unforgettable and binding.
2016-05-23 13:40:45 -07:00
Joseph Poon
566bf47cbf Wire update
More in sync with other code! :D
2016-05-17 21:28:42 -07:00