Commit Graph

3600 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
a07579c541
rpc: modify the entity of invoice related RPC's to target the invoice entity
In this commit, we modify the existing invoice RPC macaroon permissions
to target a more specific entity: “invoices”. As a result of this
commit, once node operators update, they’ll need to regenerate their
readonly.macaroon as it now needs this additional entity encoded within
it.
2018-03-21 15:08:54 -07:00
Olaoluwa Osuntokun
6a294e7489
rpc: extend writePermissions and readPermissions with the invoice entity
In the prior commit, we added a new set of permissions and also a new
entity: “invoices”. We’ll add this set of entities to the read and
write permissions accordingly as well to ensure that the existing
macaroons have access to all the items that the invoice.macaroon does.
2018-03-21 15:08:53 -07:00
Olaoluwa Osuntokun
6c6285344b
rpc: add new invoicePermissions bakery.Op slice for an invoice only macaroon
In this commit, we add a new invoicePermissions slice. This contains
all the permission that a holder of an invoice.macaroon is able to
access, and no others. We also include read and write access to
addresses as this may be useful from the PoV of a merchant or exchange.
2018-03-21 15:08:50 -07:00
Jonathan Underwood
237ed4fc6e lnd+config: add TLSExtraDomain to config
Self explanatory.

Needed for NodeJS, as the grpc library only allows TLS connections to domains and not IP addresses.
2018-03-20 15:57:14 -07:00
Olaoluwa Osuntokun
6d07b865d6
Merge pull request #847 from stevenroose/typo-funding
rpc: Fix typo in OpenChannelRequest
2018-03-20 15:55:30 -07:00
Olaoluwa Osuntokun
3d49deb5df
Merge pull request #894 from Roasbeef/peer-stop-channel
peer: ensure we stop the channel if error happens in loadActiveChannels
2018-03-20 15:54:23 -07:00
Johan T. Halseth
9c0fc023af
Merge pull request #834 from wilmerpaulino/list-channels
multi: specify retrieving active, inactive, public, and private channels from listchannels rpc
2018-03-20 09:37:58 +01:00
Olaoluwa Osuntokun
fda3b871c1
peer: ensure we stop the channel if error happens in loadActiveChannels
In this commit, we fix a goroutine leak that could occur if while we
were loading an error occurred in any of the steps after we created the
channel object, but before it was actually loaded in to the script. If
an error occurs at any step, we ensure that we’ll stop toe channel.
Otherwise, the sigPool goroutines would still be lingering and never be
stopped.
2018-03-19 19:14:55 -07:00
Steven Roose
9516d8da52 rpc: Fix typo in OpenChannelRequest 2018-03-19 19:11:47 +01:00
Wilmer Paulino
900cd43768
multi: change to lnrpc.Channel type due to proto update 2018-03-19 11:19:06 -04:00
Wilmer Paulino
7642bad54f
cmd/lncli: add flags to listchannels to retrieve specific channels 2018-03-19 11:19:05 -04:00
Wilmer Paulino
85b03780f3
rpcserver: determine which channels to return based on passed params 2018-03-19 11:19:04 -04:00
Wilmer Paulino
95997b9c6c
lnrpc: add flags to specify retrieving different channels 2018-03-19 11:19:02 -04:00
Matt Drollette
92eebff64e macaroons: don't zero mem if never unlocked 2018-03-18 16:09:54 -07:00
Alex Gessner
0c1b619e53 docs: move defaultchanconfs setting in sample-lnd.conf to bitcoin section
Since https://github.com/lightningnetwork/lnd/pull/506, `defaultchanconfs` is nested under `bitcoin`. Using this parameter at the top level generates a warning message:
```
2018-03-17 23:07:08.273 [WRN] LTND: /home/bitcoin/.lnd/lnd.conf:7: unknown option: defaultchanconfs
```
and using it nested under `bitcoin` does not.
2018-03-18 16:09:22 -07:00
Olaoluwa Osuntokun
ce85632390
discovery: ensure target host for DNS fallback is fully qualified
In this commit, fix the inability of some users to connect to the DNS
seed using our direct TCP fallback. We do this as some resolvers filter
out our large SRV requests due to their size (they also include public
keys). Instead, we’ll use a direct TCP resolution in this case.
However, after a recent change, we forgot the period at the end of the
target DNS host. This is an issue as the domain needs to be fully
qualified.

