Skip to content

Conversation

@asmogo
Copy link
Collaborator

@asmogo asmogo commented Sep 25, 2025

Description

  • Replace Ln/LnBackend with Backend/BackendType across mintd
  • Move settings.ln.ln_backend to settings.backend.name
  • Update example config: [ln] -> [backend], ln_backend -> name
  • Adjust env var mapping and internal references accordingly
  • Add serde aliases for fake_wallet and grpc_processor
  • Update integration tests to the new settings schema

BREAKING CHANGE: rename config table and key:

  • [ln] -> [payment_backend]
  • ln_backend -> kind

Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

- Replace Ln/LnBackend with Backend/BackendType across mintd
- Move settings.ln.ln_backend to settings.backend.name
- Update example config: [ln] -> [backend], ln_backend -> name
- Adjust env var mapping and internal references accordingly
- Add serde aliases for fake_wallet and grpc_processor
- Improve config loading diagnostics (log path, write snapshot)
- Update integration tests to the new settings schema

BREAKING CHANGE: rename config table and key:
- [ln] -> [backend]
- ln_backend -> name
@asmogo asmogo marked this pull request as ready for review September 27, 2025 08:44
@asmogo
Copy link
Collaborator Author

asmogo commented Sep 29, 2025

should we do prefixes to the payment_backends? like
[payment_backend.cln] instead of [cln].

This would be consistent with the database configuration.

@thesimplekid
Copy link
Collaborator

should we do prefixes to the payment_backends? like [payment_backend.cln] instead of [cln].

This would be consistent with the database configuration.

Yes I think this is better

Consolidate all payment backend settings under [payment_backend]
Replace backend.name with payment_backend.kind
Move per-backend sections to payment_backend.<backend>
Update Settings and env var loading to read nested backend configs
Update example config and integration tests to new layout

BREAKING CHANGE:
- TOML:
  - [backend].name -> [payment_backend].kind
  - [cln], [lnd], [ldk_node], [lnbits], [fake_wallet], [grpc_processor]
    -> [payment_backend.<backend>]
  - kind "fakewallet" renamed to "fake_wallet"
- Env vars:
  - CDK_MINTD_CLN_* -> CDK_MINTD_PAYMENT_BACKEND_CLN_*
  - CDK_MINTD_LND_* -> CDK_MINTD_PAYMENT_BACKEND_LND_*
  - CDK_MINTD_FAKE_WALLET_* ->
    CDK_MINTD_PAYMENT_BACKEND_FAKE_WALLET_*
  - CDK_MINTD_GRPC_PAYMENT_PROCESSOR_* ->
    CDK_MINTD_PAYMENT_BACKEND_GRPC_PAYMENT_PROCESSOR_*
# Conflicts:
#	crates/cdk-mintd/example.config.toml
#	crates/cdk-mintd/src/config.rs
#	crates/cdk/src/mint/start_up_check.rs
#	docker-compose.yaml
@asmogo
Copy link
Collaborator Author

asmogo commented Dec 10, 2025

I have updated this to be backwards compatible with the old config 60037e7

We print deprecation warnings to std out if we see the old [ln] configuration is still active.

@thesimplekid thesimplekid added this to CDK Dec 15, 2025
@github-project-automation github-project-automation bot moved this to Backlog in CDK Dec 15, 2025
@thesimplekid thesimplekid moved this from Backlog to In progress in CDK Dec 15, 2025
@thesimplekid
Copy link
Collaborator

thesimplekid commented Dec 15, 2025

Tried this with my existing config and worked and got the expected warning. Is there anything else you have left here or think its good?

ACK b00c944

This does not rename anything that gets added to the db so we don't have to migrate anything there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants