Commit Graph

1107 Commits

Author SHA1 Message Date
thesimplekid
0731f9e809 docs: changelog 2025-03-13 09:19:00 +00:00
thesimplekid
110245e6c8 fix: Improve spending conditions validation in ProofInfo (#654) 2025-03-13 09:14:37 +00:00
thesimplekid
8d1b35f52e fix: Improve spending conditions validation in ProofInfo 2025-03-12 20:51:03 +00:00
ok300
72dff95322 Merge pull request #653 from ok300/ok300-fix-update-mint-url
Wallet: fix `update_mint_url`
2025-03-11 18:41:52 +00:00
thesimplekid
158e321e0e Merge pull request #652 from ok300/ok300-fix-integration-test-loop
Integration tests: fix `wait_for_mint_to_be_paid` loop
2025-03-11 12:06:39 +00:00
ok300
3ba3449c81 Integration tests: fix wait_for_mint_to_be_paid loop 2025-03-11 12:18:24 +01:00
thesimplekid
7a97510ec1 Merge pull request #651 from benthecarman/update-sqlx
chore: Update sqlx to 0.7.4
2025-03-11 09:38:50 +00:00
benthecarman
8cd4ea301a chore: Update sqlx to 0.7.4 2025-03-10 19:01:57 -05:00
thesimplekid
40e1b5dda4 Merge pull request #649 from thesimplekid/ci_clean_up
ci: Make all jobs depend on pre-commit-checks passing
2025-03-10 19:26:06 +00:00
thesimplekid (aider)
9170fbe86c ci: Make all jobs depend on pre-commit-checks passing 2025-03-10 16:35:48 +00:00
thesimplekid
a691df7916 Merge pull request #650 from benthecarman/rm-clone
fix: remove unnecessary clone
2025-03-10 16:31:55 +00:00
benthecarman
080f4ef2bf fix: remove unnecessary clone 2025-03-10 11:07:19 -05:00
thesimplekid
3bf908d89d Merge pull request #648 from TechVest/main
chore: remove redundant words in comment
2025-03-10 15:30:49 +00:00
thesimplekid
a7c7a4caea Merge pull request #597 from thesimplekid/refactor_payment_processor
feat: payment processor
2025-03-10 15:10:41 +00:00
thesimplekid
162507c492 feat: payment processor 2025-03-10 14:44:57 +00:00
TechVest
c5284b889f chore: remove redundant words in comment
Signed-off-by: TechVest <techdashen@qq.com>
2025-03-10 22:33:22 +08:00
ok300
1131711d91 Drop nostr_last_checked table, remove references (#647)
* cdk-sqlite: Drop unused table nostr_last_checked

* cdk-rexie: Drop unused object store nostr_last_checked

* cdk-redb: Remove unused table ref nostr_last_checked
2025-03-10 13:37:20 +00:00
thesimplekid
1d4245549b Merge pull request #646 from thesimplekid/flake_update
chore: update flake
2025-03-10 10:29:43 +00:00
thesimplekid
4c4bde0fe4 chore: update flake 2025-03-10 09:06:37 +00:00
thesimplekid
379d5590db docs: update changelog 2025-03-09 23:33:19 +00:00
thesimplekid
3b2f31e844 Merge pull request #645 from thesimplekid/remove_nostr_from_db
refactor: Remove nostr last checked methods from database trait
2025-03-09 23:29:39 +00:00
thesimplekid (aider)
cb87fefacd refactor: Remove nostr last checked methods from database trait and implementations 2025-03-09 23:11:02 +00:00
thesimplekid
214b75ac31 Merge pull request #640 from benthecarman/sqlcipher
feat: Add support for sqlcipher
2025-03-09 21:42:57 +00:00
benthecarman
40c53e83df feat: Add support for sqlcipher 2025-03-09 15:08:43 -05:00
thesimplekid
b787951dbc feat: Add feature gates for CLN, LND, fakewallet and LNbits backends (#638)
* feat: Add feature gates for CLN, LND, fakewallet and LNbits backends
2025-03-09 14:18:19 +00:00
thesimplekid
a3993c3e4c Merge pull request #642 from thesimplekid/remove_unused_supported
refactor: remove unused ln_backends in cdk-mintd
2025-03-09 10:02:53 +00:00
thesimplekid
93f7979a70 refactor: remove unused ln_backends in cdk-mintd 2025-03-09 09:46:37 +00:00
thesimplekid
467cc0a027 feat: Add migration for keyset_id as foreign key in SQLite database (#634) 2025-03-08 22:46:12 +00:00
thesimplekid
39a7b15221 Check tls certs exist for grpc management serve (#637)
* feat: Add TLS directory existence check before starting RPC server

* feat: Add file existence checks with detailed error logging for TLS files

* chore: fmt
2025-03-08 22:44:46 +00:00
thesimplekid
22beade553 Amount and unit nut04/05 (#635)
* feat: return amount and unit in mint response


Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2025-03-08 22:41:21 +00:00
thesimplekid
b7380dc858 feat: Add tos_url to mintd config (#636)
* feat: Add tos_url to mintd config

* docs: tos in change log
2025-03-07 21:06:22 +00:00
NodlAndHodl
fcf2e9d603 feat: adding tos to mint (#604)
* feat: adding tos(terms of service) to mint and update cdk-sqlite migration
2025-03-07 20:29:10 +00:00
ok300
5a7362c09f Simplify process_swap_request (#631)
* Simplify process_swap_request

* Fix occasional test_swap_to_send wallet errors
2025-03-06 15:08:59 +00:00
thesimplekid
393c95e115 Merge pull request #630 from thesimplekid/db_check_on_delete_proofs
Db check on delete proofs
2025-03-06 09:41:40 +00:00
thesimplekid
a394145fba Merge pull request #629 from ok300/ok300-ensure-cdk
Add `ensure_cdk` macro for validation checks
2025-03-06 09:40:31 +00:00
thesimplekid (aider)
d41d3a7c94 refactor: Add state check before deleting proofs to prevent removing spent proofs 2025-03-06 09:23:40 +00:00
ok300
813794353a Add ensure_cdk macro 2025-03-05 17:39:08 +01:00
thesimplekid
c6200331cf Merge pull request #626 from thesimplekid/remove_phd
Remove phd
2025-03-05 11:20:38 +00:00
thesimplekid
f5be0ceeb6 chore: remove phd 2025-03-05 11:04:05 +00:00
thesimplekid
ca1fca2825 chore: update CHANGELOG 2025-03-05 10:37:46 +00:00
thesimplekid
e84d6ea7ab chore: Update rust-version (MSRV) to 1.75.0 (#623) 2025-03-05 10:32:41 +00:00
thesimplekid
0cd1d6a194 style: Clean up CHANGELOG.md formatting and consistency (#625) 2025-03-04 19:45:43 +00:00
C
f7d9a1b5db Drop the in-memory database (#613)
* Drop the in-memory database

Fixes #607

This PR drops the implementation of in-memory database traits.

They are useful for testing purposes since the tests should test our codebase
and assume the database works as expected (although a follow-up PR should write
a sanity test suite for all database trait implementors).

As complexity is worth with database requirements to simplify complexity and
add more robustness, for instance, with the following plans to add support for
transactions or buffered writes, it would become more complex and
time-consuming to support a correct database trait. This PR drops the
implementation and replaces it with a SQLite memory instance

* Remove OnceCell<Mint>

Without this change, a single Mint is shared for all tests, and the first tests
to run and shutdown makes the other databases (not-reachable, as dropping the
tokio engine would also drop the database instance).

There is no real reason, other than perhaps performance. The mint should
perhaps run in their own tokio engine and share channels as API interfaces, or
a new instance should be created in each tests

* Fixed bug with foreign keys

[1] https://gist.github.com/crodas/bad00997c63bd5ac58db3c5bd90747ed

* Show more debug on failure

* Remove old code

* Remove old references to WalletMemoryDatabase
2025-03-04 19:44:34 +00:00
thesimplekid (aider)
49ca9ff5d1 style: Clean up CHANGELOG.md formatting and consistency 2025-03-04 13:24:32 +00:00
thesimplekid
d6336b2da8 Merge pull request #624 from thesimplekid/improve_loggind
chore: improve logging in verification
2025-03-04 13:01:07 +00:00
thesimplekid
d615897ef0 chore: improve logging in verification 2025-03-04 12:02:05 +00:00
thesimplekid
a82e3eb314 fix: attempt to swap after a failed transaction (#622)
* fix: attempt to swap after a failed transaction

* fix: revert test change in https://github.com/cashubtc/cdk/pull/585
2025-03-03 14:10:47 +00:00
C
63393056a0 Do not use INSERT OR REPLACE in SQLite. (#620)
Instead, use `INSERT` and `ON CONFLICT`.  The reason is that in case of
conflicts, the `REPLACE` will trigger a DELETE and then perform an INSERT, as
outlined in the documentation[1], and that may cause a cascade of deletion due
to our FOREIGN KEYs.

Here is the official documentation:

```
When a UNIQUE or PRIMARY KEY constraint violation occurs, the REPLACE algorithm
deletes pre-existing rows that are causing the constraint violation prior to
inserting or updating the current row and the command continues executing
normally. If a NOT NULL constraint violation occurs, the REPLACE conflict
resolution replaces the NULL value with the default value for that column, or
if the column has no default value, then the ABORT algorithm is used. If
a CHECK constraint or foreign key constraint violation occurs, the REPLACE
conflict resolution algorithm works like ABORT.  When the REPLACE conflict
resolution strategy deletes rows in order to satisfy a constraint, delete
triggers fire if and only if recursive triggers are enabled.  The update
hook is not invoked for rows that are deleted by the REPLACE conflict
resolution strategy. Nor does REPLACE increment the change counter. The
exceptional behaviors defined in this paragraph might change in a future
release.
```

[1] https://www.sqlite.org/lang_conflict.html
2025-02-28 11:35:29 +00:00
thesimplekid
062d7be58f chore: pin base64ct as newer version is unsuported on stable 2025-02-26 10:57:15 +00:00
thesimplekid
827e4aebde Refactor mintd used in itest (#616) 2025-02-25 11:47:17 +00:00