Commit Graph

129 Commits

Author SHA1 Message Date
ziggie
87844cd5b4 multi: bump Golang version to v1.23.12 2025-08-07 16:53:45 +02:00
Boris Nagaev
d02520d2b9 go.mod: bump mapstructure/v2 to v2.3.0 2025-07-25 12:21:18 -03:00
Boris Nagaev
3ff11e0765 go.mod: bump runc to v1.1.14 2025-07-25 12:21:13 -03:00
Boris Nagaev
9e58a644aa go.mod: bump google.golang.org/protobuf to 1.33.0
Updated github.com/golang/protobuf to v1.5.4 to be compatible with
google.golang.org/protobuf.

Updated the pinned version in pinned_dep CI job.
2025-07-25 12:20:24 -03:00
Boris Nagaev
ec6688fc1e kvdb: remove unused replace directive
github.com/dgrijalva/jwt-go package is not referenced in any transitive
dependency anymore which allows us to remove one of the replace directives
which was added as a security precaution before.
2025-07-16 01:19:58 -03:00
Boris Nagaev
643fbb8af6 multi: update Go to 1.23.10 2025-07-16 01:19:58 -03:00
Boris Nagaev
fb48ffe2b6 multi: update btcd to v0.24.2 2025-07-16 01:19:58 -03:00
Boris Nagaev
ea7d9fcc14 multi: update pgx/v5 to v5.7.4, pgx/v4 to v4.18.3 2025-07-16 01:19:58 -03:00
Boris Nagaev
dc6ce69bad multi: update x/net to v0.39.0 2025-07-16 01:19:58 -03:00
Boris Nagaev
eb5ec87498 multi: update docker Go package to v28.1.1 2025-07-16 01:19:55 -03:00
Boris Nagaev
2bf67711dd multi: update golang-jwt to 4.5.2 2025-07-16 01:18:22 -03:00
Boris Nagaev
4ec9708acc multi: update x/crypto to v0.37.0 2025-07-16 01:18:22 -03:00
ziggie
73251952d1 mod: update btclog library 2025-06-03 13:06:28 +02:00
Elle Mouton
6ff0c85d76 kvdb/etcd: remove context.TODO() from test helpers
We want `context.TODO()` to be high signal in the code-base. It should
signal clearly that work is required to thread parent context through to
the call-site. So to keep the signal-to-noise ratio high, we remove any
context.TODO() calls from tests since these will never need to be
replace by a parent context.

After this commit, there is only a single context.TODO() left in the
code-base.
2025-05-22 14:14:36 +02:00
ziggie
947702f6de multi: add global log for wallet db postgres back 2025-04-16 16:31:24 +02:00
ziggie
140dd339c1 kvdb: add make specific error available in kvdb package 2025-04-09 18:47:54 +02:00
ziggie
490347b056 multi: update walletdb package 2025-04-09 18:47:53 +02:00
Olaoluwa Osuntokun
a0d6a5591f kvdb/sqlite: enable incremental auto_vacuum on DB creation
In this commit, we make a change that enables the `auto_vacuum =
incremental` pragma for SQLite databases, but only when the database
file is first created. Incremental auto-vacuum allows SQLite to reclaim
unused space within the database file over time, preventing indefinite
growth.
2025-04-04 15:49:29 -07:00
Andras Banki-Horvath
377397e8bc kvdb: bump etcd libs to v3.5.12 2025-04-01 12:40:31 +02:00
xinhangzhou
b7e3c20383 refactor: use maps.Copy for cleaner map handling
Signed-off-by: xinhangzhou <shuangcui@aliyun.com>
2025-03-25 01:19:55 +08:00
yyforyongyu
785cef2a96 gomod: remove replace of sqldb and kvdb 2024-12-19 19:02:46 +08:00
Alex Akselrod
780c271b80 sqldb: improve serialization error handling 2024-12-12 10:40:37 -08:00
Alex Akselrod
f3bb7095b2 Reapply "kvdb/postgres: remove global application level lock"
This reverts commit 67419a7c0c.
2024-12-12 10:40:33 -08:00
Elle Mouton
ab7aae0708 multi: rename nolint:lll to nolint:ll
Find and replace all nolint instances refering to the `lll` linter and
replace with `ll` which is the name of our custom version of the `lll`
linter which can be used to ignore log lines during linting.

The next commit will do the configuration of the custom linter and
disable the default one.
2024-12-02 09:14:21 +02:00
Elle Mouton
67419a7c0c Revert "kvdb/postgres: remove global application level lock"
This reverts commit 43a1ca4f3d.
2024-10-28 09:35:18 +02:00
Elle Mouton
a6e68cb6b8 kvdb: update btclog dep 2024-10-26 14:16:31 +02:00
Olaoluwa Osuntokun
43a1ca4f3d kvdb/postgres: remove global application level lock
In this commit, we remove the global application level lock from the
postgres backend. This lock prevents multiple write transactions from
happening at the same time, and will also block a writer if a read is on
going. Since this lock was added, we know always open DB connections
with the strongest level of concurrency control available:
`LevelSerializable`. In concert with the new auto retry logic, we ensure
that if db transactions conflict (writing the same key/row in this
case), then the tx is retried automatically.

