Commit Graph

6294 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
9a775cf66e add functionality to server for manually establishing outgoing connections 2016-01-16 19:28:19 -08:00
Olaoluwa Osuntokun
1f1b82fe3f add constructor for core server struct 2016-01-16 19:28:16 -08:00
Olaoluwa Osuntokun
7ecbb2debc move getPriv to server.go, and rename 2016-01-16 19:27:20 -08:00
Olaoluwa Osuntokun
4366b1b114 lnrpc: remote Listen/Chat, re-compile proto file 2016-01-16 19:27:02 -08:00
Olaoluwa Osuntokun
4c8b10617a add lnAddr implementation to peer.go, finish peer draft
* With this commit, then initial draft of the peer struct is finished.
Items to still complete include the interaction between the peer and
internal wallet, version handshake, pings, etc.
2016-01-16 19:26:49 -08:00
Olaoluwa Osuntokun
6c51942b03 start http profiling server by default 2016-01-16 19:26:04 -08:00
Olaoluwa Osuntokun
af42bb0a99 lndc: restore new implementation of land 2016-01-16 19:25:44 -08:00
Joseph Poon
f2a1c0368a Cleanup comments & removed notes on escrow 2016-01-16 17:14:35 -08:00
Joseph Poon
84c0f56330 lnwire/README.md: Hopefully this will be legible 2016-01-16 17:11:04 -08:00
Tadge Dryja
85590e0f6c revert to testnet3 params 2016-01-16 11:11:43 -08:00
Tadge Dryja
e03e21ba80 add parse from string 2016-01-16 11:09:12 -08:00
Tadge Dryja
04b83d024e rever to older netio 2016-01-16 11:07:20 -08:00
Tadge Dryja
8469b4fd9f name LNDConn back, put h160 back for now 2016-01-16 10:59:10 -08:00
Tadge Dryja
f81f28c5fe Merge branch 'master' of github.com:lightningnetwork/lnd 2016-01-16 10:46:19 -08:00
Tadge Dryja
2815afebb7 update imports to github 2016-01-16 10:45:54 -08:00
Joseph Poon
c7ccbec2aa README.md: Clarified normalized/segwit & stuff 2016-01-16 10:45:11 -08:00
Tadge Dryja
d47105217b change imports to github.com/lightningnetwork/lnd 2016-01-16 10:38:48 -08:00
Tadge Dryja
5879dae7c0 tweak readme 2016-01-16 00:22:23 -08:00
Tadge Dryja
f6fde399e1 add copyright, license and discouragement in readme 2016-01-16 00:13:11 -08:00
Tadge Dryja
34a958c6ef add / modify / merge to readme 2016-01-15 18:56:57 -08:00
Olaoluwa Osuntokun
9d63a9677d plasma -> lnd 2016-01-15 18:27:19 -08:00
Olaoluwa Osuntokun
230b58adb1 README: add a short description of the rest of the packages within lnd 2016-01-15 18:24:38 -08:00
Tadge Dryja
c4d64372c8 update readme 2016-01-15 13:19:13 -08:00
Tadge Dryja
29a8e81029 spv sync works but more to add 2016-01-15 02:40:56 -08:00
Olaoluwa Osuntokun
2792554c41 lndc: separate into Conn and Listener implementations, add basic tests 2016-01-14 23:58:05 -08:00
Tadge Dryja
e6970e132e spv header sync works OK 2016-01-14 23:58:05 -08:00
Tadge Dryja
6cebc7c952 remove odl filter file; in txstore now 2016-01-14 23:58:05 -08:00
Tadge Dryja
65c7d1c40c move elkrem, uspv libs to plasma repo 2016-01-14 23:58:05 -08:00
Joseph Poon
b0ce9a06dc minor edit 2016-01-14 23:58:05 -08:00
Joseph Poon
0d896f7fc1 Typos 2016-01-14 23:58:05 -08:00
Joseph Poon
f3ce558eb1 typo fix 2016-01-14 23:58:05 -08:00
Joseph Poon
5fc1ff52fc Typo correction 2016-01-14 23:58:04 -08:00
Joseph Poon
1981001a29 Started working on state machine
* Added description in lnwire/README.md for state machine
* Figured out mutex stuff...
* Started the State Machine (using dummy functions for net/db)
* Minor corrections in wire protocol (changed some names/types)
    - Renamed StagingID to HTLCKey of type HTLCKey (uint64)
