Commit Graph

45 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
5296df5d4d
build: update to latest version of roasbeef/btcutil and ltcsuite/ltcd
In this commit we’ve updated to the latest versions of roasbeef/btcutil
and ltcsuite/ltcd. With this change we fix two bugs:
  * The Bech32HRPSegwit parameter wasn’t being copied over in
applytLiteCoinParams
   * btcutil.DecodeAddress wasn’t properly using the passed net params
2017-09-01 02:16:24 -07:00
Olaoluwa Osuntokun
af52aa838e
build: update glide commit hash to latest btcd+neutrino
This commit updates the glide hashes for btcd, neutrino, and btcwallet
to their latest versions. This change was prompted, as we've recently
fixed two bugs: one in btcd, and one in neutrino. The btcd in btcd was
due to not properly setting a pointer, which caused the new gcs related
RPC calls to now respond correctly. The neutrino bug was due to a nil
pointer panic that was triggered by not ensuring that we actually had a
`syncPeer` before referencing it.
2017-08-29 15:38:42 -07:00
Olaoluwa Osuntokun
19a843016e
build: update glide.lock to point to latest ltcd 2017-08-25 18:04:14 -07:00
Olaoluwa Osuntokun
ac128e4545
build: update glide files to point to latest btcsuite repos
This commit updates the glide packages in the repo to point to the
latest btcsuite repos. With this change, we’ll now be able to take
advantage of many of the recent updates to the btcsuite package of
repos. One highlight is that after this commit, we’ll now be using
bech32 by default for p2wkh addresses.
2017-08-24 18:44:58 -07:00
Olaoluwa Osuntokun
1c22242a41
build: update glide files to track latest gRPC related repos/commits 2017-08-22 00:54:02 -07:00
Alex
662731e719 macaroons: add macaroons package and update glide 2017-08-17 19:20:41 -07:00
Olaoluwa Osuntokun
8369ae9b92
build: update glide files to point to latest neutrino build 2017-08-02 21:22:08 -07:00
Olaoluwa Osuntokun
e840f43db4
build: update glide to track latest lightning-onion commit 2017-07-30 20:22:21 -07:00
Olaoluwa Osuntokun
d43a660cb1
build: update to latest version of neutrino+btcwallet
The latest builds of neutrino and btcwallet include a number of
performance optimizations that should speed up the sync of neutrino
nodes while ensuring all the pessary data is in place for re-org
safety.
2017-07-14 18:36:03 -07:00
Olaoluwa Osuntokun
9c16319e0d
build: update to latest build of the sphinx processing package
This new build of lightning-onion includes the routines necessary to
implement the encryption and decryption of HTLC errors as defined
within the specification.
2017-07-13 23:50:52 -07:00
Olaoluwa Osuntokun
cc8008d5e1
build: update glide file to point to latest version of btcwallet
A rather nasty re-org related bug was recently fixed in the upstream
version of roasbeef’s btcwallet. In order to fix this within the main
lnd build, we update the glide files such that the latest changes will
be pulled in.
2017-07-11 16:29:43 -07:00
Olaoluwa Osuntokun
4c3e24567e
build: update new logging related dependancies to latest versions 2017-07-06 14:36:16 -07:00
Andrey Samokhvalov
8fa2b95c12 lnd: remove seelog logger
The btclog package has been changed to defining its own logging
interface (rather than seelog's) and provides a default implementation
for callers to use.

There are two primary advantages to the new logger implementation.

First, all log messages are created before the call returns.  Compared
to seelog, this prevents data races when mutable variables are logged.

Second, the new logger does not implement any kind of artifical rate
limiting (what seelog refers to as "adaptive logging").  Log messages
are outputted as soon as possible and the application will appear to
perform much better when watching standard output.

Because log rotation is not a feature of the btclog logging
implementation, it is handled by the main package by importing a file
rotation package that provides an io.Reader interface for creating
output to a rotating file output.  The rotator has been configured
with the same defaults that btcd previously used in the seelog config
(10MB file limits with maximum of 3 rolls) but now compresses newly
created roll files.  Due to the high compressibility of log text, the
compressed files typically reduce to around 15-30% of the original
10MB file.
2017-06-25 14:19:56 +01:00
Olaoluwa Osuntokun
3efd3c4f8c
build: update glide to point to the latest version of lighting-onion 2017-06-10 18:15:31 -07:00
Olaoluwa Osuntokun
885cc6b216
build: update glide to point to latest neutrino build 2017-06-08 22:26:40 -07:00
Olaoluwa Osuntokun
af8d12ee1d
build: update glide files to latest optimized version of neutrino 2017-06-07 17:02:19 -07:00
Olaoluwa Osuntokun
e43412b820
build: update glide files to add neutrino, latest roasbeef forks 2017-06-05 19:41:04 -07:00
Olaoluwa Osuntokun
4e7ddad258
build: update glide to pull in github.com/ltcsuite/ltcd/chaincfg 2017-05-02 19:58:15 -07:00
Olaoluwa Osuntokun
f9c78b7c2b
glide: update pinned btcwallet version to include latest bug fix
This commit updates the version of btcwallet that and is pinned against
to point to a version that includes a bug fix that was noticed in the
latest upstream PR’s we’ve included. The culprit bug would attempt to
create a write transaction inside of a greater read transaction which
would cause boltdb to block indefinitely internally. roasbeef’s fork of
btcwallet has been updated to include this fix.
2017-04-24 16:15:22 -07:00
Olaoluwa Osuntokun
453e285ac4
glide: pin gRPC version against the commit hash of 1.2.1
We now pin gRPC against a particular commit version as it seems that
glide has some trouble properly resolving the semantic versioning
constraints for the latest version of gRPC.
2017-04-23 19:11:20 -07:00
Olaoluwa Osuntokun
44e8704105
glide: update btcwallet vendor to newest version
This commit updates the version of btcwallet to the newest version
available in roasbeef’s fork. This new version includes the following
changes:
   * a fix for the ping/pong deadlock issue with an expiring session
   * and a preliminary merging of r btcsuite/btcwallet#469 into
roasbeef’s fork

The first change should solve an issue of lnd’s internal wallet
(btcwallet) being disconnected from the local btcd node. And the second
change should improve the reliability/correctness of the wallet as the
wtxmgr (tx/utxo store) and the waddrmgr (key store) are now updated
under a _single_ database transaction.
2017-04-23 19:10:04 -07:00
Olaoluwa Osuntokun
7a990b3b10
build: update glide to add usage of salsa20 2017-04-16 15:45:54 -07:00
Olaoluwa Osuntokun
cabaf1816b
build: pin btcd fork against particular commit hash in glide 2017-03-29 19:00:28 -07:00
Olaoluwa Osuntokun
65c15c4cb0
build: update glide to pin against latest version of lighting-onion 2017-03-27 17:08:50 -07:00
Travis Cline
d24ca76754 lnrpc: update protoc invocation
This commit reflects an upstream change in grpc-gateway.

- regenerate proto output
- add genprotos dep, updated glide deps
2017-03-27 16:32:20 -07:00
Olaoluwa Osuntokun
9234956a34
brontide: replace aead/chacha20 with x/crypto/chacha20poly1305
This commit replaces aead’s chacha20 library with the official golang
implementation. We should see a bit of a performance increase on amd64
as the assembly for the library uses the SIMD AVX2 instructions in the
inner loop. In the future assembly will be written for other platforms,
so we’ll see a performance increase across the board.

Fixes #146.
2017-03-15 19:03:24 -07:00
Olaoluwa Osuntokun
f217093c00
multi: replace usage of fastsha256 with crypto/sha256
This commit removes all instances of the fastsha256 library and
replaces it with the sha256 library in the standard library. This
change should see a number of performance improvements as the standard
library has highly optimized assembly instructions with use vectorized
instructions as the platform supports.
2017-03-15 18:56:41 -07:00
Olaoluwa Osuntokun
e1354dca45
glide: modify btcwallet target to version that auto reconnects
This commit modifies the glide target for btcwallet to pin against a
particular commit that will attempt to auto-reconnect to the btcd node
in the case of a websockets connection drop.
2017-03-08 15:25:51 -08:00
Olaoluwa Osuntokun
3ec4eeb5e2
cmd/lncli: add ability to render graph to 'describegraph'
This commit adds an ability to render the channel graph as returned by
the ‘displaygraph’ command. The rendering of the graph itself is
carried about the by the ‘dot’ command which eventually calls out to
graphviz.

Currently the graph is always saved to the same file in the local
directory, but in a later commit the location of the file will be made
configurable.

Finally, the attributes sent to the ‘dot’ command used to render the
graph are still a bit in flux. The parameters will likely be tuned once
the channel graph on testnet grows a bit more.
2017-01-23 20:32:23 -08:00
Olaoluwa Osuntokun
6405b1c8b3
glide: pin sphinx package dependency at the commit level
With this commit we now pin the version of lightning-onion we build
against at a particular build on the Sphinx package as the package will
be modified in order to accommodate for future changes in the spec.
2017-01-16 17:41:20 -08:00
Olaoluwa Osuntokun
d7b36c6f31
build: update glide dependancies since roasbeef/btcsuite upstream merge 2017-01-05 14:08:43 -08:00
Olaoluwa Osuntokun
bd0cf51581
zpay32: create new package for encoding/decoding payment requests
This commit adds a new package “zpay32”: which is used within the
daemon to encode/decode payment requests. A payment request currently
consists of: the public key of the payee, the payment hash to use, and
finally the amount to send over the network. The encoded payment
request consists of the mentioned fields concatenated to each other, a
cc32 checksum is added, then the blob is finally encoded using zbas32.
I call the resulting scheme “zpay32”.

A number of extensions may be explored in future commits including
adding a version byte, adding “hint” routing information,
cryptographically signed receipts and more,
2017-01-02 15:17:58 -08:00
Olaoluwa Osuntokun
e6a0b7bef6
build: update glide to include the connmgr 2016-12-14 18:16:03 -08:00
Olaoluwa Osuntokun
d8e9a378e9
build: update glide to ensure the package hash verifies properly 2016-12-12 15:57:12 -08:00
BitfuryLightning
327768f4ad routing: Move tools inside lnd. Refactor and delete unneeded stuff
Use [33]byte for graph vertex representation.
Delete unneeded stuff:
1. DeepEqual for graph comparison
2. EdgePath
3. 2-thread BFS
4. Table transfer messages and neighborhood radius
5. Beacons

Refactor:
1. Change ID to Vertex
2. Test use table driven approach
3. Add comments
4. Make graph internal representation private
5. Use wire.OutPoint as  EdgeId
6. Decouple routing messages from routing implementation
7. Delete Async methods
8. Delete unneeded channels and priority buffer from manager
9. Delete unneeded interfaces in internal graph realisation
10. Renamed ID to Vertex
2016-11-23 20:37:43 -06:00
Olaoluwa Osuntokun
f37956e38e
routing: update Sphinx API to include r-hash and per-hop-payload
This commit modifies both the Sphinx packet generation and processing
for recent updates to the API.

With the version 1 Sphinx specification, the payment hash is now
included in the MACs in order to thwart any potential replay attacks.
As a result, any attempts to replay previous HTLC packets MUST re-use
the same payment hash, meaning that the first-hop node can simply
settle the HTLC immediately, thwarting the attacker.

Additionally, within the Sphinx packet, each hop now gets a per-hop
payload which contains the necessary details (CTLV value, fee, etc) for
the node to successfully forward the payment. This per-hop payload is
protected by a packet-wide MAC.
2016-10-27 20:40:26 -07:00
Andrey Samokhvalov
e6f45a948e testing: add CT (Custom Testing) structure; create uniq point for 'lnd process errors' and 'test panic/failed errors' handling 2016-10-22 02:11:12 +03:00
Olaoluwa Osuntokun
fd163ccf9d
build: add aead/chacha20 and aead/poly1305 to the glide files
The two new dependancies are needed for the new brontide package which
implements the p2p encryption+auth.
2016-10-17 19:45:40 -07:00
Olaoluwa Osuntokun
566cd86a1d
lnrpc: add cursory REST support to the RPC server
This commit adds a REST interface to the existing gRPC server by
employing a simple http proxy auto-generated from the existing protobuf
files. Currently full-support for any streaming RPC’s are currently
untested. In addition to auto-generating a REST proxy server, a
swagger.json is also generated which allows for gRPC-like native
objects with higher-level clients, and also for auto-generated
documentation.

Due to limitations with accepting raw byte strings as parameters, some
RPC’s have been modified to take both raw-bytes and string arguments.
Additionally a new RPC has been added ‘NewWitnessAddress’ since the
proxy doesn’t currently support enum-based arguments.

Currently the proxy server is embedded within the daemon as an active
HTTP server, however we may want to package the proxy server as a
separate binary in the future. Similarly, we may want to add additional
configuration information which controls the optional inclusion of the
REST proxy.

Atm, just like the current gRPC interface, the REST API is fully
unauthenticated. Before moving to an initial alpha release after making
the necessary changes to meet the spec drafted in Milan, authentication
of the RPC interfaces will be addressed.
2016-10-15 14:39:00 -07:00
Olaoluwa Osuntokun
5402d705ab
build: update the glide files to include the sphinx package and pin the routing package 2016-09-21 19:48:56 -07:00
Olaoluwa Osuntokun
3c4beddee1
build: update glide files to pin against the master branch of roasbeef's btcwallet fork 2016-09-08 12:25:19 -07:00
BitfuryLightning
2bcff188e8 lncli: Add graphical output of routing table
LIGHT-131, LIGHT-140, LIGHT-138
`lncli showroutingtable` may output routing table as image.
Use graphviz for graph rendering.
Add explicit version dependency for tools. Add error checking.
2016-09-06 20:06:51 -04:00
Olaoluwa Osuntokun
3563d0e6b9
build: update glide dependancies 2016-08-11 11:36:37 -07:00
Olaoluwa Osuntokun
13a95be7c0
build: update glide dependancies 2016-07-26 10:43:20 -07:00
Olaoluwa Osuntokun
c8e58147b6
add glide dependency management for fully reproducible builds
This commit adds glide integration in order to make lnd builds fully
reproducible. Rather than using “go get” users should now manually pull down
the repo, use glide to fetch+install the dependancies, then manually install
all related binaries.

With this change we no longer have to chase dependancies making breaking API
changes under us. We can manually update the managed dependancies once a new
stable release of a defendant package is released.

Additionally, reproducible builds are a strong requirement in order to securely
distribute future major releases of lnd.
2016-07-22 18:53:35 -07:00