wire: fix up messy patches (make extract-peer-csv)

They didn't actually apply properly!

I regenerated the dual-funding CSV from the latest commit
(091397fc0798c4b2bdb36dbaa9f5b4b1d4a463e1) and made it a single patch.

I tried doing the same for splicing, but the implementation has drifted
far from the spec, so I simply opted for a patch which didn't change anything.

You can see the resulting "wire/peer_wire.csv" is the same, except fields
are now in a less-random order!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-09-11 14:29:53 +09:30
parent 9c95761740
commit 232fba878e
8 changed files with 61 additions and 145 deletions

View File

@ -1,6 +1,6 @@
--- wire/peer_wire.csv 2022-05-19 14:25:25.346839996 -0500
+++ - 2022-05-19 14:26:13.327293456 -0500
@@ -37,6 +31,54 @@
--- wire/peer_wire.csv.raw 2023-09-11 13:32:30.677617251 +0930
+++ wire/peer_wire.csv.openchannel2 2023-09-11 13:31:47.906308397 +0930
@@ -37,6 +37,51 @@
tlvdata,n2,tlv1,amount_msat,tu64,
tlvtype,n2,tlv2,11
tlvdata,n2,tlv2,cltv_expiry,tu32,
@ -29,25 +29,22 @@
+msgdata,tx_signatures,channel_id,channel_id,
+msgdata,tx_signatures,txid,sha256,
+msgdata,tx_signatures,num_witnesses,u16,
+msgdata,tx_signatures,witness_stack,witness_stack,num_witnesses
+subtype,witness_stack
+subtypedata,witness_stack,num_input_witness,u16,
+subtypedata,witness_stack,witness_element,witness_element,num_input_witness
+subtype,witness_element
+subtypedata,witness_element,len,u16,
+subtypedata,witness_element,witness,byte,len
+msgdata,tx_signatures,witnesses,witness,num_witnesses
+subtype,witness
+subtypedata,witness,len,u16,
+subtypedata,witness,witness_data,byte,len
+msgtype,tx_init_rbf,72
+msgdata,tx_init_rbf,channel_id,channel_id,
+msgdata,tx_init_rbf,locktime,u32,
+msgdata,tx_init_rbf,feerate,u32,
+msgdata,tx_init_rbf,tlvs,tx_init_rbf_tlvs,
+tlvtype,tx_init_rbf_tlvs,funding_output_contribution,0
+tlvdata,tx_init_rbf_tlvs,funding_output_contribution,satoshis,tu64,
+tlvdata,tx_init_rbf_tlvs,funding_output_contribution,satoshis,s64,
+msgtype,tx_ack_rbf,73
+msgdata,tx_ack_rbf,channel_id,channel_id,
+msgdata,tx_ack_rbf,tlvs,tx_ack_rbf_tlvs,
+tlvtype,tx_ack_rbf_tlvs,funding_output_contribution,0
+tlvdata,tx_ack_rbf_tlvs,funding_output_contribution,satoshis,tu64,
+tlvdata,tx_ack_rbf_tlvs,funding_output_contribution,satoshis,s64,
+msgtype,tx_abort,74
+msgdata,tx_abort,channel_id,channel_id,
+msgdata,tx_abort,len,u16,
@ -55,13 +52,13 @@
msgtype,open_channel,32
msgdata,open_channel,chain_hash,chain_hash,
msgdata,open_channel,temporary_channel_id,byte,32
@@ -92,6 +130,50 @@
@@ -95,6 +140,54 @@
msgdata,channel_ready,tlvs,channel_ready_tlvs,
tlvtype,channel_ready_tlvs,short_channel_id,1
tlvdata,channel_ready_tlvs,short_channel_id,alias,short_channel_id,
+msgtype,open_channel2,64
+msgdata,open_channel2,chain_hash,chain_hash,
+msgdata,open_channel2,zerod_channel_id,channel_id,
+msgdata,open_channel2,temporary_channel_id,channel_id,
+msgdata,open_channel2,funding_feerate_perkw,u32,
+msgdata,open_channel2,commitment_feerate_perkw,u32,
+msgdata,open_channel2,funding_satoshis,u64,
@ -77,14 +74,16 @@
+msgdata,open_channel2,delayed_payment_basepoint,point,
+msgdata,open_channel2,htlc_basepoint,point,
+msgdata,open_channel2,first_per_commitment_point,point,
+msgdata,open_channel2,second_per_commitment_point,point,
+msgdata,open_channel2,channel_flags,byte,
+msgdata,open_channel2,tlvs,opening_tlvs,
+tlvtype,opening_tlvs,upfront_shutdown_script,0
+tlvdata,opening_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...
+tlvtype,opening_tlvs,channel_type,1
+tlvdata,opening_tlvs,channel_type,type,byte,...
+tlvtype,opening_tlvs,require_confirmed_inputs,2
+msgtype,accept_channel2,65
+msgdata,accept_channel2,zerod_channel_id,channel_id,
+msgdata,accept_channel2,temporary_channel_id,channel_id,
+msgdata,accept_channel2,funding_satoshis,u64,
+msgdata,accept_channel2,dust_limit_satoshis,u64,
+msgdata,accept_channel2,max_htlc_value_in_flight_msat,u64,
@ -98,11 +97,13 @@
+msgdata,accept_channel2,delayed_payment_basepoint,point,
+msgdata,accept_channel2,htlc_basepoint,point,
+msgdata,accept_channel2,first_per_commitment_point,point,
+msgdata,accept_channel2,second_per_commitment_point,point,
+msgdata,accept_channel2,tlvs,accept_tlvs,
+tlvtype,accept_tlvs,upfront_shutdown_script,0
+tlvdata,accept_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...
+tlvtype,accept_tlvs,channel_type,1
+tlvdata,accept_tlvs,channel_type,type,byte,...
+tlvtype,accept_tlvs,require_confirmed_inputs,2
msgtype,shutdown,38
msgdata,shutdown,channel_id,channel_id,
msgdata,shutdown,len,u16,

View File

@ -1,9 +1,9 @@
--- wire/peer_wire.csv 2021-06-10 12:47:17.225844741 -0500
+++ - 2021-06-10 12:47:40.960373156 -0500
@@ -143,6 +139,9 @@
tlvdata,opening_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...
tlvtype,opening_tlvs,channel_type,1
tlvdata,opening_tlvs,channel_type,type,byte,...
tlvtype,opening_tlvs,require_confirmed_inputs,2
+tlvtype,opening_tlvs,request_funds,3
+tlvdata,opening_tlvs,request_funds,requested_sats,u64,
+tlvdata,opening_tlvs,request_funds,blockheight,u32,
@ -11,10 +11,10 @@
msgdata,accept_channel2,channel_id,channel_id,
msgdata,accept_channel2,funding_satoshis,u64,
@@ -162,6 +161,15 @@
tlvdata,accept_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...
tlvtype,accept_tlvs,channel_type,1
tlvdata,accept_tlvs,channel_type,type,byte,...
+tlvtype,accept_tlvs,will_fund,2
tlvtype,accept_tlvs,require_confirmed_inputs,2
+tlvtype,accept_tlvs,will_fund,3
+tlvdata,accept_tlvs,will_fund,signature,signature,
+tlvdata,accept_tlvs,will_fund,lease_rates,lease_rates,
+subtype,lease_rates

View File

@ -1,16 +1,13 @@
--- wire/peer_exp_wire.csv 2022-06-22 19:07:24.000000000 -0500
+++ - 2022-06-30 16:00:51.000000000 -0500
@@ -65,12 +57,15 @@
@@ -65,9 +57,12 @@
msgdata,tx_signatures,txid,sha256,
msgdata,tx_signatures,num_witnesses,u16,
msgdata,tx_signatures,witness_stack,witness_stack,num_witnesses
msgdata,tx_signatures,witnesses,witness,num_witnesses
+msgdata,tx_signatures,tlvs,txsigs_tlvs,
subtype,witness_stack
subtypedata,witness_stack,num_input_witness,u16,
subtypedata,witness_stack,witness_element,witness_element,num_input_witness
subtype,witness_element
subtypedata,witness_element,len,u16,
subtypedata,witness_element,witness,byte,len
subtype,witness
subtypedata,witness,len,u16,
subtypedata,witness,witness_data,byte,len
+tlvtype,txsigs_tlvs,funding_outpoint_sig,0
+tlvdata,txsigs_tlvs,funding_outpoint_sig,sig,byte,...
msgtype,tx_init_rbf,72

