Set idempotency key in renew_leaf gRPC calls#755
Merged
JssDWt merged 1 commit intobreez:mainfrom Mar 30, 2026
Merged
Conversation
dangeross
approved these changes
Mar 22, 2026
Collaborator
dangeross
left a comment
There was a problem hiding this comment.
LGTM. Looks like just faucet errors in the tests
JssDWt
reviewed
Mar 23, 2026
Collaborator
JssDWt
left a comment
There was a problem hiding this comment.
Looking good. Just a nit.
960a1d4 to
71bf0ae
Compare
Collaborator
|
I took the liberty of taking over this PR. |
danielgranhao
approved these changes
Mar 26, 2026
roeierez
approved these changes
Mar 27, 2026
dangeross
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
x-idempotency-keygRPC metadata header to all threerenew_leafcall sites (renew_node,renew_refund,renew_zero_timelock)set_idempotency_keyhelper in a newmetadata.rsmodule for use by future RPC endpointsMotivation
We've been seeing
renew_leaffailures when paying Spark invoices:Root cause: the SDK occasionally calls
renew_leaftwice for the same leaf within milliseconds. The first call succeeds but the second fails because the leaf was already renewed. With the idempotency key, the signing operator returns the cached response from the first call instead of processing the duplicate.