Skip to content

Commit 67c91a7

Browse files
committed
BOLTs: Update to version with peer storage merged.
Unfortunately a spec typo means the data fields are missing (PR pending), so we still patch those in. The message "your_peer_storage" got renamed to "peer_storage_retrieval", and the option "want_peer_backup_storage" was removed. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-peer-storage` now only advertizes feature 43, not 41.
1 parent e832784 commit 67c91a7

File tree

58 files changed

+83
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+83
-97
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CCANDIR := ccan
2626

2727
# Where we keep the BOLT RFCs
2828
BOLTDIR := ../bolts/
29-
DEFAULT_BOLTVERSION := ecf792d87367fb6ff132a0cc7a53193dfb77d001
29+
DEFAULT_BOLTVERSION := acd383145dd8c3fecd69ce94e4a789767b984ac0
3030
# Can be overridden on cmdline.
3131
BOLTVERSION := $(DEFAULT_BOLTVERSION)
3232

channeld/channeld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4587,7 +4587,7 @@ static void peer_in(struct peer *peer, const u8 *msg)
45874587
case WIRE_ERROR:
45884588
case WIRE_ONION_MESSAGE:
45894589
case WIRE_PEER_STORAGE:
4590-
case WIRE_YOUR_PEER_STORAGE:
4590+
case WIRE_PEER_STORAGE_RETRIEVAL:
45914591
abort();
45924592
}
45934593

common/features.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@ static const struct feature_style feature_styles[] = {
132132
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
133133
[BOLT11_FEATURE] = FEATURE_DONT_REPRESENT,
134134
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
135-
{ OPT_WANT_PEER_BACKUP_STORAGE,
136-
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
137-
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT } },
138-
{ OPT_PROVIDE_PEER_BACKUP_STORAGE,
135+
{ OPT_PROVIDE_STORAGE,
139136
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
140137
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT } },
141138
{ OPT_SPLICE,
@@ -430,8 +427,8 @@ const char *feature_name(const tal_t *ctx, size_t f)
430427
"option_quiesce", /* https://github.com/lightning/bolts/pull/869 */
431428
NULL,
432429
"option_onion_messages", /* https://github.com/lightning/bolts/pull/759 */
433-
"option_want_peer_backup_storage", /* 40/41 */ /* https://github.com/lightning/bolts/pull/881/files */
434-
"option_provide_peer_backup_storage", /* https://github.com/lightning/bolts/pull/881/files */
430+
NULL,
431+
"option_provide_storage",
435432
"option_channel_type",
436433
"option_scid_alias", /* https://github.com/lightning/bolts/pull/910 */
437434
"option_payment_metadata",

common/features.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ struct feature_set *feature_set_dup(const tal_t *ctx,
115115
* | 24/25 | `option_route_blinding` |...IN9 ...
116116
* | 26/27 | `option_shutdown_anysegwit` |... IN ...
117117
* | 28/29 | `option_dual_fund` |... IN ...
118-
* | 34/35 | `option_quiesce` | ... IN ...
118+
* | 34/35 | `option_quiesce` |... IN ...
119119
* | 38/39 | `option_onion_messages` |... IN ...
120+
* | 42/43 | `option_provide_storage` |... IN ...
120121
* | 44/45 | `option_channel_type` |... IN ...
121122
* | 46/47 | `option_scid_alias` | ... IN ...
122123
* | 48/49 | `option_payment_metadata` |... 9 ...
@@ -138,6 +139,7 @@ struct feature_set *feature_set_dup(const tal_t *ctx,
138139
#define OPT_DUAL_FUND 28
139140
#define OPT_QUIESCE 34
140141
#define OPT_ONION_MESSAGES 38
142+
#define OPT_PROVIDE_STORAGE 42
141143
#define OPT_CHANNEL_TYPE 44
142144
#define OPT_SCID_ALIAS 46
143145
#define OPT_PAYMENT_METADATA 48
@@ -155,12 +157,4 @@ struct feature_set *feature_set_dup(const tal_t *ctx,
155157

156158
#define OPT_SHUTDOWN_WRONG_FUNDING 104
157159

158-
/* BOLT-peer-storage #9:
159-
*
160-
* | 40/41 | `want_peer_backup_storage` | Want to use other nodes to store encrypted backup data | IN ...
161-
* | 42/43 | `provide_peer_backup_storage` | Can store other nodes' encrypted backup data | IN ...
162-
*/
163-
#define OPT_WANT_PEER_BACKUP_STORAGE 40
164-
#define OPT_PROVIDE_PEER_BACKUP_STORAGE 42
165-
166160
#endif /* LIGHTNING_COMMON_FEATURES_H */

common/gossmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,7 @@ const void *gossmap_stream_next(const tal_t *ctx,
18021802
case WIRE_UPDATE_BLOCKHEIGHT:
18031803
case WIRE_CHANNEL_REESTABLISH:
18041804
case WIRE_PEER_STORAGE:
1805-
case WIRE_YOUR_PEER_STORAGE:
1805+
case WIRE_PEER_STORAGE_RETRIEVAL:
18061806
case WIRE_ANNOUNCEMENT_SIGNATURES:
18071807
case WIRE_QUERY_SHORT_CHANNEL_IDS:
18081808
case WIRE_REPLY_SHORT_CHANNEL_IDS_END:

common/interactivetx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static u8 *read_next_msg(const tal_t *ctx,
184184
case WIRE_SHUTDOWN:
185185
case WIRE_STFU:
186186
case WIRE_PEER_STORAGE:
187-
case WIRE_YOUR_PEER_STORAGE:
187+
case WIRE_PEER_STORAGE_RETRIEVAL:
188188
case WIRE_SPLICE:
189189
case WIRE_SPLICE_ACK:
190190
case WIRE_SPLICE_LOCKED:
@@ -774,7 +774,7 @@ char *process_interactivetx_updates(const tal_t *ctx,
774774
case WIRE_PING:
775775
case WIRE_PONG:
776776
case WIRE_PEER_STORAGE:
777-
case WIRE_YOUR_PEER_STORAGE:
777+
case WIRE_PEER_STORAGE_RETRIEVAL:
778778
case WIRE_SPLICE:
779779
case WIRE_SPLICE_ACK:
780780
case WIRE_STFU:

connectd/gossip_rcvd_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static bool is_msg_gossip_broadcast(const u8 *cursor)
8888
case WIRE_TX_ACK_RBF:
8989
case WIRE_TX_ABORT:
9090
case WIRE_PEER_STORAGE:
91-
case WIRE_YOUR_PEER_STORAGE:
91+
case WIRE_PEER_STORAGE_RETRIEVAL:
9292
case WIRE_OPEN_CHANNEL2:
9393
case WIRE_ACCEPT_CHANNEL2:
9494
case WIRE_STFU:

connectd/gossip_store.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static bool public_msg_type(enum peer_wire type)
9393
case WIRE_GOSSIP_TIMESTAMP_FILTER:
9494
case WIRE_ONION_MESSAGE:
9595
case WIRE_PEER_STORAGE:
96-
case WIRE_YOUR_PEER_STORAGE:
96+
case WIRE_PEER_STORAGE_RETRIEVAL:
9797
case WIRE_STFU:
9898
case WIRE_SPLICE:
9999
case WIRE_SPLICE_ACK:

connectd/multiplex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ static bool is_urgent(enum peer_wire type)
382382
case WIRE_GOSSIP_TIMESTAMP_FILTER:
383383
case WIRE_ONION_MESSAGE:
384384
case WIRE_PEER_STORAGE:
385-
case WIRE_YOUR_PEER_STORAGE:
385+
case WIRE_PEER_STORAGE_RETRIEVAL:
386386
case WIRE_STFU:
387387
case WIRE_SPLICE:
388388
case WIRE_SPLICE_ACK:

gossipd/gossipd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static void handle_recv_gossip(struct daemon *daemon, const u8 *outermsg)
262262
case WIRE_ACCEPT_CHANNEL2:
263263
case WIRE_ONION_MESSAGE:
264264
case WIRE_PEER_STORAGE:
265-
case WIRE_YOUR_PEER_STORAGE:
265+
case WIRE_PEER_STORAGE_RETRIEVAL:
266266
case WIRE_STFU:
267267
case WIRE_SPLICE:
268268
case WIRE_SPLICE_ACK:

0 commit comments

Comments
 (0)