Commit Graph

7659 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
56d31697d1 plasma: skeleton for main method for daemon
* Uses rubbish config atm, just a place holder
2015-12-29 18:23:27 -06:00
Olaoluwa Osuntokun
0620580937 rpcserver: add compile time interface assertion 2015-12-29 17:21:42 -06:00
Olaoluwa Osuntokun
02aa54f127 rpcprotos: rename service so it shows up as LightningServer
* Previously would compile as LightningServerServer…
2015-12-29 17:21:27 -06:00
Olaoluwa Osuntokun
2c42fdb629 rpcserver: server implementation for basic rpc commands 2015-12-29 17:09:38 -06:00
Olaoluwa Osuntokun
b3e821c4d2 lnwallet: make KeyGenMtx public, roc server needs to synchronize 2015-12-29 17:09:32 -06:00
Olaoluwa Osuntokun
1acc528bda rpcprotos: switch amount in sendmany from uint64 to int64
* In order to be compatible with btcutil.Amount
2015-12-29 17:08:04 -06:00
Olaoluwa Osuntokun
dcd9e69d90 rpcprotos: add protos for basic wallet usage 2015-12-29 16:47:24 -06:00
Olaoluwa Osuntokun
e07e7cfec9 lnwallet: actually add the config file 2015-12-29 16:04:23 -06:00
Olaoluwa Osuntokun
7640e57cdc lnwallet: add dirty config 2015-12-29 15:59:57 -06:00
Olaoluwa Osuntokun
f1717b9620 lnwallet: embed btwallet within LightningWallet, exposes all methods publicly
* As a result in order to not over-shadow the Start/Stop methods of
btcwallet.Wallet, the Start/Stop methods on LightningWallet have been
renamed to Startup/Shutdown.
2015-12-29 12:45:31 -06:00
Joseph Poon
6a9011654a "typo" correction 2015-12-29 05:46:51 -08:00
Joseph Poon
ba56797b43 Ohhh... right. 2015-12-29 05:46:03 -08:00
Joseph Poon
1e79ad7236 Minor note 2015-12-29 05:43:07 -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
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
1c4887e746 lnwallet: drop some comments upon script_utils.go 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
7648fee903 lnwallet: note to future roasbeef 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
ef7a2aa553 lnwallet: properly set sequence number in tx for CSV usage 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
1b9d34f614 channeldb: don't store commit sig separately, expected to be within the txin of the commit tx 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
1fd1d87e34 lnwallet/tests: include csv delay in channel reservation init, add doc strings 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
b95eb25595 lnwallet: generate a commitment transaction signature fo bob in wallet_test.go 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
9840585757 lnwallet: actually use 'amount' parameter 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
6eb77b02c2 lnwallet: add comments to wallet.go 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
8ca8eb60fb lnwallet: verify received commitment tx signature is valid 2015-12-29 00:00:29 -06:00
Olaoluwa Osuntokun
695a1e6c45 lnwallet: sign the REDEEMSCRIPT not the p2sh script :) 2015-12-29 00:00:28 -06:00
Olaoluwa Osuntokun
17f37cc254 lnwallet: shutdown rpc connection during stoppage 2015-12-29 00:00:28 -06:00
Olaoluwa Osuntokun
36e7c38812 lnwallet: introduce mutex around coin selection logic 2015-12-29 00:00:28 -06:00
Olaoluwa Osuntokun
7874357384 lnwallet: remove unused struct 2015-12-29 00:00:28 -06: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
Joseph Poon
f51a5a6458 Holy shit pointer crap was annoying! Serialize/deserialize works now.
Running "go test -v" will show the serialization and deserialization.

Doing the rest of the wire stuff should be *much* faster since I figured
everything out...
2015-12-26 23:52:20 -08:00
Joseph Poon
0c0900006d Upon further reflection Our/Their seperation makes no sense 2015-12-26 20:37:17 -08:00
Joseph Poon
b79d0cc65a (still need to fix deserialize... io wasn't working so I'm using bytes) 2015-12-26 18:23:58 -08:00
Joseph Poon
09f07770fd Funding request serialize/deserialize (io reader/writer and pointers
were very confusing -_-;)
2015-12-26 18:20:25 -08:00
Olaoluwa Osuntokun
7990d9501a Merge branch 'master' of li.lan:labs/plasma 2015-12-26 12:35:42 -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
d7a1c5d337 lnwallet: check for nil buckets during fetch in channeldb 2015-12-26 00:12:31 -06:00
Olaoluwa Osuntokun
3e2a753271 lnwallet: touch config smelly 2015-12-26 00:11:39 -06:00
Olaoluwa Osuntokun
a10a678505 add some daemon related skeleton files 2015-12-26 00:09:17 -06:00
Olaoluwa Osuntokun
0307f321ad lnwallet: switch LightningChannel struct to use channeldb instead of raw namespace 2015-12-26 00:08:04 -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
b4e33587b1 lnwallet: switch to using channeldb 2015-12-26 00:05:55 -06:00
Olaoluwa Osuntokun
ff92efe7df lnwallet: add node's ID to reservation workflow 2015-12-26 00:05:07 -06:00
Olaoluwa Osuntokun
4bb526854a lnwallet: fix bug don't set TheirCommitSig twice 2015-12-26 00:03:53 -06:00
Olaoluwa Osuntokun
e345f72d69 lnwallet: implement FetchOpenChannel and PutOpenChannel 2015-12-25 18:00:44 -06:00
Olaoluwa Osuntokun
1386d798f5 lnwallet: add tests for serialization of OpenChannelState 2015-12-25 17:00:53 -06:00
Olaoluwa Osuntokun
8e5f028eea lnwallet: create channeldb.go add serialization methods for OpenChannel 2015-12-25 17:00:20 -06:00
Olaoluwa Osuntokun
c2403d4b2d shachain: switch encode/decode methods to use io.Reader/Writer
* Help avoid a bug related to passing a copy of bytes.Buffer into
Encode/Decode instead of a pointer
2015-12-24 12:48:24 -06:00
Olaoluwa Osuntokun
5840786922 lnwallet: save redeemScript in channel state 2015-12-24 12:42:29 -06:00
Olaoluwa Osuntokun
15f15bb3af rename revocation package to shachain
* Constructors now also more in line with “Effective Go”
2015-12-24 12:42:03 -06:00