View File

@ -1,20 +0,0 @@
--- wire/peer_wire.csv 2023-01-09 12:09:54.439255190 -0600
+++ - 2023-01-09 12:15:37.608035051 -0600
@@ -171,6 +173,7 @@
tlvtype,opening_tlvs,request_funds,3
tlvdata,opening_tlvs,request_funds,requested_sats,u64,
tlvdata,opening_tlvs,request_funds,blockheight,u32,
+tlvtype,opening_tlvs,require_confirmed_inputs,2
msgtype,accept_channel2,65
msgdata,accept_channel2,zerod_channel_id,channel_id,
msgdata,accept_channel2,funding_satoshis,u64,
@@ -190,7 +191,8 @@
tlvdata,accept_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...
tlvtype,accept_tlvs,channel_type,1
tlvdata,accept_tlvs,channel_type,type,byte,...
+tlvtype,accept_tlvs,require_confirmed_inputs,2
-tlvtype,accept_tlvs,will_fund,2
+tlvtype,accept_tlvs,will_fund,3
tlvdata,accept_tlvs,will_fund,signature,signature,
tlvdata,accept_tlvs,will_fund,lease_rates,lease_rates,
subtype,lease_rates

View File

@ -1,54 +0,0 @@
--- wire/peer_wire.csv 2023-02-02 17:51:50.435463786 -0600
+++ - 2023-02-02 17:51:56.693837258 -0600
@@ -62,13 +63,13 @@
msgdata,tx_signatures,channel_id,channel_id,
msgdata,tx_signatures,txid,sha256,
msgdata,tx_signatures,num_witnesses,u16,
-msgdata,tx_signatures,witness_stack,witness_stack,num_witnesses
+msgdata,tx_signatures,witnesses,witness_stack,num_witnesses
subtype,witness_stack
-subtypedata,witness_stack,num_input_witness,u16,
-subtypedata,witness_stack,witness_element,witness_element,num_input_witness
+subtypedata,witness_stack,num_witness_elements,u16,
+subtypedata,witness_stack,witness_elements,witness_element,num_witness_elements
subtype,witness_element
subtypedata,witness_element,len,u16,
-subtypedata,witness_element,witness,byte,len
+subtypedata,witness_element,witness_data,byte,len
msgtype,tx_init_rbf,72
msgdata,tx_init_rbf,channel_id,channel_id,
msgdata,tx_init_rbf,locktime,u32,
@@ -145,7 +146,7 @@
tlvdata,channel_ready_tlvs,short_channel_id,alias,short_channel_id,
msgtype,open_channel2,64
msgdata,open_channel2,chain_hash,chain_hash,
-msgdata,open_channel2,zerod_channel_id,channel_id,
+msgdata,open_channel2,temporary_channel_id,channel_id,
msgdata,open_channel2,funding_feerate_perkw,u32,
msgdata,open_channel2,commitment_feerate_perkw,u32,
msgdata,open_channel2,funding_satoshis,u64,
@@ -161,6 +162,7 @@
msgdata,open_channel2,delayed_payment_basepoint,point,
msgdata,open_channel2,htlc_basepoint,point,
msgdata,open_channel2,first_per_commitment_point,point,
+msgdata,open_channel2,second_per_commitment_point,point,
msgdata,open_channel2,channel_flags,byte,
msgdata,open_channel2,tlvs,opening_tlvs,
tlvtype,opening_tlvs,upfront_shutdown_script,0
@@ -173,7 +175,7 @@
tlvtype,opening_tlvs,require_confirmed_inputs,2
tlvdata,opening_tlvs,require_confirmed_inputs,empty,byte,0
msgtype,accept_channel2,65
-msgdata,accept_channel2,zerod_channel_id,channel_id,
+msgdata,accept_channel2,temporary_channel_id,channel_id,
msgdata,accept_channel2,funding_satoshis,u64,
msgdata,accept_channel2,dust_limit_satoshis,u64,
msgdata,accept_channel2,max_htlc_value_in_flight_msat,u64,
@@ -187,6 +186,7 @@
msgdata,accept_channel2,delayed_payment_basepoint,point,
msgdata,accept_channel2,htlc_basepoint,point,
msgdata,accept_channel2,first_per_commitment_point,point,
+msgdata,accept_channel2,second_per_commitment_point,point,
msgdata,accept_channel2,tlvs,accept_tlvs,
tlvtype,accept_tlvs,upfront_shutdown_script,0
tlvdata,accept_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...

