Commit Graph
100 Commits
Author SHA1 Message Date
Andras Banki-Horvath 825422a82a lncfg: move ParseHexColor to lncfg 2022-01-24 17:42:54 +01:00
Andras Banki-Horvath 5efbb2b0ff docs: update release notes 2021-12-08 23:10:20 +01:00
Andras Banki-Horvath 8cd607447e routing: fix memory corruption in MC store
Since bbolt returns references to internally stored data when storing
locally it's best to copy the byte slices returned or alternatively
convert them to string (which also makes a copy) to avoid crashes casued
by memory corruption.
2021-12-08 23:10:16 +01:00
Andras Banki-Horvath 24d5146894 docs: update release notes 2021-12-02 21:07:50 +01:00
Andras Banki-Horvath 1ccc5e8014 etcd: make max message size configurable 2021-12-02 21:07:49 +01:00
Andras Banki-Horvath 0beaee0336 docs: update release notes 2021-11-08 12:40:18 +01:00
Andras Banki-Horvath 3df216f6c3 channeldb: avoid locking the graph cache while iterating channels
It may happen that we do pathfinding while also attempt to change the
graph. In this case changing the database, channel state, graph while
reading from the same sources may create deadlocks. To resolve this we
change locking policy in the graph cache when pathfinding.
2021-11-08 12:40:14 +01:00
Andras Banki-Horvath 4d4b525058 docs: update release notes 2021-11-02 20:19:07 -07:00
Andras Banki-Horvath ea5d43a2a8 channeldb: fix crash when inbound policy is unset 2021-11-02 20:18:58 -07:00
Andras Banki-Horvath c9533bf6b9 docs: update leader election docs [skip ci] 2021-11-01 16:30:13 +01:00
Andras Banki-Horvath 76065e84d3 invoices: do not log when invoice is already deleted 2021-11-01 16:10:45 +01:00
Andras Banki-Horvath 11cf4216e4 multi: move all channelstate operations to ChannelStateDB 2021-09-29 17:00:03 +02:00
Andras Banki-Horvath 60cccf8409 multi: carve out LinkNodeDB from channeldb.DB for cleaner separation 2021-09-29 17:00:02 +02:00
Andras Banki-Horvath 292b8e1ce6 channeldb: fix dangerous type casting hack 2021-09-29 17:00:02 +02:00
Andras Banki-Horvath 639faeed6d channeldb: use kvdb.Backend instead of channeldb.DB for the Graph 2021-09-29 17:00:01 +02:00
Andras Banki-Horvath 16436a3230 docs: update release notes 2021-09-15 10:27:00 +02:00
Andras Banki-Horvath ef7e46bc2e travis: fix ARM and Windows itest parallelism 2021-09-15 10:26:52 +02:00
Andras Banki-Horvath 23ded04ff5 docs: update release notes 0.14 2021-09-14 13:12:23 +02:00
Andras Banki-Horvath 3648f2fa4b payments: prefetch payment on hot paths 2021-09-14 13:12:23 +02:00
Andras Banki-Horvath 152d1dc36a kvdb: extra test coverage for kvdb.Prefetch 2021-09-14 13:12:23 +02:00
Andras Banki-Horvath 256b62e0d5 etcd: add kvdb.Prefetch
This commit extends the kvdb interface in a backwards compatible way
such that we'll be able to prefetch all keys in a bucket in one go reducing the
number of roundtrips.
2021-09-14 13:12:22 +02:00
Andras Banki-Horvath daec66a4e4 etcd: STM to allow prefetching of keys and full ranges
This commit adds more full range caching to the STM such that we'll
be able to prefetch keys and ranges on the kvdb level. This will allow
us to reduce roundtrips to etcd do fast iteration of small ranges.
2021-09-14 13:12:19 +02:00
Andras Banki-Horvath 400cc0eb96 docs: update release-notes-0.14.0.md 2021-09-10 14:40:58 +02:00
Andras Banki-Horvath 9bf04f9870 itest+etcd: save etcd logs along the node logs 2021-09-10 14:40:57 +02:00
Andras Banki-Horvath 6c2d8bb176 etcd: enable optional log file for embedded etcd log output
In this commit we add an extra config for enabling logging to an
external file when using embedded etcd. This can be useful when running
integration tests to see more details about etcd related issues.
2021-09-10 14:40:54 +02:00
Andras Banki-Horvath f2cc783043 docs: update release-notes-0.14.0.md 2021-09-07 10:46:50 +02:00
Andras Banki-Horvath 204966db40 channeldb: migration to flatten the htlc attempts bucket 2021-09-07 10:46:49 +02:00
Andras Banki-Horvath 63d7f5fca7 channeldb: flatten the payment-htlcs-bucket 2021-09-07 10:46:46 +02:00
Andras Banki-Horvath b1288ae233 docs: update release-notes-0.14.0.md 2021-09-06 21:46:23 +02:00
Andras Banki-Horvath b07bcde482 ci: switch Travis ARM integration test to use bitcoind 2021-09-06 21:46:20 +02:00
Andras Banki-Horvath c5c956bbef lnrpc: add BatchOpenChannel RPC 2021-09-02 12:13:47 +02:00
András Bánki-Horváth 23c3597d13 Merge pull request #5607 from bhandras/payments_test_flake_fix
itests: payments test flake fix
2021-08-10 09:15:56 +02:00
Andras Banki-Horvath ccd890b098 docs: update release notes 2021-08-06 17:37:40 +02:00
Andras Banki-Horvath 0f400b2b16 itests: payments test flake fix 2021-08-06 17:37:37 +02:00
András Bánki-Horváth 254d9be6ff Merge pull request #5513 from bhandras/commit_queue_fix
etcd: fix dereferencing issue in commit queue causing contention and change design to be more scalable
2021-08-06 09:26:40 +02:00
Andras Banki-Horvath e243be1ba2 docs: update 0.14.0 release notes 2021-08-06 07:53:14 +02:00
Andras Banki-Horvath b29ae94e10 etcd: redesign commit queue to make it more robust and scalable
This commit builds on the ideas of @cfromknecht in lnd/5153. The
addition is that the design is now simpler and more robust by queueing
up everything, but allowing maximal parallelism where txns don't block.
Furthermore the commit makes CommitQueue.Done() private essentially
removing the need to understand the queue externally.
2021-08-06 07:53:13 +02:00
Andras Banki-Horvath 02aa77261d etcd: fix dereferncing issue in etcd.CommitQueue causing contention
This commit fixes an issue where subsequent transaction retries may have
changed the read/write sets inside the STM which in turn left junk
references to these keys in the CommitQueue. The left keys potentially
conflicted with subsequent transactions, queueing them up causing
througput degradation.
2021-08-06 07:53:10 +02:00
Andras Banki-Horvath 7da0b80674 docs: update 0.14 release notes 2021-07-27 13:57:09 +02:00
Andras Banki-Horvath f54c127021 itest: fix async payment benchmark timeout flakes 2021-07-27 13:57:09 +02:00
András Bánki-Horváth 5de6af798d Merge pull request #5515 from bhandras/mc_store_optimization
routing: store missioncontrol state in blocks and eliminate cursor use
2021-07-26 23:36:51 +02:00
Andras Banki-Horvath cfa3f708f1 docs: update release notes 2021-07-26 17:02:14 +02:00
Andras Banki-Horvath f13a348c97 config: update sample-lnd.conf with routerrpc.mcflushinterval 2021-07-26 17:02:14 +02:00
Andras Banki-Horvath 6d80ddfe91 routing: store missioncontrol state in blocks and eliminate cursor use
This commit changes missioncontrol's store update from per payment to
every second. Updating the missioncontrol store on every payment caused
gradual slowdown when using etcd.
We also completely eliminate the use of the cursor, further reducing
the performance bottleneck.
2021-07-26 17:02:11 +02:00
András Bánki-Horváth 275eca1640 Merge pull request #5514 from bhandras/payment_seq_blocks
payments: allocate payment sequences in blocks
2021-07-22 19:21:44 +02:00
Andras Banki-Horvath bc3886c85b docs: update release notes 2021-07-22 15:15:38 +02:00
Andras Banki-Horvath 798bf05838 build: add itest-race build target to catch data races with itests
This commit adds itest-race build target that can be used with
individual itests to detect and catch uncovered data races.
2021-07-22 15:15:35 +02:00
Andras Banki-Horvath 9ce5585eff docs: update release notes 2021-07-21 16:36:13 +02:00
Andras Banki-Horvath f33b5a4057 payments: allocate payment sequences in blocks
The bucket sequence we use as payment sequence makes the DB update in
InitPayment conflict and therefore queue up when many concurrent
payments happen. This change allocates payment sequences in blocks
of 1000 to avoid these conflicts.
2021-07-21 16:36:10 +02:00
Andras Banki-Horvath dd05e29225 docs: update release notes 2021-07-20 21:02:16 +02:00
Andras Banki-Horvath bc4ffb489d etcd: optionally reduce concurrency to single writer for legacy code 2021-07-20 21:02:11 +02:00
Andras Banki-Horvath 96caa6f242 etcd: remove assertion when creating bucket and value with the same key
This commit removes an assertion which is not needed because with etcd
we can safely create keys and values with the same key since they are
stored under different keys in the DB. This saves us one unnecessary Get
on every Put.
2021-07-16 16:06:32 +02:00
Andras Banki-Horvath 11a44a94b1 etcd: remove unnecessary iterator step from cursor Delete
The etcd cursor Delete stepped to the next item in the range before
Delete to not invalidate the iteation. This is unnecessary and not
compatible with bbolt, resulting in an extra fetch too.
2021-07-16 15:21:14 +02:00
Andras Banki-Horvath 6dc64f7d2f etcd: disable excessive logging when using embedded etcd 2021-07-15 15:35:38 +02:00
Andras Banki-Horvath 7ce3223919 harness: remove killed nodes from active nodes 2021-07-15 11:26:27 +02:00
Andras Banki-Horvath f41771ce54 docs: leader election docs 2021-07-06 16:21:26 +02:00
Andras Banki-Horvath fc139d9bb8 kvdb: add ForEachBucket implementation 2021-05-13 10:35:35 +02:00
Andras Banki-Horvath 3c6f036bee kvdb: make lnd/kvdb a submodule 2021-05-07 14:18:57 +02:00
Andras Banki-Horvath 14c851c8fc kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00
Andras Banki-Horvath ad586c6bf1 healthcheck: separate lnd/healthcheck into submodule 2021-05-05 15:33:19 +02:00
Andras Banki-Horvath cee832b749 healthcheck: disable default healthcheck logger
Disable logging by default in the healthcheck submodule to cut
dependency on lnd/build as we are hooking the logger separately
during lnd init.
2021-05-05 15:33:14 +02:00
Andras Banki-Horvath dd14947154 lint: silence depreciation warnings 2021-05-04 17:33:14 +02:00
Andras Banki-Horvath 80bc46e614 lint: fix proto message no-copy linter warnings 2021-05-04 17:33:14 +02:00
Andras Banki-Horvath 9aacc35989 lnrpc: add GetState to stateservice (v1/state)
This commit adds a new GetState call to the state service in order to
make leader election integrate simply with k8s using a readinessProbe.
2021-05-04 17:33:13 +02:00
Andras Banki-Horvath 7caf26ce94 itest: add itest for failover after forcefull shutdown 2021-05-04 17:33:12 +02:00
Andras Banki-Horvath 5d8488871c itest: basic failover itest when using leader election on etcd 2021-05-04 17:33:12 +02:00
Andras Banki-Horvath 5e215a7a66 lnrpc: add "waiting to start" state to state service
This commit adds a new "waiting to start" state which may be used to
query if we're still waiting to become the cluster leader. Once leader
we advance the state to "wallet not exist" or "wallet locked" given
wallet availablity.
2021-05-04 17:33:11 +02:00
Andras Banki-Horvath b6a620e6b2 misc: add ability to store the wallet in the remote DB 2021-05-04 17:33:11 +02:00
Andras Banki-Horvath 08be03367a walletunlocker: extract method to create the Loader 2021-05-04 17:33:10 +02:00
Andras Banki-Horvath c190c3d582 etcd: update etcd to 3.4.14 2021-05-04 17:33:09 +02:00
Andras Banki-Horvath e5f249ad51 mod: integrate latest btcwallet and bump protobuf and grpc 2021-05-04 17:33:09 +02:00
Andras Banki-Horvath d161b34ee5 lnd: integrate leader elector to lnd main
This commit also changes the order of DB init to be run after the RPC
server is up. This will allow us to later add an RPC endpoint to be used
to query leadership status.
2021-05-04 17:33:08 +02:00
Andras Banki-Horvath 41532ce634 cluster: add etcd based leader elector and factory 2021-05-04 17:33:07 +02:00
Andras Banki-Horvath e62dbca11a cluster: add cluster package skeleton and LeaderElector interface 2021-05-04 17:33:07 +02:00
Andras Banki-Horvath 282618441d etcd: do not try authenticate when using embedded 2021-05-04 17:33:06 +02:00
Andras Banki-Horvath 5441c1bb6d etcd: fix embbeded etcd connection cfg 2021-05-04 17:33:06 +02:00
Andras Banki-Horvath 9992e5c0b5 etcd: decouple embedded etcd instance startup
This refactor changes how we instantiate the etcd based Backend to allow
separate initialization and startup for the embedded instance.
2021-05-04 17:33:05 +02:00
Andras Banki-Horvath 6757e14998 etcd: refactors to simplify etcd configuration
This refactor removes a redundancy where we had etcd configuration under
kvdb and kvdb/etcd packages.
2021-05-04 17:33:04 +02:00
Andras Banki-Horvath 44e312ace9 etcd: remove (unused) etcd root bucket prefix
This commit removes the unused prefix from the etcd backend config as
etcd key space separation in LND is implemented by using namespaces
instead.
2021-05-04 17:32:59 +02:00
Andras Banki-Horvath ec50f2ccce invoices: more verbose logging for startup invoice GC 2021-04-22 15:37:53 +02:00
Andras Banki-Horvath adbcc3f7a3 invoices: do not fail DeleteInvoice if payment addr isn't indexed
This commit relaxes DeleteInvoice failure cases by removing the
requirement that the invoice needs to be indexed by the payment address.
Since payment address index was introduced with an empty migration it
is possible that users have old invoices which were never added to
this index causing invoice garbage collection to get stuck.
2021-04-19 17:56:09 +02:00
Andras Banki-Horvath dde5750160 invoices+rpc: add missing channel graph to the AddInvoiceConfig
The Graph which is referenced later in the AddInvoice call graph is
unset when adding a hodl invoice. This resulted in a crash.
2021-02-03 11:33:27 +01:00
Andras Banki-Horvath 22711ade3a cnct: dispatch contract breach after channel close summary is serialized
This commit moves the contract breach event dispatch after the channel
close summary has been added to the database. This is important
otherwise it may occur that we attempt to mark the channel fully closed
while the channel close summary is not yet serialized.
2021-01-11 22:48:41 +01:00
Andras Banki-Horvath d3cd412137 ci: add etcd itests to our CI (bitcoind only) 2021-01-08 15:39:12 +01:00
Andras Banki-Horvath b2ab5e8af1 itests: run etcd itests with generated ports 2021-01-08 15:39:12 +01:00
Andras Banki-Horvath f1831f0581 etcd: add support for user specified ports for testing 2021-01-08 15:39:11 +01:00
Andras Banki-Horvath ce4ca86ca6 kvdb: fix kvdb.Batch to use state reset when using etcd backend 2021-01-08 15:39:11 +01:00
Andras Banki-Horvath a9ba5af9fd etcd: fix config in docs and extend with new options 2021-01-05 16:50:57 +01:00
Andras Banki-Horvath cb2b5efc6e etcd: add (dev only) disabletls option for etcd 2021-01-05 16:50:53 +01:00
Andras Banki-Horvath 5ee0d77414 build: extend sample-lnd.conf with the new etcd namespace 2020-12-16 18:34:41 +01:00
Andras Banki-Horvath 4a6af67241 etcd: add support for namespaces
This commit adds support for etcd namespaces. This is useful when
using a shared etcd database where separate users have access to
separate namespaces.
2020-12-16 18:25:38 +01:00
András Bánki-Horváth 669663bfc2 Merge pull request #4822 from bhandras/add_globalfeatures
routing: add missing features to NetworkNodeUpdate (and also depreacte GlobalFeatures)
2020-12-08 10:16:50 +01:00
Andras Banki-Horvath 98c61be342 routing: add missing GlobalFeatures to NetworkNodeUpdate 2020-12-07 15:47:09 +01:00
Andras Banki-Horvath 5e19c41cb8 build: extend sample-lnd-conf with db.etcd.embedded 2020-11-18 15:34:46 +01:00
Andras Banki-Horvath 5f3b800630 lint: fix error reported by the linter 2020-11-18 15:34:46 +01:00
Andras Banki-Horvath efedb5547c itest: timeouts for itets with etcd 2020-11-18 15:34:45 +01:00
Andras Banki-Horvath 369ae5e372 itest: move all test db files when using both etcd and bbolt
In some tests we moved channeld.db to a temp location in order to
"time travel". This commit extends the existing semantics by moving all
files, including embedded etcd db too besides the channeld.db file.
2020-11-18 15:34:45 +01:00
Andras Banki-Horvath 9138efc2c3 build: extend itest with etcd=1 param which will run itests on etcd 2020-11-18 15:34:44 +01:00
Andras Banki-Horvath 98342433ab itest: add etcd flag to control if new lnd nodes should run on etcd 2020-11-18 15:34:44 +01:00
Andras Banki-Horvath 511e817624 lncfg+channeldb: add config to be able to run lnd on embedded etcd 2020-11-18 15:34:43 +01:00