Commit graph

2596 commits

Author SHA1 Message Date
Viktor Torstensson
e890a1c5a8
firewalldb: rename sqlStore to store in mig test
rename `sqlStore` to `store` in the firewalldb sql migration test file,
to make the name shorted. This is done in preparation for future commits
which will lengthen the lines where `sqlStore` is used, which otherwise
would make the lines exceed the 80 character limit.
2026-05-14 11:37:48 +02:00
Viktor Torstensson
b420e0a35f
firewalldb: add ListAllKVStoresRecords to queries
Previous commits had forgotten to add the `ListAllKVStoresRecords` query
to the `firewalldb.SQLKVStoreQueries` interface. As that is required to
make the query useable when defining the `sqldb/v2`
`TransactionExecutor` for the `firewalldb` package, this commit
adds it to the interface.
2026-05-14 11:37:46 +02:00
Viktor Torstensson
252d1206b6
multi: use sqldb/v2 in session package
Update the session package to use the `sqldb/v2` package instead of the
older version.
2026-05-14 11:37:43 +02:00
Viktor Torstensson
b7ee351cb0
multi: use sqldb/v2 in accounts package
Update the accounts package to use the `sqldb/v2` package instead of the
older version.
2026-05-14 11:37:41 +02:00
Viktor Torstensson
7265ae2a85
db: add sqldb/v2 PostgresStore creation helper
As we will change the `accounts`, `session` & `firewalldb` packages to
use the `sqldb/v2` package, we need to make those packages use the
`sqldb/v2` `PostgresStore` when setting up their test postgres
databases, instead of `litd`'s own `PostgresStore` version.

In order to enable that functionality, we add a new helper function that
creates a `PostgresStore` using the `sqldb/v2` package, in addition to
helper function that creates a `PostgresStore` using the `litd`
version.