View File

@ -1,43 +0,0 @@
--- wire/peer_wire.csv 2023-06-29 14:36:10.986268579 -0500
+++ - 2023-06-29 14:37:45.737004393 -0500
@@ -62,25 +62,22 @@
msgdata,tx_signatures,channel_id,channel_id,
msgdata,tx_signatures,txid,sha256,
msgdata,tx_signatures,num_witnesses,u16,
-msgdata,tx_signatures,witnesses,witness_stack,num_witnesses
-subtype,witness_stack
-subtypedata,witness_stack,num_witness_elements,u16,
-subtypedata,witness_stack,witness_elements,witness_element,num_witness_elements
-subtype,witness_element
-subtypedata,witness_element,len,u16,
-subtypedata,witness_element,witness_data,byte,len
+msgdata,tx_signatures,witnesses,witness,num_witnesses
+subtype,witness
+subtypedata,witness,len,u16,
+subtypedata,witness,witness_data,byte,len
msgtype,tx_init_rbf,72
msgdata,tx_init_rbf,channel_id,channel_id,
msgdata,tx_init_rbf,locktime,u32,
msgdata,tx_init_rbf,feerate,u32,
msgdata,tx_init_rbf,tlvs,tx_init_rbf_tlvs,
tlvtype,tx_init_rbf_tlvs,funding_output_contribution,0
-tlvdata,tx_init_rbf_tlvs,funding_output_contribution,satoshis,tu64,
+tlvdata,tx_init_rbf_tlvs,funding_output_contribution,satoshis,s64,
msgtype,tx_ack_rbf,73
msgdata,tx_ack_rbf,channel_id,channel_id,
msgdata,tx_ack_rbf,tlvs,tx_ack_rbf_tlvs,
tlvtype,tx_ack_rbf_tlvs,funding_output_contribution,0
-tlvdata,tx_ack_rbf_tlvs,funding_output_contribution,satoshis,tu64,
+tlvdata,tx_ack_rbf_tlvs,funding_output_contribution,satoshis,s64,
msgtype,tx_abort,74
msgdata,tx_abort,channel_id,channel_id,
msgdata,tx_abort,len,u16,
@@ -257,6 +235,8 @@
msgdata,channel_reestablish,your_last_per_commitment_secret,byte,32
msgdata,channel_reestablish,my_current_per_commitment_point,point,
msgdata,channel_reestablish,tlvs,channel_reestablish_tlvs,
+tlvtype,channel_reestablish_tlvs,next_funding,0
+tlvdata,channel_reestablish_tlvs,next_funding,next_funding_txid,sha256,
tlvtype,channel_reestablish_tlvs,next_to_send,1
tlvdata,channel_reestablish_tlvs,next_to_send,commitment_number,tu64,
tlvtype,channel_reestablish_tlvs,desired_channel_type,3

View File

