23 KiB
Changelog
0.11.0
Summary
Version 0.11.0 brings significant architectural changes to enhance database reliability and performance. The major changes include:
-
Database Engine Change: Replaced
sqlxwithrusqliteas the SQLite database driver and removed support forredb. This change provides better performance and reliability for database operations. -
Transaction Management: Introduced robust database transaction support that encapsulates all database changes. The new Transaction trait implements a rollback operation on Drop unless explicitly committed, ensuring data integrity.
-
Race Condition Prevention: Added READ-and-lock operations to securely read and lock records from the database for exclusive access, preventing race conditions in concurrent operations.
⚠️ Important Migration Note for redb Users
If you are currently running a mint with redb, you must migrate to SQLite before upgrading to v0.11. Follow these steps:
- Stop your current mint
- Back up your database
- Use the migration script available at: https://github.com/cashubtc/cdk/blob/main/misc/convert_redb_to_sqlite.sh
- Update your config file to target the SQLite database engine
- Start your mint with v0.11
Added
- cdk-lnbits: Support lnbits v1 and pre-v1 PR (thesimplekid).
- Support for Keyset v2 PR (lollerfirst).
- Add option to limit the token size of a send PR (davidcaseria).
- Database transaction support PR (crodas).
- Support for multsig refund PR (thesimplekid).
- Convert unit helper fn PR (davidcaseria).
Changed
- cdk-sqlite: remove sqlx in favor of rusqlite (crodas).
- cdk-lnd: use custom tonic gRPC instead of fedimint-tonic-grpc PR (thesimplekid).
- cdk-cln: remove the us of mutex on cln client PR (thesimplekid).
Fixed
- mint start up check was not checking unpaid quotes PR (gudnuf).
- Naming of blinded_message column on blind_signatures was y PR (thesimplekid).
- cdk-cli: Create wallets for non sat units if supported PR (thesimplekid).
Removed
- cdk-redb support for the mint PR (thesimplekid).
- cdk-sqlite remove unused melt_request table PR (crodas)
0.10.1
Fix
- Set mint version when mint rpc is enabled PR (thesimplekid).
cdk-signatoryis optional for wallet PR (thesimplekid).
0.10.0
Added
- SignatoryManager service PR (crodas).
- Mint URL flag option PR (thesimplekid).
- Export NUT-06 supported settings field PR (davidcaseria).
- Docker build workflow for arm64 images PR (asmo).
Changed
- cdk-redb: Removed mint storage functionality to be wallet-only (thesimplekid).
- Updated Nix flake to 25.05 and removed Nix cache PR (thesimplekid).
- Updated dependencies PR (thesimplekid).
- Refactored NUT-04 and NUT-05 PR (thesimplekid).
- Updated Nix flake to 25.05 and removed Nix cache PR (thesimplekid).
0.9.3
Changed
Fixed
- Handle old nut15 format to keep compatibility with older nutshell version PR (thesimplekid).
0.9.2
Added
- HTLC from hash support PR (thesimplekid).
- Optional transport and NUT-10 secret on payment request PR (thesimplekid).
- Multi-part payments support in cdk-cli PR (thesimplekid).
Changed
- Refactored Lightning module to use common types PR (thesimplekid).
- Updated LND to support mission control and improved requery behavior PR (lollerfirst).
Fixed
- NUT-18 payment request encoding/decoding PR (thesimplekid).
- Mint URL trailing slash handling PR (thesimplekid).
- Get spendable to return witness PR (thesimplekid).
- Melt start up check PR (thesimplekid).
- Race conditions with proof state updates (crodas).
0.9.1
Fixed
- Remove URLs in gRPC management interface (thesimplekid).
- Only count signatures from unique pubkeys (thesimplekid).
- Race conditions with proof state updates (crodas).
- Debug print of Info struct (thesimplekid).
- Correct mnemonic hashing in Debug implementation (thesimplekid).
Changed
- Updated lnbits-rs to 0.5.0 (Darrell).
- Update stable Rust to 1.86.0 (thesimplekid).
- Added CORS headers in responses PR (lollerfirst).
- Mint should not enforce expiry (thesimplekid).
- Ensure unique proofs when calculating token value (thesimplekid).
0.9.0
Added
- Amountless invoices NUT PR (thesimplekid).
create_time,paid_timeto mint and melt quotes PR (thesimplekid).- cdk-mint-rpc: Added get mint and melt quotes ttl PR (thesimplekid).
Changed
- cashu: Move wallet mod to cdk-common (thesimplekid).
- Export Mint DB Traits PR (davidcaseria).
- Move Mint and Melt quote to
cdkcommit fromcashuPR (thesimplekid).
Fixed
- Creation of memory sqlite db PR (crodas).
- cdk-cli: Ensure auth wallet is created before attempting to mint pending PR (thesimplekid).
- cdk-mint-rpc: Adding mint urls was not updating correctly PR (thesimplekid).
- cdk-mint-rpc: Fixed setting long description PR (thesimplekid).
v0.8.1
Fixed
- cashu: Handle url with paths PR (benthecarman).
Changed
- cdk: Export
MintKeySetInfoPR (davidcaseria).
v0.8.0
Fixed
- cdk: Proof matches conditions was not matching payment conditions correctly (thesimplekid).
- cdk: Updating mint_url would remove proofs when we want to keep them (ok300).
- Wallet: Fix ability to receive cashu tokens that include DLEQ proofs (ok300).
- cdk-sqlite: Wallet was not storing dleq proofs (thesimplekid).
Changed
- Updated MSRV to 1.75.0 (thesimplekid).
- cdk-sqlite: Do not use
UPDATE OR REPLACE(crodas). - cdk: Refactor keyset init (lollerfirst).
- Feature-gated lightning backends (CLN, LND, LNbits, FakeWallet) for selective compilation (thesimplekid).
- cdk-sqlite: Update sqlx to 0.7.4 (benthecarman).
- Unifies and optimizes the proof selection algorithm to use Wallet::select_proofs (davidcaseria).
- Wallet::send now requires a PreparedSend (davidcaseria).
- WalletDatabase proof state update functions have been consolidated into update_proofs_state (davidcaseria).
- Moved
MintQuoteandMeltQuotefromcashutocdk-common(thesimplekid).
Added
- Added redb feature to mintd in order to meet MSRV target (thesimplekid).
- cdk-sqlite: In memory sqlite database (crodas).
- Add
tos_urltoMintInfo(nodlAndHodl). - cdk: Add tos_url setter to
MintBuilder(thesimplekid). - Added optional "request" and "unit" fields to MeltQuoteBolt11Response NUT Change (thesimplekid).
- Added optional "amount" and "unit" fields to MintQuoteBolt11Response NUT Change (thesimplekid).
- Compile-time error when no lightning backend features are enabled (thesimplekid).
- Add support for sqlcipher (benthecarman).
- Payment processor (thesimplekid).
- Payment request builder (thesimplekid).
- Sends should be initiated by calling Wallet::prepare_send (davidcaseria).
- A SendOptions struct controls optional functionality for sends (davidcaseria).
- Allow Amount splitting to target a fee rate amount (davidcaseria).
- Utility functions for Proofs (davidcaseria).
- Utility functions for SendKind (davidcaseria).
- Completed checked arithmetic operations for Amount (i.e., checked_mul and checked_div) (davidcaseria).
Removed
- Remove support for Memory Database in cdk (crodas).
- Remove
AmountStr(crodas). - Remove
get_nostr_last_checkedfromWalletDatabase(thesimplekid). - Remove
add_nostr_last_checkedfromWalletDatabase(thesimplekid).
cdk-mintd:v0.7.4
Changed
- cdk-mintd: Update to cdk v0.7.2 (thesimplekid).
cdk:v0.7.2
Fixed
- cdk: Ordering of swap verification checks (thesimplekid).
cdk-mintd-v0.7.2
Fixed
- cdk-mintd: Fixed mint and melt error on mint initialized with RPC interface disabled (ok300).
v0.7.1
Changed
- cdk: Debug print of
Idis hex (thesimplekid). - cdk: Debug print of mint secret is the hash (thesimplekid).
- cdk: Use check_incoming payment on attempted mint or check mint quote (thesimplekid).
- cdk-cln: Use
call_typedfor cln rpc calls (daywalker90).
Added
- cdk: Mint builder add ability to set custom derivation paths (thesimplekid).
Fixed
- cdk-cln: Return error on stream error (thesimplekid).
v0.7.0
Changed
- Moved db traits to
cdk-common(crodas). - Moved other common types to
cdk-common(crodas). Wallet::mintreturns the mintedProofsand not just the amount (davidcaseria).
Added
Token::to_raw_bytesserializes generic token to raw bytes (lollerfirst).Token::try_fromforVec<u8>constructs a generic token from raw bytes (lollerfirst).TokenV4::to_raw_bytes()serializes a TokenV4 to raw bytes following the spec (lollerfirst).Wallet::receive_rawwhich receives raw binary tokens (lollerfirst).- cdk-mint-rpc: Mint management gRPC client and server (thesimplekid).
- cdk-common: cdk specific types and traits (crodas).
- cashu: Core types and functions defined in NUTs (crodas).
Fixed
- Multimint unit check when wallet receiving token (thesimplekid).
- Mint start up with most recent keyset after a rotation (thesimplekid).
cdk-v0.6.1, cdk-mintd-v0.6.2
Fixed
- cdk: Missing check on mint that outputs equals the quote amount (thesimplekid).
- cdk: Reset mint quote status if in state that cannot continue (thesimplekid).
v0.6.1
Added
- cdk-mintd: Get work-dir from env var (thesimplekid).
v0.6.0
Changed
Added
- cdk:
NUT19Settings inNUT06info (thesimplekid). - cdk:
NUT17Websocket support for wallet (crodas). - cdk-axum: Redis cache backend (crodas).
- cdk-mints: Get mint settings from env vars (thesimplekid).
- cdk-axum: HTTP compression support (ok300).
Fixed
- cdk-sqlite: Keyset counter was overwritten when keyset was fetched from mint (thesimplekid).
- cdk-cli: On
mintuseunitfrom cli args (thesimplekid). - cdk-cli: On
restorecreatewalletif it does not exist (thesimplekid). - cdk: Signaling support for optional nuts (thesimplekid).
- cdk-phd: Check payment has valid uuid (thesimplekid).
v0.5.0
Changed
- cdk: Bump
bitcointo0.32.2(prusnak). - cdk: Bump
lightning-invoiceto0.32.2(prusnak). - cdk: Bump
lightningto0.0.124(prusnak). - cdk:
PaymentMethodas anon_exhaustiveenum (thesimplekid). - cdk:
CurrencyUnitas anon_exhaustiveenum (thesimplekid). - cdk: Enforce token is single mint (thesimplekid).
- cdk: Mint will return change for over paid melt even over fee reserve (davidcaseria).
- cdk: Refactor ln_backeds to be on the
cdk::Mintand not with axum (thesimplekid). - cdk: Change is returned in the check quote response (thesimplekid).
- cdk: Move unit conversion util fn to amount module (davidcaseria).
- cdk: Remove spent proofs from db when check state is called (mubarak23).
- cdk: Use
MintUrldirectly in wallet client (ok300). - cdk-cli: Change cdk-cli pay command to melt (mubarak23).
- cdk: Rename
Wallet::get_proofstoWallet::get_unspent_proofs(ok300). - cdk:
Idtou32changed fromTryFromtoFrom(vnprc).
Added
- cdk: Added description to
MintQuoteBolt11Request(lollerfirst). - cdk(wallet): Added description to
mint_quote(lollerfirst). - cdk: Add
amountandfee_paidtoMelted(davidcaseria). - cdk: Add
from_proofsonMelted(davidcaseria). - cdk: Add unit on
PaymentResponse(thesimplekid). - cdk: Add description for mint quote (lollerfirst).
- cdk-axum: Add cache to some endpoints (lollerfirst).
- cdk: Add Proofs trait (ok300).
- cdk: Wallet verifies keyset id when first fetching keys (thesimplekid).
- cdk-mintd: Add swagger docs (ok300).
- cdk: NUT18 payment request support (thesimplekid).
- cdk: Add
Wallet::get_proofs_with(ok300). - cdk: Mint NUT-17 Websocket support (crodas).
Removed
- cdk: Remove
MintMeltSettingssince it is no longer used (lollerfirst). - cdk:
PaymentMethod::Custom(thesimplekid). - cdk: Remove deprecated
MeltBolt11Response(thesimplekid).
Fixed
- cdk: Check of inputs to include fee (thesimplekid).
- cdk: Make unit mandatory in tokenv4 (ok300).
v0.4.0
Changed
- cdk: Reduce MSRV to 1.63.0 (thesimplekid).
- cdk-axum: Reduce MSRV to 1.63.0 (thesimplekid).
- cdk-strike: Reduce MSRV to 1.63.0 (thesimplekid).
- cdk-lnbits: Reduce MSRV to 1.63.0 (thesimplekid).
- cdk-phoenixd: Reduce MSRV to 1.63.0 (thesimplekid).
- cdk-fake-wallet: Reduce MSRV to 1.63.0 (thesimplekid).
- cdk-cln: Reduce MSRV to 1.63.0 (thesimplekid).
- cdk-sqlite: Reduce MSRV to 1.66.0 (thesimplekid).
- cdk-redb: Reduce MSRV to 1.66.0 (thesimplekid).
- cdk: Format url base lowercase (callebtc).
- cdk: Use CDK error type instead of mint and wallet specific (thesimplekid).
- cdk-cli: Tokenv4 error print diagnostic notation (ok300).
- cdk-redb: Remove use of mutex (thesimplekid).
Added
- cdk: Multiple error types (thesimplekid).
Fixed
- cdk(mint): Use checked addition on amount to ensure there is no overflow (thesimplekid).
Removed
- cdk(wallet): Removed CDK wallet error (thesimplekid).
- cdk(mint): Removed CDK mint error (thesimplekid).
v0.3.0
Changed
- cdk(wallet):
fn sendreturnsTokenso the user can use the struct of convert it to a v3 or v4 string (thesimplekid). - cdk(wallet): Publicly export
MultiMintWallet(thesimplekid). - cdk(cdk-database/mint): Get
pendingandspentproofsbyysorsecretsinstead of a single proofs (thesimplekid). - cdk(cdk-database/mint): Change
add_blind_signaturetoadd_blind_signatures(thesimplekid). - cdk(cdk-database/mint): Rename
add_active_keysettoset_active_keyset(thesimplekid). - cdk(cdk-database/wallet): Change
get_proofsto returnVec<ProofInfo>instead ofOption<Vec<ProofInfo>>(thesimplekid). - cdk-cli: Receive will add wallet when receiving if mint is unknown (thesimplekid).
- cdk(cdk-database/mint): Rename
get_blinded_signaturestoget_blind_signatures(thesimplekid). - cdk(cdk-database/mint): Rename
get_blinded_signatures_for_keysettoget_blind_signatures_for_keyset(thesimplekid). - cdk(mint): Typo rename
total_redeametototal_redeemed(vnprc). - cdk(mint): Refactored
MintKeySet::generate_from_xprivandMintKeySet::generate_from_seedmethods to accept max_order, currency_unit, and derivation_path parameters directly (vnprc). - cdk(wallet): Return WalletKey for UnknownWallet error (davidcaseria).
- cdk(cdk-lightning):
CreateInvoiceResponseadded expiry time to better support backends where it cannot be set (thesimplekid). - cdk(cdk-lightning): Use
Amounttype instead ofu64(thesimplekid). - cdk(cdk-lightning):
CreateInvoicerequires unit argument (thesimplekid). - cdk(cdk/multi_mint_wallet):
get_balancesreturns aBTreeMapinstead ofHashMap(thesimplekid).
Added
- cdk(NUT-11): Add
CopyonSigFlag(thesimplekid). - cdk(wallet): Add
fn send_proofsthat marks proofs asreservedand creates token (thesimplekid). - cdk(wallet): Add
fn melt_proofsthat uses specific proofs formeltinstead of selecting (thesimplekid). - cdk-cli(receive): Add support for signing keys to be nostr nsec encoded (thesimplekid).
- cdk-fake-wallet: Add Fake wallet for testing (thesimplekid).
- cdk(cdk-database/mint): Add
add_proofs,get_proofs_by_ys,get_proofs_states, andupdate_proofs_states(thesimplekid). - cdk(cdk-database/mint): Add
get_blinded_signatures_for_keysetto get all blind signatures for akeyset_id(thesimplekid). - cdk(mint): Add
total_issuedandtotal_redeamed(thesimplekid). - cdk(cdk-database/mint) Add
get_proofs_by_keyset_id(thesimplekid). - cdk(wallet/mint): Add
mint_icon_url(cjbeery24). - cdk: Add
MintUrlthat sanitizes mint url by removing trailing/(cjbeery24). - cdk(cdk-database/mint): Add
update_proofsthat both adds newProofInfos to the db and deletes (davidcaseria). - cdk(cdk-database/mint): Add
set_pending_proofs,reserve_proofs, andset_unspent_proofs(davidcaseria).
Fixed
- cdk(mint):
SIG_ALLis not allowed inmelt(thesimplekid). - cdk(mint): On
swapverify correct number of sigs on outputs whenSigAll(thesimplekid). - cdk(mint): Use amount in payment_quote response from ln backend (thesimplekid).
- cdk(mint): Create new keysets for added supported units (thesimplekid).
- cdk(mint): If there is an error in swap proofs should be reset to unspent (thesimplekid).
Removed
- cdk(wallet): Remove unused argument
SplitTargetonmelt(thesimplekid). - cdk(cdk-database/mint): Remove
get_spent_proofs,get_spent_proofs_by_ys,get_pending_proofs,get_pending_proofs_by_ys, andremove_pending_proofs(thesimplekid). - cdk: Remove
UncheckedUrlin favor ofMintUrl(cjbeery24). - cdk(cdk-database/mint): Remove
set_proof_state,remove_proofsandadd_proofs(davidcaseria).
v0.2.0
Summary
This release introduces TokenV4, which uses CBOR encoding as the default token format. It also includes fee support for both wallet and mint operations.
When sending, the sender can choose to include the necessary fee to ensure that the receiver can redeem the full sent amount. If this is not done, the receiver will be responsible for the fee.
Additionally, this release introduces a Mint binary cdk-mintd that uses the cdk-axum crate as a web server to create a full Cashu mint. When paired with a Lightning backend, currently implemented as Core Lightning, it is included in this release as cdk-cln.
Changed
- cdk(wallet):
wallet:receivewill not claimproofsfrom a mint other than the wallet's mint (thesimplekid). - cdk(NUT00):
Tokenis changed from astructtoenumof eitherTokenV4orTokenv3(thesimplekid). - cdk(NUT00): Rename
MintProofstoTokenV3Token(thesimplekid). - cdk(wallet): Additional arguments in
sendsend_kindandinclude_feesfor control of how to handle fees in a send (thesimplekid). - cdk(wallet): Additional arguments in
create_swapinclude_feesfor control of if fees to redeem the send proofs are included in send amount (thesimplekid).
Added
- cdk: TokenV4 CBOR (davidcaseria/thesimplekid).
- cdk(wallet):
wallet::receive_prooffunctions to claim specific proofs instead of encoded token (thesimplekid). - cdk-cli: Flag on
sendto print v3 token, default is v4 (thesimplekid). - cdk:
MintLightningtrait (thesimplekid). - cdk-mintd: Mint binary (thesimplekid).
- cdk-cln: cln backend for mint (thesimplekid).
- cdk-axum: Mint axum server (thesimplekid).
- cdk: NUT06
MintInfoandNUTsbuilder (thesimplekid). - cdk: NUT00
PreMintSecretadded Keyset id (thesimplekid). - cdk: NUT02 Support fees (thesimplekid).
Fixed
- cdk: NUT06 deserialize
MintInfo(thesimplekid).
v0.1.1
Changed
- cdk(wallet):
wallet::total_pending_balancedoes not include reserved proofs (thesimplekid).
Added
- cdk(wallet): Added get reserved proofs (thesimplekid).