Once we have shifted all of `litd`'s code to use the `sqldb/v2`
definition, we will remove the `litd` version.
2026-05-14 11:37:39 +02:00
Viktor Torstensson
2483339da9
sqlc: introduce NewForType helper method
The upcoming implementation of `sqldb/v2` will extensively create
a `Queries` object on the fly. To make more intuitive how to create
the queries object for specific database types, we introduce a
`NewForType` helper method.
This also mimics how `tapd` creates the `Queries` object, and in order
not let `litd` have it's own definition of how `Queries` object are
created on the fly, the upcoming `sqldb/v2` usage will utilize this
helper method.
2026-05-14 11:37:37 +02:00
Viktor Torstensson
91ed65954d
db+sqlc: use sqldb/v2 BackendType definition
The `sqldb/v2` package now provides a definition for the `BackendType`
type. As useage of `sqldb/v2` requires useage of that type, we update
`litd` to use the `BackendType` definition from `sqldb/v2`, instead of
it's own definition.
2026-05-14 11:37:34 +02:00
Viktor Torstensson
ee4a1e338b
db: add LitdMigrationStream
A core component of `sqldb/v2` useage, is that the package allows and
requires that the callsite defines a `sqldb.MigrationStream` that will
be run during the initialization of the `sqldb/v2 database instance.
The `sqldb.MigrationStream` defines the exact sql migrations to run,
as well as additional code migrations will be run after each individual
migration version.

This commit introduces the core definition of the migration stream for
`litd`, and will be further exteded in upcoming commits that will
introduce kvdb to sql code migration.

Note that as of this commit, as no part of the `litd` codebase uses the
`sqldb/v2` database instances, this migration stream is not yet
used.
2026-05-14 11:37:30 +02:00
Viktor Torstensson
1f9c32df93
mod: add sqldb/v2 dependency to litd
In upcoming commits, we will introduce support for sqldb/v2 in Lightning
Terminal, in order to support code migrations. This is needed, so that
we can ensure that the kvdb to sql migration is run exactly after an
exact sql migration version, and not after all sql migrations have been
executed. The reason why that's important is that sql table definition
may change with future sql migrations, while the kvdb to sql migration
will remain the same and always expect the same table definition.
Therefore, if the kvdb to sql migration is run after all sql migrations,
it may fail due to a table definition mismatch.

This commit adds the sqldb/v2 dependency to `litd`, so that we can
implement it's usage and execution of the kvdb to sql migration
correctly in the upcoming commits.

NOTE: currently the sqldb/v2 dependency hasn't been shipped in any
lnd release, so this dependency currently a forked version of
sqldb/v2.
2026-05-14 11:37:19 +02:00
Erick Cestari
409cba4f63
ci: harden main.yml workflow against supply-chain risks
Apply least-privilege and standard hardening to the CI workflow:

- Set top-level `permissions: contents: read` so `GITHUB_TOKEN` no
  longer defaults to broad read/write across the repo.
- Pass `github.base_ref` and `github.repository` via env vars in the
  `check-commits` job to prevent shell injection via expression
  interpolation in `run:` blocks.
- Pin third-party `jpribyl/action-docker-layer-caching` to a full
  commit SHA so a tag retag cannot swap in unreviewed code.
- Bump `actions/checkout@v3` to `@v4` in `sqlc-check` for consistency
  with the rest of the workflow.
- Use `yarn install --frozen-lockfile` for all dependency installs so
  CI fails on lockfile drift instead of silently resolving new
  package versions.
2026-05-13 11:25:41 -03:00
dependabot[bot]
954d6421d8
build(deps): bump github.com/docker/cli in /litrpc
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 28.1.1+incompatible to 29.2.0+incompatible.
- [Commits](https://github.com/docker/cli/compare/v28.1.1...v29.2.0)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-version: 29.2.0+incompatible
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 10:44:12 +00:00
Elle
8f7ab252bb
Merge pull request #1278 from lightninglabs/dependabot/go_modules/litrpc/go.opentelemetry.io/otel/sdk-1.43.0
build(deps): bump go.opentelemetry.io/otel/sdk from 1.40.0 to 1.43.0 in /litrpc
2026-05-08 17:40:26 -07:00
Elle
2e3df952a6
Merge pull request #1289 from lightninglabs/dependabot/go_modules/perms/github.com/jackc/pgx/v5-5.9.2
build(deps): bump github.com/jackc/pgx/v5 from 5.7.4 to 5.9.2 in /perms
2026-05-08 17:40:19 -07:00
Elle
ac3ab337eb
Merge pull request #1292 from lightninglabs/dependabot/go_modules/litrpc/github.com/jackc/pgx/v5-5.9.2
build(deps): bump github.com/jackc/pgx/v5 from 5.7.4 to 5.9.2 in /litrpc
2026-05-08 17:40:08 -07:00
dependabot[bot]
3d97597119
build(deps): bump github.com/docker/cli in /perms
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 28.1.1+incompatible to 29.2.0+incompatible.
- [Commits](https://github.com/docker/cli/compare/v28.1.1...v29.2.0)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-version: 29.2.0+incompatible
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-08 10:27:34 +00:00
dependabot[bot]
3a6e06ab20
build(deps): bump github.com/jackc/pgx/v5 from 5.7.4 to 5.9.2 in /litrpc
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.4 to 5.9.2.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.7.4...v5.9.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.9.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-07 23:56:52 +00:00
dependabot[bot]
39ea98ef37
build(deps): bump github.com/jackc/pgx/v5 from 5.7.4 to 5.9.2 in /perms
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.4 to 5.9.2.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.7.4...v5.9.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.9.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-07 23:56:41 +00:00
dependabot[bot]
3f99c728f4
build(deps): bump go.opentelemetry.io/otel/sdk in /perms
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.43.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.43.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.43.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-07 23:56:26 +00:00
dependabot[bot]
91d0a7f261
build(deps): bump go.opentelemetry.io/otel/sdk in /litrpc
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.43.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.43.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.43.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-07 23:56:26 +00:00
Elle
e4476e56cc
Merge pull request #1245 from lightninglabs/dependabot/go_modules/github.com/docker/cli-29.2.0incompatible
build(deps): bump github.com/docker/cli from 28.1.1+incompatible to 29.2.0+incompatible
2026-05-07 16:55:04 -07:00
dependabot[bot]
c514ec8a55
build(deps): bump github.com/docker/cli
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 28.1.1+incompatible to 29.2.0+incompatible.
- [Commits](https://github.com/docker/cli/compare/v28.1.1...v29.2.0)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-version: 29.2.0+incompatible
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-07 23:33:53 +00:00
Elle
2b53284aa3
Merge pull request #1263 from lightninglabs/dependabot/go_modules/litrpc/google.golang.org/grpc-1.79.3
build(deps): bump google.golang.org/grpc from 1.65.0 to 1.79.3 in /litrpc
2026-05-07 16:27:28 -07:00
Elle
05cc24348b
Merge pull request #1279 from lightninglabs/dependabot/go_modules/go.opentelemetry.io/otel/sdk-1.43.0
build(deps): bump go.opentelemetry.io/otel/sdk from 1.40.0 to 1.43.0
2026-05-07 16:25:29 -07:00
Elle
b53d176c1a
Merge pull request #1291 from lightninglabs/dependabot/go_modules/perms/go.opentelemetry.io/otel-1.41.0
build(deps): bump go.opentelemetry.io/otel from 1.40.0 to 1.41.0 in /perms
2026-05-07 16:25:08 -07:00
Elle
6e875ec309
Merge pull request #1297 from lightninglabs/dependabot/go_modules/litrpc/go.opentelemetry.io/otel-1.41.0
build(deps): bump go.opentelemetry.io/otel from 1.40.0 to 1.41.0 in /litrpc
2026-05-07 16:25:01 -07:00
Elle
d90938dca3
Merge pull request #1298 from lightninglabs/dependabot/go_modules/github.com/jackc/pgx/v5-5.9.2
build(deps): bump github.com/jackc/pgx/v5 from 5.7.4 to 5.9.2
2026-05-07 16:24:51 -07:00
Viktor Torstensson
c74a08d2ed
Merge pull request #1274 from Cyberguru1/rename-accounts
account: add option to rename account
2026-05-07 23:01:45 +02:00
dependabot[bot]
a4e93694e5
build(deps): bump google.golang.org/grpc in /litrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.65.0 to 1.79.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.65.0...v1.79.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.79.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-06 09:28:19 +00:00
dependabot[bot]
6a96b11dc1
build(deps): bump google.golang.org/grpc in /autopilotserverrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.3 to 1.79.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.3...v1.79.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.79.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-06 09:27:52 +00:00
dependabot[bot]
fb896610da
build(deps): bump github.com/jackc/pgx/v5 from 5.7.4 to 5.9.2
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.4 to 5.9.2.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.7.4...v5.9.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.9.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-05 20:18:16 +00:00
dependabot[bot]
42ba9cc97a
build(deps): bump go.opentelemetry.io/otel in /litrpc
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-version: 1.41.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-05 20:18:06 +00:00
dependabot[bot]
ae98f9b9fb
build(deps): bump go.opentelemetry.io/otel in /perms
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-version: 1.41.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-05 20:04:38 +00:00
dependabot[bot]
2db5e53fc4
build(deps): bump go.opentelemetry.io/otel/sdk from 1.40.0 to 1.43.0
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.43.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.43.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.43.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-05 20:04:29 +00:00
Elle
73e225e1a6
Merge pull request #1290 from lightninglabs/dependabot/go_modules/go.opentelemetry.io/otel-1.41.0
build(deps): bump go.opentelemetry.io/otel from 1.40.0 to 1.41.0
2026-05-05 13:02:50 -07:00
cyberguru1
afe032a50d
accounts, litcli: address description for the command update and the space removal
This commit updates the account update command description and ArgsUsage
for better clarity.

Additionally, a formatting nit is fixed in the checkLabel error message
to ensure no line starts with a space character.
2026-05-05 13:39:14 -05:00
cyberguru1
d435ca7fe6
docs: update release notes for account renaming 2026-05-05 13:39:14 -05:00
cyberguru1
06c018da98
litcli: add --new_label flag to accounts update 2026-05-05 13:39:14 -05:00
cyberguru1
21ae1c74b0
accounts: implement account rename support in stores 2026-05-05 13:39:14 -05:00
cyberguru1
85997ceefe
accounts: extract checkLabel helper from NewAccount 2026-05-05 13:38:27 -05:00
cyberguru1
24d7307a2e
db: add UpdateAccountLabel query 2026-05-05 13:38:27 -05:00
cyberguru1
b7cd3503f3
proto: add new_label to UpdateAccountRequest 2026-05-05 13:38:27 -05:00
Viktor Torstensson
b83b8b769d
Merge pull request #1295 from 0xfandom/docs/859-freebsd-gmake
docs: note that FreeBSD users need gmake to build
2026-05-05 16:36:13 +02:00
0xfandom
e993695f5b docs: mention FreeBSD gmake requirement in README
Many users land on the README before opening docs/compile.md, so
surface the same gmake note there to save them a failed `make`
invocation.
2026-05-05 11:33:00 +05:30
Viktor Torstensson
fc5c98efb8
Merge pull request #1281 from bitromortac/2604-bbolt-mmap-fix
accounts: fix database mmap issue
2026-05-04 16:18:15 +02:00
0xfandom
6d127b93c4 docs: note that FreeBSD users need gmake to build
The Makefile uses GNU Make features, which on FreeBSD requires the
gmake port rather than the base system make. Add a short note to the
compile instructions so FreeBSD users know to install gmake and use
it in place of make.

Closes #859
2026-05-01 19:11:05 +05:30
dependabot[bot]
c4143df7e4
build(deps): bump go.opentelemetry.io/otel from 1.40.0 to 1.41.0
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-version: 1.41.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-24 20:51:35 +00:00
Jamal James
ab8e4ab3bb
Merge pull request #1283 from lightninglabs/dependabot/npm_and_yarn/app/follow-redirects-1.16.0
build(deps): bump follow-redirects from 1.15.6 to 1.16.0 in /app
2026-04-23 09:59:29 -05:00
Jamal James
258bd24a3e
Merge pull request #1273 from lightninglabs/dependabot/npm_and_yarn/app/defu-6.1.6
build(deps): bump defu from 6.1.3 to 6.1.6 in /app
2026-04-23 09:57:15 -05:00
Jamal James
5b93cbd1f3
Merge pull request #1270 from lightninglabs/dependabot/npm_and_yarn/app/node-forge-1.4.0
build(deps): bump node-forge from 1.3.2 to 1.4.0 in /app
2026-04-23 09:56:29 -05:00
Jamal James
6be2a771d7
Merge pull request #1275 from lightninglabs/dependabot/npm_and_yarn/app/lodash-4.18.1
build(deps): bump lodash from 4.17.23 to 4.18.1 in /app
2026-04-23 09:55:54 -05:00