mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
wire: update to BOLT 17ceba42dc6607b637a713a9bc051f63c1357edd "BOLT 4: onion message support."
We don't need to patch it in anymore, now it's merged. However, we do move the message itself from onion_wire.csv to peer_wire.csv (we should get more sophisticated with our parsing, but this works for now!). The resulting peer_wire.csv is identical, the onion_wire.csv file is slightly reordered. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b22202dccd
commit
98d2dc2d4c
2
Makefile
2
Makefile
@ -23,7 +23,7 @@ CCANDIR := ccan
|
||||
|
||||
# Where we keep the BOLT RFCs
|
||||
BOLTDIR := ../bolts/
|
||||
DEFAULT_BOLTVERSION := cded2df1fd0095c947af02a52e28b16c66bdfc5c
|
||||
DEFAULT_BOLTVERSION := 17ceba42dc6607b637a713a9bc051f63c1357edd
|
||||
# Can be overridden on cmdline.
|
||||
BOLTVERSION := $(DEFAULT_BOLTVERSION)
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
--- wire/onion_wire.csv 2021-11-16 15:17:39.446494580 +1030
|
||||
+++ wire/onion_wire.csv.raw 2021-11-16 15:36:00.046441058 +1030
|
||||
@@ -8,6 +8,25 @@
|
||||
tlvdata,encrypted_data_tlv,payment_constraints,htlc_minimum_msat,tu64,
|
||||
tlvtype,encrypted_data_tlv,allowed_features,14
|
||||
tlvdata,encrypted_data_tlv,allowed_features,features,byte,...
|
||||
+tlvtype,onionmsg_tlv,reply_path,2
|
||||
+tlvdata,onionmsg_tlv,reply_path,path,blinded_path,
|
||||
+tlvtype,onionmsg_tlv,encrypted_recipient_data,4
|
||||
+tlvdata,onionmsg_tlv,encrypted_recipient_data,encrypted_recipient_data,byte,...
|
||||
+tlvtype,onionmsg_tlv,invoice_request,64
|
||||
+tlvdata,onionmsg_tlv,invoice_request,invoice_request,tlv_invoice_request,
|
||||
+tlvtype,onionmsg_tlv,invoice,66
|
||||
+tlvdata,onionmsg_tlv,invoice,invoice,tlv_invoice,
|
||||
+tlvtype,onionmsg_tlv,invoice_error,68
|
||||
+tlvdata,onionmsg_tlv,invoice_error,invoice_error,tlv_invoice_error,
|
||||
+subtype,blinded_path
|
||||
+subtypedata,blinded_path,first_node_id,point,
|
||||
+subtypedata,blinded_path,blinding,point,
|
||||
+subtypedata,blinded_path,num_hops,byte,
|
||||
+subtypedata,blinded_path,path,onionmsg_hop,num_hops
|
||||
+subtype,onionmsg_hop
|
||||
+subtypedata,onionmsg_hop,blinded_node_id,point,
|
||||
+subtypedata,onionmsg_hop,enclen,u16,
|
||||
+subtypedata,onionmsg_hop,encrypted_recipient_data,byte,enclen
|
||||
msgtype,invalid_realm,PERM|1
|
||||
msgtype,temporary_node_failure,NODE|2
|
||||
msgtype,permanent_node_failure,PERM|NODE|2
|
17
wire/extracted_onion_02_offers.patch
Normal file
17
wire/extracted_onion_02_offers.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/wire/onion_wire.csv b/wire/onion_wire.csv
|
||||
index ae05f09fd..b09811ed1 100644
|
||||
--- a/wire/onion_wire.csv
|
||||
+++ b/wire/onion_wire.csv
|
||||
@@ -92,6 +92,12 @@ tlvtype,onionmsg_tlv,reply_path,2
|
||||
tlvdata,onionmsg_tlv,reply_path,path,blinded_path,
|
||||
tlvtype,onionmsg_tlv,encrypted_recipient_data,4
|
||||
tlvdata,onionmsg_tlv,encrypted_recipient_data,encrypted_recipient_data,byte,...
|
||||
+tlvtype,onionmsg_tlv,invoice_request,64
|
||||
+tlvdata,onionmsg_tlv,invoice_request,invoice_request,tlv_invoice_request,
|
||||
+tlvtype,onionmsg_tlv,invoice,66
|
||||
+tlvdata,onionmsg_tlv,invoice,invoice,tlv_invoice,
|
||||
+tlvtype,onionmsg_tlv,invoice_error,68
|
||||
+tlvdata,onionmsg_tlv,invoice_error,invoice_error,tlv_invoice_error,
|
||||
subtype,blinded_path
|
||||
subtypedata,blinded_path,first_node_id,point,
|
||||
subtypedata,blinded_path,blinding,point,
|
@ -1,3 +1,5 @@
|
||||
We can't handle nested tlvs yet, so make these byte arrays.
|
||||
|
||||
diff --git b/wire/onion_wire.csv a/wire/onion_wire.csv
|
||||
index 5c52fe9a1..2ac0c4cff 100644
|
||||
--- b/wire/onion_wire.csv
|
||||
|
17
wire/extracted_onion_05_remove-onion_message.patch
Normal file
17
wire/extracted_onion_05_remove-onion_message.patch
Normal file
@ -0,0 +1,17 @@
|
||||
We put this in peer_wire instead, in extracted_peer_05_newonion.patch
|
||||
|
||||
diff --git a/wire/onion_wire.csv b/wire/onion_wire.csv
|
||||
index 3884c63dd..25798c3da 100644
|
||||
--- a/wire/onion_wire.csv
|
||||
+++ b/wire/onion_wire.csv
|
||||
@@ -103,10 +103,6 @@ msgdata,invalid_onion_payload,offset,u16,
|
||||
msgtype,mpp_timeout,23
|
||||
msgtype,invalid_onion_blinding,BADONION|PERM|24
|
||||
msgdata,invalid_onion_blinding,sha256_of_onion,sha256,
|
||||
-msgtype,onion_message,513
|
||||
-msgdata,onion_message,blinding,point,
|
||||
-msgdata,onion_message,len,u16,
|
||||
-msgdata,onion_message,onion_message_packet,byte,len
|
||||
tlvtype,onionmsg_tlv,reply_path,2
|
||||
tlvdata,onionmsg_tlv,reply_path,path,blinded_path,
|
||||
tlvtype,onionmsg_tlv,encrypted_recipient_data,4
|
@ -1,3 +1,5 @@
|
||||
FIXME: This is actually from BOLT 4, but we remove it from onion_wire.csv and put it here.
|
||||
|
||||
--- peer_wire.csv 2021-08-25 12:41:02.876254003 +0930
|
||||
+++ peer_wire.csv.raw 2021-08-25 13:42:31.991693809 +0930
|
||||
@@ -320,3 +210,7 @@
|
||||
|
@ -35,25 +35,6 @@ tlvdata,encrypted_data_tlv,payment_constraints,max_cltv_expiry,u32,
|
||||
tlvdata,encrypted_data_tlv,payment_constraints,htlc_minimum_msat,tu64,
|
||||
tlvtype,encrypted_data_tlv,allowed_features,14
|
||||
tlvdata,encrypted_data_tlv,allowed_features,features,byte,...
|
||||
tlvtype,onionmsg_tlv,reply_path,2
|
||||
tlvdata,onionmsg_tlv,reply_path,path,blinded_path,
|
||||
tlvtype,onionmsg_tlv,encrypted_recipient_data,4
|
||||
tlvdata,onionmsg_tlv,encrypted_recipient_data,encrypted_recipient_data,byte,...
|
||||
tlvtype,onionmsg_tlv,invoice_request,64
|
||||
tlvdata,onionmsg_tlv,invoice_request,invoice_request,byte,...
|
||||
tlvtype,onionmsg_tlv,invoice,66
|
||||
tlvdata,onionmsg_tlv,invoice,invoice,byte,...
|
||||
tlvtype,onionmsg_tlv,invoice_error,68
|
||||
tlvdata,onionmsg_tlv,invoice_error,invoice_error,byte,...
|
||||
subtype,blinded_path
|
||||
subtypedata,blinded_path,first_node_id,point,
|
||||
subtypedata,blinded_path,blinding,point,
|
||||
subtypedata,blinded_path,num_hops,byte,
|
||||
subtypedata,blinded_path,path,onionmsg_hop,num_hops
|
||||
subtype,onionmsg_hop
|
||||
subtypedata,onionmsg_hop,blinded_node_id,point,
|
||||
subtypedata,onionmsg_hop,enclen,u16,
|
||||
subtypedata,onionmsg_hop,encrypted_recipient_data,byte,enclen
|
||||
msgtype,invalid_realm,PERM|1
|
||||
msgtype,temporary_node_failure,NODE|2
|
||||
msgtype,permanent_node_failure,PERM|NODE|2
|
||||
@ -103,3 +84,22 @@ msgdata,invalid_onion_payload,offset,u16,
|
||||
msgtype,mpp_timeout,23
|
||||
msgtype,invalid_onion_blinding,BADONION|PERM|24
|
||||
msgdata,invalid_onion_blinding,sha256_of_onion,sha256,
|
||||
tlvtype,onionmsg_tlv,reply_path,2
|
||||
tlvdata,onionmsg_tlv,reply_path,path,blinded_path,
|
||||
tlvtype,onionmsg_tlv,encrypted_recipient_data,4
|
||||
tlvdata,onionmsg_tlv,encrypted_recipient_data,encrypted_recipient_data,byte,...
|
||||
tlvtype,onionmsg_tlv,invoice_request,64
|
||||
tlvdata,onionmsg_tlv,invoice_request,invoice_request,byte,...
|
||||
tlvtype,onionmsg_tlv,invoice,66
|
||||
tlvdata,onionmsg_tlv,invoice,invoice,byte,...
|
||||
tlvtype,onionmsg_tlv,invoice_error,68
|
||||
tlvdata,onionmsg_tlv,invoice_error,invoice_error,byte,...
|
||||
subtype,blinded_path
|
||||
subtypedata,blinded_path,first_node_id,point,
|
||||
subtypedata,blinded_path,blinding,point,
|
||||
subtypedata,blinded_path,num_hops,byte,
|
||||
subtypedata,blinded_path,path,onionmsg_hop,num_hops
|
||||
subtype,onionmsg_hop
|
||||
subtypedata,onionmsg_hop,blinded_node_id,point,
|
||||
subtypedata,onionmsg_hop,enclen,u16,
|
||||
subtypedata,onionmsg_hop,encrypted_recipient_data,byte,enclen
|
||||
|
|
Loading…
Reference in New Issue
Block a user