fix: pass final_expiry through in DbSignatory::rotate_keyset #1686

Merged
Forte11Cuba merged 4 commits from fix/final-expiry-passthrough into main 2026-03-03 10:24:51 +00:00
Forte11Cuba commented 2026-02-27 01:37:52 +00:00 (Migrated from github.com)

Description

The final_expiry field from RotateKeyArguments was hardcoded to None in DbSignatory::rotate_keyset, causing any expiry set during keyset rotation to be silently discarded. Now correctly forwards args.final_expiry to create_new_keyset.


Notes to the reviewers

Single-line fix. The create_new_keyset function already accepts final_expiry: Option<u64> and RotateKeyArguments already carries the field it just wasn't being passed through.


Suggested CHANGELOG Updates

CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED

  • final_expiry passthrough in DbSignatory::rotate_keyset was hardcoded to None, now correctly uses the value from RotateKeyArguments

Checklist

### Description The `final_expiry` field from `RotateKeyArguments` was hardcoded to `None` in `DbSignatory::rotate_keyset`, causing any expiry set during keyset rotation to be silently discarded. Now correctly forwards `args.final_expiry` to `create_new_keyset`. ----- ### Notes to the reviewers Single-line fix. The `create_new_keyset` function already accepts `final_expiry: Option<u64>` and `RotateKeyArguments` already carries the field it just wasn't being passed through. ----- ### Suggested [CHANGELOG](https://github.com/cashubtc/cdk/blob/main/CHANGELOG.md) Updates [CHANGELOG](https://github.com/cashubtc/cdk/blob/main/CHANGELOG.md) Updates #### CHANGED #### ADDED #### REMOVED #### FIXED - `final_expiry` passthrough in `DbSignatory::rotate_keyset` was hardcoded to `None`, now correctly uses the value from `RotateKeyArguments` ---- ### Checklist * [x] I followed the [code style guidelines](https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md) * [ ] I ran `just final-check` before committing
thesimplekid commented 2026-02-27 10:52:24 +00:00 (Migrated from github.com)

Looks like we also need to set it here. Ideally we could add a test were we call rotate on the mint with an expiry and check it is set correctly. We do not need to use the grpc for this test, just rotate with an expiry directly on the mint.

github.com/cashubtc/cdk@e3f8dd0bab/crates/cdk/src/mint/keysets/mod.rs (L92)

Looks like we also need to set it here. Ideally we could add a test were we call rotate on the mint with an expiry and check it is set correctly. We do not need to use the grpc for this test, just rotate with an expiry directly on the mint. https://github.com/cashubtc/cdk/blob/e3f8dd0bab37127faf9426833b851ff43e7cdd98/crates/cdk/src/mint/keysets/mod.rs#L92
thesimplekid (Migrated from github.com) approved these changes 2026-03-03 10:24:21 +00:00
thesimplekid (Migrated from github.com) left a comment

Thanks for adding the tests.

LGTM

Thanks for adding the tests. LGTM
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!1686
No description provided.