Commit Graph
10470 Commits
Author SHA1 Message Date
Oliver Gugger 47e8882480 make+itest: allow the same test to be run in parallel 2020-11-10 13:57:31 +01:00
Oliver Gugger 72cacb9c5e Merge pull request #1288 from guggero/stateless-init
walletunlocker+lnd: add command line flag to allow passing admin macaroon after wallet creation
2020-11-07 12:39:04 +00:00
Graham Krizek 5aa0d26251 lnrpc+macaroon: skip subserver macaroons on stateless_init
This will prevent the subservers from writing macaroons to disk
when the stateless_init flag is set to true. It accomplishes
this by storing the StatelessInit value in the Macaroon Service.
2020-11-07 11:24:35 +01:00
Oliver Gugger 0b9b7def15 docs: describe stateless wallet initialization 2020-11-07 11:24:35 +01:00
Oliver Gugger 24adf475ce lnd_test: add integration tests for stateless init 2020-11-07 11:24:35 +01:00
Oliver Gugger e7aa9256ab walletunlocker+lnd: implement stateless wallet initialization 2020-11-07 11:24:34 +01:00
Oliver Gugger 4b0b20c98b walletunlocker: use require library, fix linter issues
To prepare for new tests to be added, we first rewrite the existing
tests to use the require library and get rid of some smaller linter
issues.
2020-11-07 11:24:34 +01:00
Oliver Gugger b685a97fcd lnd: shutdown wallet unlocker after macaroon creation
Because we'll need to return the macaroon through the wallet unlocker
we cannot shut down its service before we have done so, otherwise
we'll end up in a deadlock. That's why we collect all shutdown
tasks and return them as a function that can be called after we've
initialized the macaroon service.
2020-11-07 11:24:34 +01:00
Oliver Gugger 71ba2a8e60 lnd: prepare for proper wallet unlocker cleanup
As a preparation for the next commit where we add proper wallet unlocker
shutdown handling, we move the calls that require cleanup down after the
creation of the wallet unlocker service itself.
2020-11-07 11:24:33 +01:00
Oliver Gugger 294cb4a966 macaroons: remember stateless init
To make sure no macaroons are created anywhere if the stateless
initialization was requested, we keep the requested initialization mode
in the memory of the macaroon service.
2020-11-07 11:24:33 +01:00
Oliver Gugger ae71d60715 macaroons: add ability to change the password or create a new root key 2020-11-07 11:24:33 +01:00
Oliver Gugger cd85e17b19 macaroons: use require for tests 2020-11-07 11:18:52 +01:00
Oliver Gugger 10673b9dfa lncli: add flags for stateless init to wallet unlocker commands 2020-11-07 11:18:52 +01:00
Oliver Gugger 4c8d374007 lnrpc: add arguments for stateless wallet initialization to wallet unlocker
This commit adds the --stateless_init flag to all three wallet unlocker
operations. Once you initialize a wallet stateless, you need to set
this flag for every further wallet unlocker operation. Otherwise you
risk non-encrypted macaroon information to leak to the underlying
system.
2020-11-07 11:18:52 +01:00
Olaoluwa Osuntokun 4f4adab1dc Merge pull request #4738 from positiveblue/fix-wordlist-check
aezeed: fix mnemonic word validation
2020-11-06 13:19:23 -08:00
András Bánki-Horváth 0c3c6e6155 Merge pull request #4705 from bhandras/kvdb_view_reset
multi: add reset closure to `kvdb.View/Update` to be able to clean up external state before retries
2020-11-06 12:47:35 +01:00
Andras Banki-Horvath adfd99ec08 etcd: allow readwrite bucket Delete with nil key (bbolt compatibility) 2020-11-05 17:57:13 +01:00
Andras Banki-Horvath e8f47cf882 invoices: channel graph reference was wrongly retrieved from remote db
This commit fixes a bug where we tried to use the graph from the remote
db instance whereas it lives in the local db instance.
2020-11-05 17:57:13 +01:00
Andras Banki-Horvath d89f51d1d0 multi: add reset closure to kvdb.Update
Similarly as with kvdb.View this commits adds a reset closure to the
kvdb.Update call in order to be able to reset external state if the
underlying db backend needs to retry the transaction.
2020-11-05 17:57:12 +01:00
Andras Banki-Horvath 2a358327f4 multi: add reset closure to kvdb.View
This commit adds a reset() closure to the kvdb.View function which will
be called before each retry (including the first) of the view
transaction. The reset() closure can be used to reset external state
(eg slices or maps) where the view closure puts intermediate results.
2020-11-05 17:57:12 +01:00
Andras Banki-Horvath ffb27284df channeldb: change walletdb dependency to kvdb 2020-11-05 17:57:08 +01:00
Carla Kirk-Cohen a0ab96de5d Merge pull request #4735 from carlaKC/2426-defaultmaxcsv
multi: add control over maximum acceptable local CSV delay
2020-11-05 12:39:35 +02:00
Johan T. Halseth 1c96cc7e10 Merge pull request #4546 from bjarnemagnussen/fix-coinselect-tests
chanfunding: Add/improve tests for CoinSelectSubtractFees
2020-11-05 10:21:30 +01:00
Olaoluwa Osuntokun 0552ba93c8 Merge pull request #4655 from guggero/itest-parallel
Travis: run itests in parallel, get ~60% speedup overall
2020-11-04 16:16:49 -08:00
Bjarne Magnussen 0e2d6dc0a9 chanfunding: match error string when testing CoinSelectSubtractFees 2020-11-04 18:54:57 +01:00
Bjarne Magnussen 493bc27ec2 chanfunding: fix tiny typo 2020-11-04 18:54:57 +01:00
Bjarne Magnussen c56457c869 chanfunding: add test for a non-zero change 2020-11-04 18:54:57 +01:00
Bjarne Magnussen 07549d50ff chanfunding: assure logic for high-fee
Without this change the high-fee logic is never tested as it is instead caught by the dust-output logic. This change uses a higher fee rate to ensure an output value above the dust limit, while still spending 20% on fees.
2020-11-04 18:54:57 +01:00
Bjarne Magnussen 9e825e6c0f chanfunding: assure logic for dust output
Without this change the fee for the test case is above 20% and hence the error could be caught by the high-fee logic instead.
2020-11-04 18:54:57 +01:00
carla f1aa3d2071 lncli: allow setting max local csv for open channel requests 2020-11-04 13:57:21 +02:00
carla 91bf59df17 multi: allow specifying max csv for locally initiated channels 2020-11-04 13:55:39 +02:00
carla f4136decae multi: add max local csv config option
To allow nodes more control over the amount of time that their funds
will be locked up, we add a MaxLocalCSVDelay option which sets the
maximum csv delay we will accept for all channels. We default to the
existing constant of 10000, and set a sane minimum on this value so that
clients cannot set unreasonably low maximum csv delays which will result
in their node rejecting all channels.
2020-11-04 13:55:37 +02:00
Oliver Gugger a606f462bc itest: move longest test to beginning
To make sure the test that takes the longest overall time is always
started first, independent of the number of test tranches we run, we
move it to the beginning of the list. Because that test involves a lot
of waiting, it allows us to play around with the number of tranches more
efficiently.
2020-11-04 11:03:37 +01:00
Oliver Gugger e6c47294fb itest: fix typo and formatting 2020-11-04 11:03:36 +01:00
Oliver Gugger ea4bb5dc5c itest: fix chanbackup restore flake
Updating the fee of the mock estimator _after_ starting carol turned out
to be flaky and could lead to the new fee not being picked up in time
for the force close. That lead to carol not cpfp'ing the force closed
transaction.
2020-11-04 11:03:34 +01:00
Oliver Gugger d4068e9892 travis+make: execute test groups in parallel 2020-11-04 11:03:33 +01:00
Oliver Gugger ca7564e4b4 itest: add flags for lnd executable 2020-11-04 11:03:31 +01:00
Oliver Gugger f358a4474d lntest: add log dir flag 2020-11-04 11:03:30 +01:00
Oliver Gugger 9bbf134237 itest: split tests into dynamic tranches 2020-11-04 11:03:29 +01:00
Oliver Gugger 891eb0d63d lntest: use nextAvailablePort for bitcoind 2020-11-04 11:03:27 +01:00
Oliver Gugger 5c04449dfd lntest: use nextAvailablePort for fee service 2020-11-04 11:03:26 +01:00
Oliver Gugger a50d337e42 lntest: lower initial port, add ApplyPortOffset function
To allow running multiple test tranches in parallel, we need a way to
make sure the TCP ports don't collide. We'll work with offsets for the
ports, using a different offset for each tranche.
2020-11-04 11:03:25 +01:00
Olaoluwa Osuntokun fbb430ad82 Merge pull request #4703 from wpaulino/is-synced-timestamp-inconsistency
btcwallet: return chain best timestamp while backend is syncing
2020-11-03 17:35:27 -08:00
Olaoluwa Osuntokun 297c614126 Merge pull request #4701 from carlaKC/4581-removeexperimential
multi: remove experimential build flag for assumechanvalid
2020-11-03 17:34:50 -08:00
Olaoluwa Osuntokun 21b9f24d28 Merge pull request #4675 from champo/sphinx_interceptor
htlcswitch,rpc: expose onion blob for intercepts
2020-11-03 17:30:21 -08:00
Daniel Babbev fd544e00ee docs: update C# documentation 2020-11-03 17:29:55 -08:00
Olaoluwa Osuntokun cf5c670a2b Merge pull request #4627 from matheusdtech/sigabrt
signal: do not trap SIGABRT
2020-11-03 17:25:16 -08:00
positiveblue 5089cfc1be aezeed: fix mnemonic word validation
A user complained about getting a misleading error after a typo in the
mnemonic. The word was `hear` and it passed the check even when it is
not in the list of valid words.

The reason is that we where checking if the word is in the variable
`englishWordList` (which includes all the words) instead of checking if the
variable is in the `defaultWordList` (which is basically `englishWoldList`
split by spaces). That means that `hear` passed the check because `heart`
appears in the list.

Related issue [4733](https://github.com/lightningnetwork/lnd/issues/4733)
2020-11-02 23:25:50 +01:00
Juan Pablo Civile 033c5b7a3f htlcswitch,rpc: expose onion blob for intercepts 2020-10-31 14:09:52 -03:00
Eugene 225390ab5b Merge pull request #4487 from Crypt-iQ/cc_pkg_0723
chainreg: new chainreg package
2020-10-30 06:07:26 -04:00