Skip to content

Commit b8806ba

Browse files
committed
dual-fund: remove all references to PODLEs
We're punting on PODLE's for v1 of dual-funded channels
1 parent c04d9ef commit b8806ba

File tree

8 files changed

+7
-47
lines changed

8 files changed

+7
-47
lines changed

channeld/channeld.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,6 @@ static void peer_in(struct peer *peer, const u8 *msg)
18751875
return;
18761876
case WIRE_INIT_RBF:
18771877
case WIRE_ACK_RBF:
1878-
case WIRE_BLACKLIST_PODLE:
18791878
#endif
18801879
break;
18811880

gossipd/gossipd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ static struct io_plan *peer_msg_in(struct io_conn *conn,
768768
case WIRE_ACCEPT_CHANNEL2:
769769
case WIRE_INIT_RBF:
770770
case WIRE_ACK_RBF:
771-
case WIRE_BLACKLIST_PODLE:
772771
#endif
773772
status_broken("peer %s: relayed unexpected msg of type %s",
774773
type_to_string(tmpctx, struct node_id, &peer->id),

lightningd/dual_open_control.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ struct openchannel2_payload {
242242
u8 channel_flags;
243243
u32 locktime;
244244
u8 *shutdown_scriptpubkey;
245-
/* FIXME: include the podle? */
246245

247246
struct amount_sat accepter_funding;
248247
u32 funding_feerate_per_kw;
@@ -285,7 +284,6 @@ openchannel2_hook_serialize(struct openchannel2_payload *payload,
285284
if (tal_bytelen(payload->shutdown_scriptpubkey) != 0)
286285
json_add_hex_talarr(stream, "shutdown_scriptpubkey",
287286
payload->shutdown_scriptpubkey);
288-
/* FIXME: include the podle? */
289287
json_object_end(stream);
290288
}
291289

openingd/dualopend.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ struct state {
153153
struct channel_id channel_id;
154154
u8 channel_flags;
155155

156-
struct sha256 opening_podle_h2;
157156
enum tx_role our_role;
158157

159158
u32 feerate_per_kw_funding;
@@ -220,8 +219,7 @@ static u8 *psbt_changeset_get_next(const tal_t *ctx,
220219
msg = towire_tx_add_input(ctx, cid, serial_id,
221220
prevtx, in->tx_input.index,
222221
in->tx_input.sequence,
223-
script,
224-
NULL);
222+
script);
225223

226224
tal_arr_remove(&set->added_ins, 0);
227225
return msg;
@@ -1201,7 +1199,6 @@ static u8 *opening_negotiate_msg(const tal_t *ctx, struct state *state)
12011199
case WIRE_TX_REMOVE_OUTPUT:
12021200
case WIRE_TX_COMPLETE:
12031201
case WIRE_ACK_RBF:
1204-
case WIRE_BLACKLIST_PODLE:
12051202
case WIRE_CHANNEL_ANNOUNCEMENT:
12061203
case WIRE_CHANNEL_UPDATE:
12071204
case WIRE_NODE_ANNOUNCEMENT:
@@ -1251,17 +1248,14 @@ static bool run_tx_interactive(struct state *state,
12511248
struct bitcoin_tx *tx;
12521249
struct bitcoin_txid txid;
12531250
struct amount_sat amt;
1254-
struct tlv_tx_add_input_tlvs *add_tlvs =
1255-
tlv_tx_add_input_tlvs_new(tmpctx);
12561251

12571252
if (!fromwire_tx_add_input(tmpctx, msg, &cid,
12581253
&serial_id,
12591254
cast_const2(u8 **,
12601255
&tx_bytes),
12611256
&outnum, &sequence,
12621257
cast_const2(u8 **,
1263-
&redeemscript),
1264-
add_tlvs))
1258+
&redeemscript)))
12651259
open_err_fatal(state,
12661260
"Parsing tx_add_input %s",
12671261
tal_hex(tmpctx, msg));
@@ -1385,7 +1379,6 @@ static bool run_tx_interactive(struct state *state,
13851379

13861380
psbt_input_set_serial_id(psbt, in, serial_id);
13871381

1388-
/* FIXME: what's in the tlv? */
13891382
break;
13901383
}
13911384
case WIRE_TX_REMOVE_INPUT: {
@@ -1547,7 +1540,6 @@ static bool run_tx_interactive(struct state *state,
15471540
case WIRE_ACCEPT_CHANNEL2:
15481541
case WIRE_INIT_RBF:
15491542
case WIRE_ACK_RBF:
1550-
case WIRE_BLACKLIST_PODLE:
15511543
case WIRE_CHANNEL_ANNOUNCEMENT:
15521544
case WIRE_CHANNEL_UPDATE:
15531545
case WIRE_NODE_ANNOUNCEMENT:
@@ -1854,7 +1846,6 @@ static void accepter_start(struct state *state, const u8 *oc2_msg)
18541846

18551847
if (!fromwire_open_channel2(oc2_msg, &chain_hash,
18561848
&state->channel_id,
1857-
&state->opening_podle_h2,
18581849
&feerate_max,
18591850
&feerate_min,
18601851
&feerate_best,
@@ -1920,7 +1911,6 @@ static void accepter_start(struct state *state, const u8 *oc2_msg)
19201911
&state->our_points.revocation,
19211912
&state->their_points.revocation);
19221913

1923-
/* FIXME: pass the podle back also */
19241914
msg = towire_dualopend_got_offer(NULL,
19251915
&cid,
19261916
tx_state->opener_funding,
@@ -2332,7 +2322,6 @@ static void opener_start(struct state *state, u8 *msg)
23322322
struct channel_id cid;
23332323
char *err_reason;
23342324
struct amount_sat total;
2335-
struct sha256 podle;
23362325
u32 feerate_min, feerate_max, feerate_best;
23372326
struct tx_state *tx_state = state->tx_state;
23382327

@@ -2391,12 +2380,9 @@ static void opener_start(struct state *state, u8 *msg)
23912380
state->upfront_shutdown_script[LOCAL];
23922381
}
23932382

2394-
/* FIXME: actually set the podle */
2395-
memset(&podle, 0, sizeof(podle));
23962383
msg = towire_open_channel2(NULL,
23972384
&chainparams->genesis_blockhash,
23982385
&state->channel_id,
2399-
&podle, /* FIXME: podle H2! */
24002386
feerate_max,
24012387
feerate_min,
24022388
feerate_best,
@@ -3357,7 +3343,6 @@ static u8 *handle_peer_in(struct state *state)
33573343
case WIRE_TX_REMOVE_OUTPUT:
33583344
case WIRE_TX_COMPLETE:
33593345
case WIRE_ACK_RBF:
3360-
case WIRE_BLACKLIST_PODLE:
33613346
case WIRE_CHANNEL_ANNOUNCEMENT:
33623347
case WIRE_CHANNEL_UPDATE:
33633348
case WIRE_NODE_ANNOUNCEMENT:

wire/extracted_peer_exp_dual_fund.patch

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- wire/extracted_peer_wire_csv 2020-07-28 12:36:12.063168014 -0500
22
+++ - 2020-08-31 21:00:40.856646471 -0500
3-
@@ -31,6 +31,46 @@
3+
@@ -31,6 +31,40 @@
44
tlvdata,n2,tlv1,amount_msat,tu64,
55
tlvtype,n2,tlv2,11
66
tlvdata,n2,tlv2,cltv_expiry,tu32,
@@ -13,12 +13,6 @@
1313
+msgdata,tx_add_input,sequence,u32,
1414
+msgdata,tx_add_input,redeemscript_len,u16,
1515
+msgdata,tx_add_input,script,byte,redeemscript_len
16-
+msgdata,tx_add_input,tlvs,tx_add_input_tlvs,
17-
+tlvtype,tx_add_input_tlvs,podle_proof,2
18-
+tlvdata,tx_add_input_tlvs,podle_proof,p,point,
19-
+tlvdata,tx_add_input_tlvs,podle_proof,p2,point,
20-
+tlvdata,tx_add_input_tlvs,podle_proof,e,sha256,
21-
+tlvdata,tx_add_input_tlvs,podle_proof,sig,byte,32
2216
+msgtype,tx_add_output,67
2317
+msgdata,tx_add_output,channel_id,channel_id,
2418
+msgdata,tx_add_output,serial_id,u16,
@@ -47,13 +41,12 @@
4741
msgtype,open_channel,32
4842
msgdata,open_channel,chain_hash,chain_hash,
4943
msgdata,open_channel,temporary_channel_id,byte,32
50-
@@ -82,6 +122,54 @@
44+
@@ -82,6 +122,53 @@
5145
msgtype,funding_locked,36
5246
msgdata,funding_locked,channel_id,channel_id,
5347
msgdata,funding_locked,next_per_commitment_point,point,
5448
+msgtype,open_channel2,64
5549
+msgdata,open_channel2,chain_hash,chain_hash,
56-
+msgdata,open_channel2,podle_h2,sha256,
5750
+msgdata,open_channel2,feerate_per_kw_funding,u32,
5851
+msgdata,open_channel2,funding_satoshis,u64,
5952
+msgdata,open_channel2,dust_limit_satoshis,u64,
@@ -102,15 +95,3 @@
10295
msgtype,shutdown,38
10396
msgdata,shutdown,channel_id,channel_id,
10497
msgdata,shutdown,len,u16,
105-
@@ -169,6 +257,11 @@
106-
msgdata,channel_update,fee_base_msat,u32,
107-
msgdata,channel_update,fee_proportional_millionths,u32,
108-
msgdata,channel_update,htlc_maximum_msat,u64,,option_channel_htlc_max
109-
+msgtype,blacklist_podle,260
110-
+msgdata,blacklist_podle,signature,signature,
111-
+msgdata,blacklist_podle,node_id,point,
112-
+msgdata,blacklist_podle,podle_h2,byte,32
113-
+msgdata,blacklist_podle,timestamp,u32,
114-
msgtype,query_short_channel_ids,261,gossip_queries
115-
msgdata,query_short_channel_ids,chain_hash,chain_hash,
116-
msgdata,query_short_channel_ids,len,u16,

wire/extracted_peer_exp_dual_fund_more.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
msgdata,tx_add_input,prevtx,byte,prevtx_len
1111
msgdata,tx_add_input,prevtx_vout,u32,
1212
@@ -48,16 +48,16 @@
13-
tlvdata,tx_add_input_tlvs,podle_proof,sig,byte,32
13+
msgdata,tx_add_input,script,byte,redeemscript_len
1414
msgtype,tx_add_output,67
1515
msgdata,tx_add_output,channel_id,channel_id,
1616
-msgdata,tx_add_output,serial_id,u16,
@@ -30,9 +30,9 @@
3030
msgdata,tx_complete,channel_id,channel_id,
3131
msgtype,tx_signatures,71
3232
@@ -125,7 +125,9 @@
33+
msgdata,funding_locked,next_per_commitment_point,point,
3334
msgtype,open_channel2,64
3435
msgdata,open_channel2,chain_hash,chain_hash,
35-
msgdata,open_channel2,podle_h2,sha256,
3636
-msgdata,open_channel2,feerate_per_kw_funding,u32,
3737
+msgdata,open_channel2,feerate_funding_max,u32,
3838
+msgdata,open_channel2,feerate_funding_min,u32,

wire/extracted_peer_exp_tmp_chan_id.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
msgtype,open_channel2,64
66
msgdata,open_channel2,chain_hash,chain_hash,
77
+msgdata,open_channel2,temporary_channel_id,byte,32
8-
msgdata,open_channel2,podle_h2,sha256,
98
msgdata,open_channel2,feerate_funding_max,u32,
109
msgdata,open_channel2,feerate_funding_min,u32,
10+
msgdata,open_channel2,feerate_funding_best,u32,

wire/peer_wire.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ static bool unknown_type(enum peer_wire t)
4545
case WIRE_ACCEPT_CHANNEL2:
4646
case WIRE_INIT_RBF:
4747
case WIRE_ACK_RBF:
48-
case WIRE_BLACKLIST_PODLE:
4948
#endif
5049
return false;
5150
}
@@ -97,7 +96,6 @@ bool is_msg_for_gossipd(const u8 *cursor)
9796
case WIRE_ACCEPT_CHANNEL2:
9897
case WIRE_INIT_RBF:
9998
case WIRE_ACK_RBF:
100-
case WIRE_BLACKLIST_PODLE:
10199
#endif
102100
break;
103101
}

0 commit comments

Comments
 (0)