The fix is easy, add a period within our string formatting to target
the proper sub-domain and SRV target.

Fixes #854.
2018-03-18 16:05:10 -07:00
Andreas M. Antonopoulos
47329c9267 docs: inconsistent ZMQ port numbers in examples
The port numbers used in the ZMQ examples are inconsistent between:

- The initial explanation of ZMQ
```
They must be combined in the same ZMQ socket
  address (e.g. `--zmqpubrawblock=tcp://127.0.0.1:28332` and
  `--zmqpubrawtx=tcp://127.0.0.1:28332`).
```

- The sample bitcoin.conf
```
zmqpubrawblock=tcp://127.0.0.1:18501
zmqpubrawtx=tcp://127.0.0.1:18501
```

- The lnd command-line example:
```
lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=REPLACEME --bitcoind.rpcpass=REPLACEME --bitcoind.zmqpath=tcp://127.0.0.1:28332 --externalip=X.X.X.X
```

I changed the sample bitcoin.conf port numbers to 28332 so they match the rest of the examples.
2018-03-17 14:37:57 -07:00
João Mesquita
b0c35d5f39 README: fix go bin path in INSTALL.md
FIxes #839.
2018-03-16 16:28:57 -07:00
Perdouille
c33645cc80 README: fixed a small typo on INSTALL.md
`bitciond` => `bitcoind`
2018-03-16 16:28:01 -07:00
Matt Drollette
1b7b35a8bc discovery: format log message with Errorf 2018-03-16 16:25:18 -07:00
bretton
1740c630c6 lnd: update version to have proper pre-release name 2018-03-16 14:42:31 -07:00
Olaoluwa Osuntokun
b866806d67
lnd+cmd/lncli: bump version to 0.4 2018-03-15 06:38:46 -07:00
Olaoluwa Osuntokun
71a5fac9c7
lnd+config: add flags for mainnet 2018-03-15 06:38:45 -07:00
Olaoluwa Osuntokun
c00880144c
chains: modify applyLitecoinParams to take target LTC params 2018-03-15 06:38:45 -07:00
Olaoluwa Osuntokun
3bf6626f73
chains: add net params for TBC and LTC main net 2018-03-15 06:38:41 -07:00
Olaoluwa Osuntokun
8f4a8fcf57
chains: add DNS seeds for mainnet BTC and LTC 2018-03-15 02:00:19 -07:00
Olaoluwa Osuntokun
68f842d90b
chains: add genesis hashes for BTC and LTC mainnet 2018-03-15 01:58:35 -07:00
Olaoluwa Osuntokun
9aac0c41a2
test: update nursery_store_test.go due to recent chain genesis renaming 2018-03-14 19:11:16 -07:00
Olaoluwa Osuntokun
30019538c4
discovery: update DNS bootstrapper to adhere to new query schema
In this commit, we update the DNS bootstrapper to match the new query
semantics expected by the new DNS server. We no longer hard code the
target DNS host, and instead, we’ll re-use the same target endpoint as
we only need the soaShim in order to establish a direct TCP connection
for the queries.
2018-03-14 18:27:29 -07:00
Olaoluwa Osuntokun
6793f3653e
chains: rename liteTestNetParams to litecoinTestNetParams 2018-03-14 18:27:29 -07:00
Olaoluwa Osuntokun
9ec80e2083
server: properly segment the nursery store according to active net 2018-03-14 18:27:28 -07:00
Olaoluwa Osuntokun
620b552413
chains: switch to new DNS seed for bitcoin testnet
In this commit we switch over to the new DNS seed for Bitcoin’s
testnet. This seed will only serve active nodes that are found on
Bitcoin’s testnet.
2018-03-14 18:27:24 -07:00
Olaoluwa Osuntokun
0cd2448f49 chains: specify that current btc+ltc genesis hashes are for testnet 2018-03-14 18:24:26 -07:00
Olaoluwa Osuntokun
695b09e32b
Merge pull request #838 from cfromknecht/litecoind-backend
Litecoind Backend
2018-03-14 18:17:27 -07:00
Olaoluwa Osuntokun
57961a96a4
Merge pull request #842 from cfromknecht/switch-itest-unknown-next-peer-fix
lnd_test: removes unnecessary disconnects from switch itest
2018-03-14 17:22:31 -07:00
Conner Fromknecht
fa3f80dfa9
docs/INSTALL: note addition of litecoind setup in docs 2018-03-14 16:57:43 -07:00
Conner Fromknecht
bb16f9d29a
rpcserver: use primary chain default CLTV for add invoice 2018-03-14 16:57:43 -07:00
Conner Fromknecht
8cecdc54cf
fundingmanager: adds default ltc funding constraints 2018-03-14 16:57:42 -07:00
Conner Fromknecht
0c6a85d5f7
fundingmanager_test: use renamed defaultBtcChannelConstraints const 2018-03-14 16:57:42 -07:00
Conner Fromknecht
821ec9e550
lnd: compute funding params for ltc if active 2018-03-14 16:57:42 -07:00
Conner Fromknecht
5f7a62913f
chainregistry: generalize bitcoind logic to handle litecoind 2018-03-14 16:57:37 -07:00
Conner Fromknecht
6c42dd2c09
lnd_test: removes unnecessary disconnects from switch itest
This commit removes two unnecessary disconnect/reconnect attempts
from the switch itest. Both occur after the primary test has been
completed, and were being executed before doing a final sanity check
that the path is still usable. Nothing about the test behavior should
change.
2018-03-14 16:25:45 -07:00
Conner Fromknecht
5e21c38fdb
config: adds litecoind+ltcd backend node options 2018-03-14 16:24:58 -07:00
Conner Fromknecht
07266d8080
Merge pull request #841 from aakselrod/chainview-bitcoind-notifyblocks
routing/chainview: bitcoind back-end now requires explicit `NotifyBlocks()`
2018-03-14 15:47:26 -07:00
Alex
887a6464df build: update dep for btcwallet 2018-03-14 16:10:17 -06:00
Alex
948cb09c14 routing/chainview: bitcoind back-end now requires explicit NotifyBlocks() 2018-03-14 12:16:40 -06:00
Johan T. Halseth
5818bdba96
Merge pull request #828 from cfromknecht/switch-itest-hardening
Switch ITest Hardening
2018-03-14 11:06:34 +01:00
Conner Fromknecht
6a432c4be2
lntest: adds EnsureConnected helper method 2018-03-14 02:23:34 -07:00
Conner Fromknecht
82c1e9af92
lntest/harness: adds WaitInvariant helper method
This commits adds a complement to the existing WaitPredicate
helper function, ensuring that a boolean statement remains
true for the duration of the provided timeout. This expands
our ability to do simple sanity checks where the wait-until
semantics of WaitPredicate may not be as-well suited.
2018-03-14 02:23:34 -07:00
Conner Fromknecht
72dcf44246
lnd_test: harden switch persistence itests
This commits removes many of the timeout-based consistency
checks, which tend to be less dependable on Travis. They
have been replaced with stronger WaitPredicates, and the new
WaitInvariant where appropriate. This should give provide a
much greater degree of reliability in our highly-variant
testing environments.
2018-03-14 02:19:30 -07:00