2016-01-14 23:58:04 -08:00
Olaoluwa Osuntokun
0c304cbb2f Flesh out the peer handling skeleton within peer/server 2016-01-14 23:58:04 -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
6e0cfaf7ec lnwallet: re-introduce rpc calls during channel reservation workflow
* In preparation for regression testing once nodetest is finished.
* These sections we’re previously uncommented to allow for testing the
wallet without a full-node hooked up.
2016-01-14 23:58:04 -08:00
Olaoluwa Osuntokun
5f705be63b chainntfs: introduce ChainConnection interface to avoid import cycle and for future tests
* Looks rather hack atm. Put in place so progress can be had with
lnwallet before notes is finished.
2016-01-14 23:58:04 -08:00
Olaoluwa Osuntokun
cf65aaa2c9 lnwallet: have wallet return db so it can be closed during shutdown
* Also remove some extra print statements from debugging
* Separate out logic to create wallet from creating an ID
2016-01-14 23:57:54 -08:00
Olaoluwa Osuntokun
986eb83ceb chainntfs: create new ChainNotifier for bfcd-based notifications
* Currently depends on the wallet, but that will change in the near
future due to new additions to btcwallet currently under review.
* Re-orgs aren’t intelligently handled yet. To be done along with tests
in a later commit.
2016-01-14 23:56:11 -08:00
Olaoluwa Osuntokun
00f2a0d7c0 chainntfs: remove btcd.go
* No longer needed, new package added in next commit.
2016-01-14 23:56:11 -08:00
Olaoluwa Osuntokun
8154b96d67 chainntfs: flesh out initial draft of interface
* So far very simple, only notifications for tx confirmations, and
outpoint spends.
* Our two cases are: waiting for the funding transaction to reach a
depth of N confirmations, and open channels being notified of the
counterpart trying to cheat them by broadcasting an invalidated
commitment tx.
2016-01-14 23:56:11 -08:00
Olaoluwa Osuntokun
f52b8370bc lnwallet: populate the update totem during channel initialization 2016-01-14 23:56:11 -08:00
Olaoluwa Osuntokun
27744a3582 lnwallet: add logic for adding/removing HTLCs
* Updates to the channel are made atomic, and consistent via a proxy
object: “ChannelUpdate” which encapsulates an update transaction. Only
one update transaction may be outstanding at any time.
* Update transactions are initiated via AddHTLC or SettleHTLC.
* Once a transaction has been begun, in order to complete the update
the transaction must first be presented with a signature from the
counter-party for our new version of the commitment tx
(VerifyNewCommitmentSigs), and finally to atomically commit the
transaction, the counterparty’s pre-image to their previous revocation
hash must be validate (Commit).
2016-01-14 23:56:10 -08:00
Olaoluwa Osuntokun
895d70e79f lnwallet: add funding tx p2sh output to lnchannel
* Allows for quick access to the pkScript when signing new commitment
transactions.
2016-01-14 23:56:10 -08:00
Olaoluwa Osuntokun
3fe82f475f lnwallet: correctly adjust cleared funds during AddHTLC
* When adding an HTLC, the update to settled balances are to the side
sending the HTLC.
2016-01-14 23:56:10 -08:00
Olaoluwa Osuntokun
7ec419bde5 lnwallet: add docstrings to script_utils.go 2016-01-14 23:56:10 -08:00
Olaoluwa Osuntokun
f257690788 lnwallet: finish docstrings within coin select code 2016-01-14 23:56:10 -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
Joseph Poon
b4c644c99a Added Error message type to wire protocol 2016-01-14 23:56:10 -08:00
Joseph Poon
f3849f5c10 Structs for Wire Protocol HTLCs and Commitments
* Structs and wire messages for HTLCs
* Wire protocol for a state machine with no blocking(!!!)
  (I will write the state machine)
  TL;DR: Can do multiple HTLC modifications in-flight, dead simple wire
  protocol. Both sides can update their Commitments unliaterally without
  waiting for the other party's signature. Will have basic/preliminary
  notes in the README
* Added **swp to .gitignore because of vim annoyances
2016-01-14 23:56:10 -08:00