Removing this lock should increase perf for the postgres backend, as now
concurrent write transactions can proceed, being serialized as needed.
Rather then trying to handle concurrency at the application level, we'll
set postgres do its job, with the application only needing to retry as
necessary.
2024-09-30 16:58:46 -07:00
Olaoluwa Osuntokun
06b3588512 kvdb: update to latest walletdb version 2024-09-12 16:41:43 -07:00
Olaoluwa Osuntokun
f8962af444 kvdb: update bbolt to v1.3.11 2024-09-11 10:45:12 -07:00
Andras Banki-Horvath
2c8d1c878e kvdb: make etcd calls timeout to ensure liveness
Previously our RPC calls to etcd would hang even in the case of properly
set dial timeouts and even if there was a network partition. To ensure
liveness we need to make sure that calls fail correctly in case of
system failure. To fix this we add a default timeout of 30 seconds to
each etcd RPC call.
2024-08-01 19:04:10 +02:00
elbandi
6043ced572 Add configuration description 2024-07-31 15:31:56 +02:00
elbandi
3d48dbdd55 Allow multiple etcd hosts to be specified in db.etcd.host. 2024-07-31 15:31:17 +02:00
Olaoluwa Osuntokun
7302051f44 build: update to sqldb v1.0.2
In this commit, we update the project and relevant sub-modules to sqldb
v1.0.2. The next step is to tag a new version of kvdb, then update the
main module to use that.
2024-04-26 15:31:14 -07:00
Olaoluwa Osuntokun
eb605a02fd sqldb+kvdb: update to sqlite v1.29.8
Updates to SQLite 3.45.3: https://www.sqlite.org/releaselog/3_45_3.html.

May also address https://github.com/lightningnetwork/lnd/issues/8666.
2024-04-26 12:26:59 -07:00
erik
789c6bac8c multi: replace ioutil.WriteFile 2024-04-25 11:23:31 +02:00
erik
ab83343c87 multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
Olaoluwa Osuntokun
06e4ffb3f3 kvdb: bump to sqldb/v1.0.1
Post merge module clean up after
https://github.com/lightningnetwork/lnd/pull/8611.
2024-04-12 15:16:26 -07:00
Oliver Gugger
648fb22f63 multi: wrap all errors 2024-04-11 15:04:03 +02:00
Andras Banki-Horvath
9a28a4c105 kvdb: remove the unused SQL error mappers 2024-04-11 15:04:03 +02:00
Olaoluwa Osuntokun
cd0ca43a00 kvdb: don't do a critical log for db serialization errors
In this commit, we fix a bug that would cause the entire db to shutdown
if hit a panic (since db operations in the main buckets exit with a
panic) while executing a txn call back. This might be a postgres error
we need to check, so we don't want to bail out, and instead want to pass
up the error to the caller so we can retry if needed.
2024-04-11 15:04:03 +02:00
Olaoluwa Osuntokun
329fcc6498 kvdb+sqldb: update SQL error parsing to account for non wrapped errs
Some sub-systems like btcwallet will return an error from the database,
but they won't properly wrap it. As a result, we were unable to actually
catch the serialization errors in the first place. To work around this,
we'll now attempt to parse the error string directly.
2024-04-11 15:04:03 +02:00
Andras Banki-Horvath
43f4b14c28 kvdb+sqldb: use the same tx retry helper 2024-04-11 15:04:02 +02:00
undefinedor
028959f5a0 kvdb+watchtower: fix unreachable code 2024-03-25 21:04:48 +08:00
cuinix
60bc30dd08 remove repetitive words
Signed-off-by: cuinix <915115094@qq.com>
2024-03-07 14:05:47 +08:00
ffranr
cd566eb097 multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
2024-02-27 11:13:40 +00:00
Andras Banki-Horvath
25af657ad5 kvdb: set postgres max_connections on the started instance 2024-01-24 21:38:54 +01:00
Andras Banki-Horvath
524fa66abf kvdb: bump embedded postgres to v1.25.0 2024-01-24 21:38:53 +01:00
Thabokani
b8d2fc3816 kvdb+cmd: fix typos 2024-01-03 12:06:32 +08:00
dependabot[bot]
effa5cf066 build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3 in /kvdb
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 22:28:42 +00:00
dependabot[bot]
be9fb28ac1 build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /kvdb
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 10:45:31 +00:00