Skip to content

Commit 62ee437

Browse files
committed
askrene: add optional layers to reservations.
We have the issue of aliases: xpay uses scids like 0x0x0 for routehints and blinded paths, and then can apply reservations to them. But generally, reservations are *global*, so we need to differentiate. Changelog-Added: Plugins: `askrene-reserve` and `askrene-unreserve` can take an optional `layer` inside `path` elements. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 78fdb20 commit 62ee437

File tree

16 files changed

+261
-155
lines changed

16 files changed

+261
-155
lines changed

.msggen.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@
752752
"Askrene-reservePath": {
753753
"AskRene-Reserve.path[].amount_msat": 3,
754754
"AskRene-Reserve.path[].direction": 2,
755+
"AskRene-Reserve.path[].layer": 5,
755756
"AskRene-Reserve.path[].short_channel_id": 1,
756757
"AskRene-Reserve.path[].short_channel_id_dir": 4
757758
},
@@ -761,6 +762,7 @@
761762
"Askrene-unreservePath": {
762763
"AskRene-Unreserve.path[].amount_msat": 3,
763764
"AskRene-Unreserve.path[].direction": 2,
765+
"AskRene-Unreserve.path[].layer": 5,
764766
"AskRene-Unreserve.path[].short_channel_id": 1,
765767
"AskRene-Unreserve.path[].short_channel_id_dir": 4
766768
},
@@ -4412,6 +4414,10 @@
44124414
"added": "v24.08",
44134415
"deprecated": null
44144416
},
4417+
"AskRene-Reserve.path[].layer": {
4418+
"added": "v25.12",
4419+
"deprecated": null
4420+
},
44154421
"AskRene-Reserve.path[].short_channel_id": {
44164422
"added": "v24.08",
44174423
"deprecated": null
@@ -4436,6 +4442,10 @@
44364442
"added": "v24.08",
44374443
"deprecated": null
44384444
},
4445+
"AskRene-Unreserve.path[].layer": {
4446+
"added": "v25.12",
4447+
"deprecated": null
4448+
},
44394449
"AskRene-Unreserve.path[].short_channel_id": {
44404450
"added": "v24.08",
44414451
"deprecated": null

cln-grpc/proto/node.proto

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-rpc/src/model.rs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/msggen/msggen/schema.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@
873873
"layer": {
874874
"type": "string",
875875
"description": [
876-
"The name of the layer to apply this change to."
876+
"The name of the layer to apply this change to. Also causes us to consider any reservations which are local to that layer (which is useful for fake channels where `layer` is set in an `askrene-reserve` `path` object)."
877877
]
878878
},
879879
"short_channel_id_dir": {
@@ -1553,6 +1553,13 @@
15531553
"description": [
15541554
"The amount to send into this hop."
15551555
]
1556+
},
1557+
"layer": {
1558+
"added": "v25.12",
1559+
"type": "string",
1560+
"description": [
1561+
"The layer to restrict this reservation to. This is only useful for fake channels which are not uniquely identified by `short_channel_id_dir`, which would otherwise confuse multiple unrelated callers."
1562+
]
15561563
}
15571564
}
15581565
}
@@ -1654,6 +1661,13 @@
16541661
"description": [
16551662
"The amount to send into this hop."
16561663
]
1664+
},
1665+
"layer": {
1666+
"added": "v25.12",
1667+
"type": "string",
1668+
"description": [
1669+
"The layer to restrict this reservation to (useful for fake channels)."
1670+
]
16571671
}
16581672
}
16591673
}

contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Lines changed: 135 additions & 135 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from pyln.grpc import node_pb2 as node__pb2
77

8-
GRPC_GENERATED_VERSION = '1.69.0'
8+
GRPC_GENERATED_VERSION = '1.75.1'
99
GRPC_VERSION = grpc.__version__
1010
_version_not_supported = False
1111

doc/schemas/askrene-inform-channel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"layer": {
2020
"type": "string",
2121
"description": [
22-
"The name of the layer to apply this change to."
22+
"The name of the layer to apply this change to. Also causes us to consider any reservations which are local to that layer (which is useful for fake channels where `layer` is set in an `askrene-reserve` `path` object)."
2323
]
2424
},
2525
"short_channel_id_dir": {

doc/schemas/askrene-reserve.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
"description": [
3737
"The amount to send into this hop."
3838
]
39+
},
40+
"layer": {
41+
"added": "v25.12",
42+
"type": "string",
43+
"description": [
44+
"The layer to restrict this reservation to. This is only useful for fake channels which are not uniquely identified by `short_channel_id_dir`, which would otherwise confuse multiple unrelated callers."
45+
]
3946
}
4047
}
4148
}

doc/schemas/askrene-unreserve.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
"description": [
3737
"The amount to send into this hop."
3838
]
39+
},
40+
"layer": {
41+
"added": "v25.12",
42+
"type": "string",
43+
"description": [
44+
"The layer to restrict this reservation to (useful for fake channels)."
45+
]
3946
}
4047
}
4148
}

0 commit comments

Comments
 (0)