feat: add inactive/expired keysets to fake wallet via MintBuilder #1687
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!1687
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Forte11Cuba/feat/test-keysets-mint-builder"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Implements the MintBuilder-based approach for creating inactive/expired test keysets in the fake wallet mint, as requested in #1596 and the review feedback on #1681.
Changes:
final_expiry: Option<u64>parameter toMint::rotate_keysetso callers can set an expiry on the rotated-out keysetKeysetRotationstruct andwith_keyset_rotation()builder method onMintBuilderto configure extra keyset rotations at build timecreate_test_keysets: boolconfig option toFakeWallet(configurable via CDK_MINTD_FAKE_WALLET__CREATE_TEST_KEYSETS=true`)create_test_keysetsinstart_fake_mintbinary for integration testsTarget keyset layout when
create_test_keysets: true:final_expiryin the past (expired)final_expiry(rotation-deactivated)Notes to the reviewers
final_expirybugfix is separate (PR #1686)MintBuilderpattern as requested by @thesimplekid instead of splittingrun_mintd_with_shutdownrotate_keysetpassNonefor the new parameter (no behavior change)KeysetRotationstruct is intentionally simple and mirrorsRotateKeyArgumentsfieldsSuggested CHANGELOG Updates
CHANGED
ADDED
final_expiryparameter toMint::rotate_keysetto allow setting expiry on rotated keysetsKeysetRotationstruct andMintBuilder::with_keyset_rotation()for configuring extra keyset rotations at build timecreate_test_keysetsconfig option toFakeWalletfor creating inactive/expired test keysetsREMOVED
FIXED
Checklist
just final-checkbefore committingCan you rebase this on main now that https://github.com/cashubtc/cdk/pull/1686 is merged.
It would be nice if we could allow the user to configure what keysets they want instead of just a default test matrix like it is now. To do this we could add new env configs for the fake mint. I believe nutshell has something like this so we could mirror that.
I think this looks good. Can you just fix the clippy warning. Another thing that might be useful is being able to set the denominations of the keyset but we can leave that for a follow up.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.