@ -0,0 +1,35 @@
diff --git a/wire/peer_wire.csv b/wire/peer_wire.csv
index 5b5803afc..41b57e85b 100644
--- a/wire/peer_wire.csv
+++ b/wire/peer_wire.csv
@@ -206,6 +206,20 @@ subtypedata,lease_rates,channel_fee_max_base_msat,tu32,
msgtype,stfu,2
msgdata,stfu,channel_id,channel_id,
msgdata,stfu,initiator,u8,
+msgtype,splice,75
+msgdata,splice,channel_id,channel_id,
+msgdata,splice,chain_hash,chain_hash,
+msgdata,splice,relative_satoshis,s64,
+msgdata,splice,funding_feerate_perkw,u32,
+msgdata,splice,locktime,u32,
+msgdata,splice,funding_pubkey,point,
+msgtype,splice_ack,76
+msgdata,splice_ack,channel_id,channel_id,
+msgdata,splice_ack,chain_hash,chain_hash,
+msgdata,splice_ack,relative_satoshis,s64,
+msgdata,splice_ack,funding_pubkey,point,
+msgtype,splice_locked,77,
+msgdata,splice_locked,channel_id,channel_id,
msgtype,shutdown,38
msgdata,shutdown,channel_id,channel_id,
msgdata,shutdown,len,u16,
@@ -264,6 +250,9 @@ msgdata,commitment_signed,channel_id,channel_id,
msgdata,commitment_signed,signature,signature,
msgdata,commitment_signed,num_htlcs,u16,
msgdata,commitment_signed,htlc_signature,signature,num_htlcs
+msgdata,commitment_signed,splice_channel_id,commitment_signed_tlvs,
+tlvtype,commitment_signed_tlvs,splice_info,0
+tlvdata,commitment_signed_tlvs,splice_info,splice_channel_id,channel_id,
msgtype,revoke_and_ack,133
msgdata,revoke_and_ack,channel_id,channel_id,
msgdata,revoke_and_ack,per_commitment_secret,byte,32

View File

@ -63,10 +63,10 @@ msgdata,tx_signatures,channel_id,channel_id,
msgdata,tx_signatures,txid,sha256,
msgdata,tx_signatures,num_witnesses,u16,
msgdata,tx_signatures,witnesses,witness,num_witnesses
msgdata,tx_signatures,tlvs,txsigs_tlvs,
subtype,witness
subtypedata,witness,len,u16,
subtypedata,witness,witness_data,byte,len
msgdata,tx_signatures,tlvs,txsigs_tlvs,
tlvtype,txsigs_tlvs,funding_outpoint_sig,0
tlvdata,txsigs_tlvs,funding_outpoint_sig,sig,byte,...
msgtype,tx_init_rbf,72
@ -168,10 +168,10 @@ tlvtype,opening_tlvs,upfront_shutdown_script,0
tlvdata,opening_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...
tlvtype,opening_tlvs,channel_type,1
tlvdata,opening_tlvs,channel_type,type,byte,...
tlvtype,opening_tlvs,require_confirmed_inputs,2
tlvtype,opening_tlvs,request_funds,3
tlvdata,opening_tlvs,request_funds,requested_sats,u64,
tlvdata,opening_tlvs,request_funds,blockheight,u32,
tlvtype,opening_tlvs,require_confirmed_inputs,2
msgtype,accept_channel2,65
msgdata,accept_channel2,temporary_channel_id,channel_id,
msgdata,accept_channel2,funding_satoshis,u64,

1 msgtype,init,16
63 msgdata,tx_signatures,txid,sha256,
64 msgdata,tx_signatures,num_witnesses,u16,
65 msgdata,tx_signatures,witnesses,witness,num_witnesses
66 msgdata,tx_signatures,tlvs,txsigs_tlvs,
67 subtype,witness
68 subtypedata,witness,len,u16,
69 subtypedata,witness,witness_data,byte,len
msgdata,tx_signatures,tlvs,txsigs_tlvs,
70 tlvtype,txsigs_tlvs,funding_outpoint_sig,0
71 tlvdata,txsigs_tlvs,funding_outpoint_sig,sig,byte,...
72 msgtype,tx_init_rbf,72
168 tlvdata,opening_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,...
169 tlvtype,opening_tlvs,channel_type,1
170 tlvdata,opening_tlvs,channel_type,type,byte,...
171 tlvtype,opening_tlvs,require_confirmed_inputs,2
172 tlvtype,opening_tlvs,request_funds,3
173 tlvdata,opening_tlvs,request_funds,requested_sats,u64,
174 tlvdata,opening_tlvs,request_funds,blockheight,u32,
tlvtype,opening_tlvs,require_confirmed_inputs,2
175 msgtype,accept_channel2,65
176 msgdata,accept_channel2,temporary_channel_id,channel_id,
177 msgdata,accept_channel2,funding_satoshis,u64,