What changed, and why it matters
This commit removes a feature called 'confirmation-count-based lease retirement' from LND's wallet RPC interface. It deletes fields that let users keep a coin locked until a spending transaction reaches a certain number of confirmations. The change only updates generated API bindings and REST documentation, not the underlying wallet logic. There is no direct evidence in the commit that this fixes a security bug; it appears to be a feature rollback or API cleanup.
Treat as a low-confidence API change. If this is part of a security fix, look for the companion commit that actually removes the server-side implementation of confirmation-count lease retirement and any related release notes or advisory. Users relying on release_after_spend_confs or input_release_after_spend_confs should verify their workflows before upgrading.
Security signals we found
API surface reduction: removes confirmation-count maturity fields from lease requests/responses
Behavior change: leases can no longer be configured to expire after N confirmations of the spending transaction
Generated-only change: no server logic visible in this commit
Commit wording 'lease depth retirement' suggests intentional removal of a lease-lifetime mode
Evidence from the diff
The patch regenerates lnrpc/walletrpc/walletkit.pb.go and walletkit.swagger.json after removing the confirmation-count-controlled lease fields: LeaseOutputRequest.release_after_spend_confs, LeaseOutputResponse.release_after_spend_confs, FundPsbtRequest.input_release_after_spend_confs, and UtxoLease.release_after_spend_confs. The remaining lease modes are time-based expiration and no-expiry (locked until first confirmed spend or explicit release). The commit message says ‘generate lease depth retirement’ and the diff is purely generated RPC/schema changes; no server-side logic is shown. The removal could be a security-motivated rollback of a feature that introduced risks (for example, maturity-depth tracking across reorgs, or accidental permanent locks), but the commit itself does not state that.
Changed components
lnrpc/walletrpc/walletkit.pb.golnrpc/walletrpc/walletkit.swagger.jsonWalletKit RPC API (LeaseOutput, FundPsbt, ListLeases messages)Inspect captured patch +29 / −104
### lnrpc/walletrpc/walletkit.pb.go
@@ -599,19 +599,13 @@ type LeaseOutputRequest struct {
// The identifying outpoint of the output being leased.
Outpoint *lnrpc.OutPoint `protobuf:"bytes,2,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
// The time in seconds before a time-controlled lock expires. If set to
- // zero, the default lock duration is used. A non-zero
- // release_after_spend_confs makes this deadline informational only.
+ // zero, the default lock duration is used. Cannot be combined with
+ // no_expiry.
ExpirationSeconds uint64 `protobuf:"varint,3,opt,name=expiration_seconds,json=expirationSeconds,proto3" json:"expiration_seconds,omitempty"`
- // Keep the lease until the transaction spending the output reaches this
- // confirmation count or the owner explicitly releases it. A reorganization
- // that disconnects the spending block resets maturity progress. A non-zero
- // value ignores expiration_seconds; zero preserves the time-controlled
- // lease behavior.
- ReleaseAfterSpendConfs uint32 `protobuf:"varint,4,opt,name=release_after_spend_confs,json=releaseAfterSpendConfs,proto3" json:"release_after_spend_confs,omitempty"`
// Reserve the unused output without a timeout until owner release or its
- // first confirmed spend. Cannot be combined with non-zero
- // expiration_seconds. Omission preserves
- // the existing lifetime; it does not convert the lease to a timed lease.
+ // first confirmed spend. Cannot be combined with a non-zero
+ // expiration_seconds. Omission preserves the existing lifetime; it does
+ // not convert the lease to a timed lease.
NoExpiry bool `protobuf:"varint,5,opt,name=no_expiry,json=noExpiry,proto3" json:"no_expiry,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
@@ -668,13 +662,6 @@ func (x *LeaseOutputRequest) GetExpirationSeconds() uint64 {
return 0
}
-func (x *LeaseOutputRequest) GetReleaseAfterSpendConfs() uint32 {
- if x != nil {
- return x.ReleaseAfterSpendConfs
- }
- return 0
-}
-
func (x *LeaseOutputRequest) GetNoExpiry() bool {
if x != nil {
return x.NoExpiry
@@ -686,14 +673,8 @@ type LeaseOutputResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
//
//The absolute expiration of a time-controlled output lease represented as a
- //unix timestamp. Confirmation-controlled leases return the stored value for
- //compatibility but do not apply it.
+ //unix timestamp. No-expiry leases do not use this timestamp.
Expiration uint64 `protobuf:"varint,1,opt,name=expiration,proto3" json:"expiration,omitempty"`
- // The effective persisted spend maturity depth. A zero-depth renewal
- // returns the retained non-zero depth of an existing
- // confirmation-controlled lease. If that informational lookup fails after
- // the lease succeeds, this field is zero and ListLeases can refresh it.
- ReleaseAfterSpendConfs uint32 `protobuf:"varint,2,opt,name=release_after_spend_confs,json=releaseAfterSpendConfs,proto3" json:"release_after_spend_confs,omitempty"`
// The effective no-timeout policy with cleanup at the first confirmed
// spend. If renewal readback fails, ListLeases can refresh this
// informational value.
@@ -739,13 +720,6 @@ func (x *LeaseOutputResponse) GetExpiration() uint64 {
return 0
}
-func (x *LeaseOutputResponse) GetReleaseAfterSpendConfs() uint32 {
- if x != nil {
- return x.ReleaseAfterSpendConfs
- }
- return 0
-}
-
func (x *LeaseOutputResponse) GetNoExpiry() bool {
if x != nil {
return x.NoExpiry
@@ -4098,22 +4072,15 @@ type FundPsbtRequest struct {
MaxFeeRatio float64 `protobuf:"fixed64,12,opt,name=max_fee_ratio,json=maxFeeRatio,proto3" json:"max_fee_ratio,omitempty"`
// The custom lock ID to use for the inputs in the funded PSBT. The value
// if set must be exactly 32 bytes long. If empty, the default lock ID will
- // be used. This field is required when input_lease_no_expiry is true or
- // input_release_after_spend_confs is non-zero. In those modes it must not
- // be all zero or LND's reserved internal lock ID. Persist it before funding
- // and use
- // ReleaseOutput to unlock an abandoned PSBT whose spend never confirms.
+ // be used. This field is required when input_lease_no_expiry is true and
+ // must not be all zero or LND's reserved internal lock ID. Persist it
+ // before funding and use ReleaseOutput to unlock an abandoned PSBT whose
+ // spend never confirms.
CustomLockId []byte `protobuf:"bytes,13,opt,name=custom_lock_id,json=customLockId,proto3" json:"custom_lock_id,omitempty"`
// If set, then time-controlled input leases in the funded PSBT will be
// locked for the specified duration in seconds. If not set, the default
- // lock duration is used. A non-zero input_release_after_spend_confs makes
- // this deadline informational only.
+ // lock duration is used. Cannot be combined with input_lease_no_expiry.
LockExpirationSeconds uint64 `protobuf:"varint,14,opt,name=lock_expiration_seconds,json=lockExpirationSeconds,proto3" json:"lock_expiration_seconds,omitempty"`
- // Keep each acquired input lease until its spending transaction reaches
- // this confirmation count or the owner explicitly releases it. A
- // reorganization resets maturity progress. A non-zero value ignores
- // lock_expiration_seconds; zero preserves time-controlled lease behavior.
- InputReleaseAfterSpendConfs uint32 `protobuf:"varint,15,opt,name=input_release_after_spend_confs,json=inputReleaseAfterSpendConfs,proto3" json:"input_release_after_spend_confs,omitempty"`
// Reserve each newly acquired input without a timeout until owner release
// or its first confirmed spend. Requires a persisted custom_lock_id and
// cannot be combined with lock_expiration_seconds. Pre-existing input
@@ -4277,13 +4244,6 @@ func (x *FundPsbtRequest) GetLockExpirationSeconds() uint64 {
return 0
}
-func (x *FundPsbtRequest) GetInputReleaseAfterSpendConfs() uint32 {
- if x != nil {
- return x.InputReleaseAfterSpendConfs
- }
- return 0
-}
-
func (x *FundPsbtRequest) GetInputLeaseNoExpiry() bool {
if x != nil {
return x.InputLeaseNoExpiry
@@ -4619,18 +4579,14 @@ type UtxoLease struct {
Outpoint *lnrpc.OutPoint `protobuf:"bytes,2,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
//
//The absolute expiration of a time-controlled output lease represented as a
- //unix timestamp. Confirmation-controlled leases retain this value for
- //compatibility but do not apply it.
+ //unix timestamp. No-expiry leases do not use this timestamp.
Expiration uint64 `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"`
//
//The public key script of the leased output.
PkScript []byte `protobuf:"bytes,4,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
//
//The value of the leased output in satoshis.
Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`
- // The spend maturity depth recorded for this lease. FundPsbt returns it
- // only after the wallet successfully applies the requested option.
- ReleaseAfterSpendConfs uint32 `protobuf:"varint,6,opt,name=release_after_spend_confs,json=releaseAfterSpendConfs,proto3" json:"release_after_spend_confs,omitempty"`
// The block height where the spending transaction first confirmed. Zero
// means no confirmed spend was observed. A negative value means a
// previously observed spend was disconnected and is awaiting
@@ -4708,13 +4664,6 @@ func (x *UtxoLease) GetValue() uint64 {
return 0
}
-func (x *UtxoLease) GetReleaseAfterSpendConfs() uint32 {
- if x != nil {
- return x.ReleaseAfterSpendConfs
- }
- return 0
-}
-
func (x *UtxoLease) GetConfirmedSpendHeight() int32 {
if x != nil {
return x.ConfirmedSpendHeight
@@ -5083,19 +5032,17 @@ const file_walletrpc_walletkit_proto_rawDesc = "" +
"\aaccount\x18\x03 \x01(\tR\aaccount\x12)\n" +
"\x10unconfirmed_only\x18\x04 \x01(\bR\x0funconfirmedOnly\"8\n" +
"\x13ListUnspentResponse\x12!\n" +
- "\x05utxos\x18\x01 \x03(\v2\v.lnrpc.UtxoR\x05utxos\"\xd8\x01\n" +
+ "\x05utxos\x18\x01 \x03(\v2\v.lnrpc.UtxoR\x05utxos\"\xbe\x01\n" +
"\x12LeaseOutputRequest\x12\x0e\n" +
"\x02id\x18\x01 \x01(\fR\x02id\x12+\n" +
"\boutpoint\x18\x02 \x01(\v2\x0f.lnrpc.OutPointR\boutpoint\x12-\n" +
- "\x12expiration_seconds\x18\x03 \x01(\x04R\x11expirationSeconds\x129\n" +
- "\x19release_after_spend_confs\x18\x04 \x01(\rR\x16releaseAfterSpendConfs\x12\x1b\n" +
- "\tno_expiry\x18\x05 \x01(\bR\bnoExpiry\"\x8d\x01\n" +
+ "\x12expiration_seconds\x18\x03 \x01(\x04R\x11expirationSeconds\x12\x1b\n" +
+ "\tno_expiry\x18\x05 \x01(\bR\bnoExpiryJ\x04\b\x04\x10\x05R\x19release_after_spend_confs\"s\n" +
"\x13LeaseOutputResponse\x12\x1e\n" +
"\n" +
"expiration\x18\x01 \x01(\x04R\n" +
- "expiration\x129\n" +
- "\x19release_after_spend_confs\x18\x02 \x01(\rR\x16releaseAfterSpendConfs\x12\x1b\n" +
- "\tno_expiry\x18\x03 \x01(\bR\bnoExpiry\"S\n" +
+ "expiration\x12\x1b\n" +
+ "\tno_expiry\x18\x03 \x01(\bR\bnoExpiryJ\x04\b\x02\x10\x03R\x19release_after_spend_confs\"S\n" +
"\x14ReleaseOutputRequest\x12\x0e\n" +
"\x02id\x18\x01 \x01(\fR\x02id\x12+\n" +
"\boutpoint\x18\x02 \x01(\v2\x0f.lnrpc.OutPointR\boutpoint\"/\n" +
@@ -5304,7 +5251,7 @@ const file_walletrpc_walletkit_proto_rawDesc = "" +
"\x05label\x18\x02 \x01(\tR\x05label\x12\x1c\n" +
"\toverwrite\x18\x03 \x01(\bR\toverwrite\"2\n" +
"\x18LabelTransactionResponse\x12\x16\n" +
- "\x06status\x18\x01 \x01(\tR\x06status\"\x81\x06\n" +
+ "\x06status\x18\x01 \x01(\tR\x06status\"\xe2\x05\n" +
"\x0fFundPsbtRequest\x12\x14\n" +
"\x04psbt\x18\x01 \x01(\fH\x00R\x04psbt\x12)\n" +
"\x03raw\x18\x02 \x01(\v2\x15.walletrpc.TxTemplateH\x00R\x03raw\x12<\n" +
@@ -5324,12 +5271,11 @@ const file_walletrpc_walletkit_proto_rawDesc = "" +
" \x01(\x0e2\x1c.lnrpc.CoinSelectionStrategyR\x15coinSelectionStrategy\x12\"\n" +
"\rmax_fee_ratio\x18\f \x01(\x01R\vmaxFeeRatio\x12$\n" +
"\x0ecustom_lock_id\x18\r \x01(\fR\fcustomLockId\x126\n" +
- "\x17lock_expiration_seconds\x18\x0e \x01(\x04R\x15lockExpirationSeconds\x12D\n" +
- "\x1finput_release_after_spend_confs\x18\x0f \x01(\rR\x1binputReleaseAfterSpendConfs\x121\n" +
+ "\x17lock_expiration_seconds\x18\x0e \x01(\x04R\x15lockExpirationSeconds\x121\n" +
"\x15input_lease_no_expiry\x18\x10 \x01(\bR\x12inputLeaseNoExpiryB\n" +
"\n" +
"\btemplateB\x06\n" +
- "\x04fees\"\x9c\x01\n" +
+ "\x04feesJ\x04\b\x0f\x10\x10R\x1finput_release_after_spend_confs\"\x9c\x01\n" +
"\x10FundPsbtResponse\x12\x1f\n" +
"\vfunded_psbt\x18\x01 \x01(\fR\n" +
"fundedPsbt\x12.\n" +
@@ -5346,18 +5292,17 @@ const file_walletrpc_walletkit_proto_rawDesc = "" +
"\x04psbt\x18\x01 \x01(\fR\x04psbt\x124\n" +
"\x15existing_output_index\x18\x02 \x01(\x05H\x00R\x13existingOutputIndex\x12\x12\n" +
"\x03add\x18\x03 \x01(\bH\x00R\x03addB\x0f\n" +
- "\rchange_output\"\xa9\x02\n" +
+ "\rchange_output\"\x8f\x02\n" +
"\tUtxoLease\x12\x0e\n" +
"\x02id\x18\x01 \x01(\fR\x02id\x12+\n" +
"\boutpoint\x18\x02 \x01(\v2\x0f.lnrpc.OutPointR\boutpoint\x12\x1e\n" +
"\n" +
"expiration\x18\x03 \x01(\x04R\n" +
"expiration\x12\x1b\n" +
"\tpk_script\x18\x04 \x01(\fR\bpkScript\x12\x14\n" +
- "\x05value\x18\x05 \x01(\x04R\x05value\x129\n" +
- "\x19release_after_spend_confs\x18\x06 \x01(\rR\x16releaseAfterSpendConfs\x124\n" +
+ "\x05value\x18\x05 \x01(\x04R\x05value\x124\n" +
"\x16confirmed_spend_height\x18\a \x01(\x05R\x14confirmedSpendHeight\x12\x1b\n" +
- "\tno_expiry\x18\b \x01(\bR\bnoExpiry\"2\n" +
+ "\tno_expiry\x18\b \x01(\bR\bnoExpiryJ\x04\b\x06\x10\aR\x19release_after_spend_confs\"2\n" +
"\x0fSignPsbtRequest\x12\x1f\n" +
"\vfunded_psbt\x18\x01 \x01(\fR\n" +
"fundedPsbt\"X\n" +
### lnrpc/walletrpc/walletkit.swagger.json
@@ -1688,17 +1688,12 @@
"custom_lock_id": {
"type": "string",
"format": "byte",
- "description": "The custom lock ID to use for the inputs in the funded PSBT. The value\nif set must be exactly 32 bytes long. If empty, the default lock ID will\nbe used. This field is required when input_lease_no_expiry is true or\ninput_release_after_spend_confs is non-zero. In those modes it must not\nbe all zero or LND's reserved internal lock ID. Persist it before funding\nand use\nReleaseOutput to unlock an abandoned PSBT whose spend never confirms."
+ "description": "The custom lock ID to use for the inputs in the funded PSBT. The value\nif set must be exactly 32 bytes long. If empty, the default lock ID will\nbe used. This field is required when input_lease_no_expiry is true and\nmust not be all zero or LND's reserved internal lock ID. Persist it\nbefore funding and use ReleaseOutput to unlock an abandoned PSBT whose\nspend never confirms."
},
"lock_expiration_seconds": {
"type": "string",
"format": "uint64",
- "description": "If set, then time-controlled input leases in the funded PSBT will be\nlocked for the specified duration in seconds. If not set, the default\nlock duration is used. A non-zero input_release_after_spend_confs makes\nthis deadline informational only."
- },
- "input_release_after_spend_confs": {
- "type": "integer",
- "format": "int64",
- "description": "Keep each acquired input lease until its spending transaction reaches\nthis confirmation count or the owner explicitly releases it. A\nreorganization resets maturity progress. A non-zero value ignores\nlock_expiration_seconds; zero preserves time-controlled lease behavior."
+ "description": "If set, then time-controlled input leases in the funded PSBT will be\nlocked for the specified duration in seconds. If not set, the default\nlock duration is used. Cannot be combined with input_lease_no_expiry."
},
"input_lease_no_expiry": {
"type": "boolean",
@@ -1903,16 +1898,11 @@
"expiration_seconds": {
"type": "string",
"format": "uint64",
- "description": "The time in seconds before a time-controlled lock expires. If set to\nzero, the default lock duration is used. A non-zero\nrelease_after_spend_confs makes this deadline informational only."
- },
- "release_after_spend_confs": {
- "type": "integer",
- "format": "int64",
- "description": "Keep the lease until the transaction spending the output reaches this\nconfirmation count or the owner explicitly releases it. A reorganization\nthat disconnects the spending block resets maturity progress. A non-zero\nvalue ignores expiration_seconds; zero preserves the time-controlled\nlease behavior."
+ "description": "The time in seconds before a time-controlled lock expires. If set to\nzero, the default lock duration is used. Cannot be combined with\nno_expiry."
},
"no_expiry": {
"type": "boolean",
- "description": "Reserve the unused output without a timeout until owner release or its\nfirst confirmed spend. Cannot be combined with non-zero\nexpiration_seconds. Omission preserves\nthe existing lifetime; it does not convert the lease to a timed lease."
+ "description": "Reserve the unused output without a timeout until owner release or its\nfirst confirmed spend. Cannot be combined with a non-zero\nexpiration_seconds. Omission preserves the existing lifetime; it does\nnot convert the lease to a timed lease."
}
}
},
@@ -1922,12 +1912,7 @@
"expiration": {
"type": "string",
"format": "uint64",
- "description": "The absolute expiration of a time-controlled output lease represented as a\nunix timestamp. Confirmation-controlled leases return the stored value for\ncompatibility but do not apply it."
- },
- "release_after_spend_confs": {
- "type": "integer",
- "format": "int64",
- "description": "The effective persisted spend maturity depth. A zero-depth renewal\nreturns the retained non-zero depth of an existing\nconfirmation-controlled lease. If that informational lookup fails after\nthe lease succeeds, this field is zero and ListLeases can refresh it."
+ "description": "The absolute expiration of a time-controlled output lease represented as a\nunix timestamp. No-expiry leases do not use this timestamp."
},
"no_expiry": {
"type": "boolean",
@@ -2425,7 +2410,7 @@
"expiration": {
"type": "string",
"format": "uint64",
- "description": "The absolute expiration of a time-controlled output lease represented as a\nunix timestamp. Confirmation-controlled leases retain this value for\ncompatibility but do not apply it."
+ "description": "The absolute expiration of a time-controlled output lease represented as a\nunix timestamp. No-expiry leases do not use this timestamp."
},
"pk_script": {
"type": "string",
@@ -2437,11 +2422,6 @@
"format": "uint64",
"description": "The value of the leased output in satoshis."
},
- "release_after_spend_confs": {
- "type": "integer",
- "format": "int64",
- "description": "The spend maturity depth recorded for this lease. FundPsbt returns it\nonly after the wallet successfully applies the requested option."
- },
"confirmed_spend_height": {
"type": "integer",
"format": "int32",Why this scored 28/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.