Commit Graph

72 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
0e74672797
lnwallet: use InputScripts struct within ChannelReservation
This allows the reservation workflow to support pure witness program
outputs, as well as witness programs nested within p2sh.
2016-05-03 20:06:44 -07:00
Olaoluwa Osuntokun
163eb8dcb8
lnwallet: remove FundingType enum
Removing as segwit is now the path forward.
2016-05-03 20:06:30 -07:00
Olaoluwa Osuntokun
983294c444 lnwallet: set OpenChannel's internal db pointer 2016-03-24 00:01:17 -07:00
Tadge Dryja
2815afebb7 update imports to github 2016-01-16 10:45:54 -08:00
Olaoluwa Osuntokun
07b0d5ca3e lnwallet: once the reservation workflow is complete, wait then open the payment channel
* Hooks into the ChainNotifier infrastructure to receive a notification
once the funding transaction gets enough notifications.
* Still need to set up the notification grouting within a
LightningChannel to watch for uncooperative closures, and broadcasts
and revoked channel states.
2016-01-14 23:58:04 -08:00
Olaoluwa Osuntokun
b2cb33c3c2 lnwallet: add documentation to ChannelReservation
* Workflow along with expected call orders have been documented.
* With this, the initial iteration of ChannelReservation is mostly
complete.
* However, there are still some unfinished steps internally within the
wallet related to processing. Such as factoring proper tx fees,
splitting fees, some node interaction etc.
2016-01-14 23:56:10 -08:00
Olaoluwa Osuntokun
c41f7d1a7d lnwallet: update to 20 byte revocation hashes 2016-01-14 23:56:08 -08:00
Olaoluwa Osuntokun
bc7bdcd22b lnwallet: remove draft wire structs from reservation.go, now lives in lnwire 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
774192ecc7 lnwallet: store their commit sig in channel reservation 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
4fdb2763e6 channeldb: create new channeldb package, update lnwallet to use new API
* Initial draft of brain dump of chandler. Nothing yet set in stone.
* Will most likely move the storage of all structs to a more “column”
oriented approach. Such that, small updates like incrementing the total
satoshi sent don’t result in the entire struct being serialized and
written.
* Some skeleton structs for other possible data we might want to store
are also included.
* Seem valuable to record as much data as possible for record keeping,
visualization, debugging, etc. Will need to set up a time+space+dirty
cache to ensure performance isn’t impacted too much.
2015-12-26 12:35:15 -06:00
Olaoluwa Osuntokun
890ceecc1a lnwallet: csv delay is a uint32, fill forgotten fields in channel state 2015-12-26 00:07:30 -06:00
Olaoluwa Osuntokun
07646d05db move channel state struct to channeldb.go
* All fields are now publicly exported
2015-12-24 12:41:15 -06:00
Olaoluwa Osuntokun
e762d328fa lnwallet: add ChannelContribution, finalize ChannelReservation API/workflow
* Final workflow has been greatly simplified.
* Interaction is now:
   * init
   * add contribution
   * complete
2015-12-22 22:30:11 -06:00
Olaoluwa Osuntokun
829f67f33e lnwallet: CompleteReservation now includes sig for commit tx 2015-12-21 15:54:33 -06:00
Olaoluwa Osuntokun
584fc9b620 lnwallet: AddFunds is now AddContribution, accounts for commitment tx
* Contribution from remote host necessary to construct the initial
commitment transaction is now also expected
* All message structs and handlers updated accordingly
* AddContribution now also generates both commitment tnxs, and
generates a signature for their version of the commitment transaction
2015-12-21 15:53:34 -06:00
Olaoluwa Osuntokun
e7e546af9a lnwallet/reservation: fundingLockTime is int64 track their revoke hash 2015-12-21 15:49:57 -06:00
Olaoluwa Osuntokun
d7d569b267 lnwallet: track their current commitment sig in channel state 2015-12-21 15:49:34 -06:00
Olaoluwa Osuntokun
d2e3b376ea lnwallet: re-name package to lnwallet, though it was? 2015-12-20 00:00:50 -06:00
Olaoluwa Osuntokun
a689595054 lnwallet: comment out lnwire-like serialization stuff for now 2015-12-18 21:42:49 -06:00
Olaoluwa Osuntokun
2f7a801dcb lnwallet: embed channel state within ChannelReservation 2015-12-18 21:39:51 -06:00
Joseph Poon
39b100b865 Serialize Funding Request and script for CLTV-only 2015-12-18 11:29:35 -08:00
Olaoluwa Osuntokun
147748d178 rename wallet to lnwallet 2015-12-16 14:51:59 -06:00