5.3 KiB
5.3 KiB
| 1 | #include <bitcoin/chainparams.h> | ||||
|---|---|---|---|---|---|
| 2 | #include <bitcoin/psbt.h> | ||||
| 3 | #include <common/cryptomsg.h> | ||||
| 4 | #include <common/channel_config.h> | ||||
| 5 | #include <common/channel_id.h> | ||||
| 6 | #include <common/derive_basepoints.h> | ||||
| 7 | #include <common/features.h> | ||||
| 8 | #include <common/penalty_base.h> | ||||
| 9 | #include <common/per_peer_state.h> | ||||
| 10 | msgtype | dualopend_init | 7000 | ||
| 11 | # Which network are we configured for? | ||||
| 12 | msgdata | dualopend_init | chainparams | chainparams | |
| 13 | msgdata | dualopend_init | our_feature_set | feature_set | |
| 14 | msgdata | dualopend_init | their_init_features_len | u16 | |
| 15 | msgdata | dualopend_init | their_init_features | u8 | their_init_features_len |
| 16 | # Base configuration we'll offer | ||||
| 17 | msgdata | dualopend_init | our_config | channel_config | |
| 18 | # Minimum/maximum configuration values we'll accept | ||||
| 19 | msgdata | dualopend_init | max_to_self_delay | u32 | |
| 20 | msgdata | dualopend_init | min_effective_htlc_capacity_msat | amount_msat | |
| 21 | msgdata | dualopend_init | pps | per_peer_state | |
| 22 | msgdata | dualopend_init | our_basepoints | basepoints | |
| 23 | msgdata | dualopend_init | our_funding_pubkey | pubkey | |
| 24 | # Constraints in case the other end tries to open a channel. | ||||
| 25 | msgdata | dualopend_init | minimum_depth | u32 | |
| 26 | msgdata | dualopend_init | min_feerate | u32 | |
| 27 | msgdata | dualopend_init | max_feerate | u32 | |
| 28 | # Optional msg to send. | ||||
| 29 | msgdata | dualopend_init | len | u16 | |
| 30 | msgdata | dualopend_init | msg | u8 | len |
| 31 | # dualopend->master: they offered channel | should we continue? | |||
| 32 | msgtype | dualopend_got_offer | 7005 | ||
| 33 | msgdata | dualopend_got_offer | opener_funding | amount_sat | |
| 34 | msgdata | dualopend_got_offer | dust_limit_satoshis | amount_sat | |
| 35 | msgdata | dualopend_got_offer | max_htlc_value_in_flight_msat | amount_msat | |
| 36 | msgdata | dualopend_got_offer | htlc_minimum_msat | amount_msat | |
| 37 | msgdata | dualopend_got_offer | feerate_funding_max | u32 | |
| 38 | msgdata | dualopend_got_offer | feerate_funding_min | u32 | |
| 39 | msgdata | dualopend_got_offer | feerate_funding_best | u32 | |
| 40 | msgdata | dualopend_got_offer | feerate_per_kw | u32 | |
| 41 | msgdata | dualopend_got_offer | to_self_delay | u16 | |
| 42 | msgdata | dualopend_got_offer | max_accepted_htlcs | u16 | |
| 43 | msgdata | dualopend_got_offer | channel_flags | u8 | |
| 44 | msgdata | dualopend_got_offer | locktime | u32 | |
| 45 | msgdata | dualopend_got_offer | shutdown_len | u16 | |
| 46 | msgdata | dualopend_got_offer | shutdown_scriptpubkey | u8 | shutdown_len |
| 47 | # master->dualopend: reply back with our first funding info/contribs | ||||
| 48 | msgtype | dualopend_got_offer_reply | 7105 | ||
| 49 | msgdata | dualopend_got_offer_reply | accepter_funding | amount_sat | |
| 50 | msgdata | dualopend_got_offer_reply | feerate_funding | u32 | |
| 51 | msgdata | dualopend_got_offer_reply | psbt | wally_psbt | |
| 52 | msgdata | dualopend_got_offer_reply | shutdown_len | u16 | |
| 53 | msgdata | dualopend_got_offer_reply | our_shutdown_scriptpubkey | ?u8 | shutdown_len |
| 54 | # dualopend->master: ready to commit channel open to database and | ||||
| 55 | # get some signatures for the funding_tx. | ||||
| 56 | msgtype | dualopend_commit_rcvd | 7007 | ||
| 57 | msgdata | dualopend_commit_rcvd | their_config | channel_config | |
| 58 | msgdata | dualopend_commit_rcvd | remote_first_commit | bitcoin_tx | |
| 59 | msgdata | dualopend_commit_rcvd | pbase | ?penalty_base | |
| 60 | msgdata | dualopend_commit_rcvd | first_commit_sig | bitcoin_signature | |
| 61 | msgdata | dualopend_commit_rcvd | psbt | wally_psbt | |
| 62 | msgdata | dualopend_commit_rcvd | channel_id | channel_id | |
| 63 | msgdata | dualopend_commit_rcvd | pps | per_peer_state | |
| 64 | msgdata | dualopend_commit_rcvd | revocation_basepoint | pubkey | |
| 65 | msgdata | dualopend_commit_rcvd | payment_basepoint | pubkey | |
| 66 | msgdata | dualopend_commit_rcvd | htlc_basepoint | pubkey | |
| 67 | msgdata | dualopend_commit_rcvd | delayed_payment_basepoint | pubkey | |
| 68 | msgdata | dualopend_commit_rcvd | their_per_commit_point | pubkey | |
| 69 | msgdata | dualopend_commit_rcvd | remote_fundingkey | pubkey | |
| 70 | msgdata | dualopend_commit_rcvd | funding_txid | bitcoin_txid | |
| 71 | msgdata | dualopend_commit_rcvd | funding_txout | u16 | |
| 72 | msgdata | dualopend_commit_rcvd | funding_satoshis | amount_sat | |
| 73 | msgdata | dualopend_commit_rcvd | our_funding_sats | amount_sat | |
| 74 | msgdata | dualopend_commit_rcvd | channel_flags | u8 | |
| 75 | msgdata | dualopend_commit_rcvd | feerate_per_kw | u32 | |
| 76 | # our commitment signatures | for the peer | |||
| 77 | msgdata | dualopend_commit_rcvd | msglen | u16 | |
| 78 | msgdata | dualopend_commit_rcvd | commitment_msg | u8 | msglen |
| 79 | msgdata | dualopend_commit_rcvd | our_channel_reserve_satoshis | amount_sat | |
| 80 | msgdata | dualopend_commit_rcvd | local_shutdown_len | u16 | |
| 81 | msgdata | dualopend_commit_rcvd | local_shutdown_scriptpubkey | u8 | local_shutdown_len |
| 82 | msgdata | dualopend_commit_rcvd | remote_shutdown_len | u16 | |
| 83 | msgdata | dualopend_commit_rcvd | remote_shutdown_scriptpubkey | u8 | remote_shutdown_len |
| 84 | # dualopend->master: peer updated the psbt | ||||
| 85 | msgtype | dualopend_psbt_changed | 7107 | ||
| 86 | msgdata | dualopend_psbt_changed | channel_id | channel_id | |
| 87 | msgdata | dualopend_psbt_changed | funding_serial | u64 | |
| 88 | msgdata | dualopend_psbt_changed | psbt | wally_psbt | |
| 89 | # master->dualopend: we updated the psbt | ||||
| 90 | msgtype | dualopend_psbt_updated | 7108 | ||
| 91 | msgdata | dualopend_psbt_updated | psbt | wally_psbt | |
| 92 | # master->dualopend: fail this channel open | ||||
| 93 | msgtype | dualopend_fail | 7003 | ||
| 94 | msgdata | dualopend_fail | reason | wirestring | |
| 95 | # dualopend->master: we failed to negotiate channel | ||||
| 96 | msgtype | dualopend_failed | 7004 | ||
| 97 | msgdata | dualopend_failed | reason | wirestring | |
| 98 | # master->dualopend: hello | I'd like to start a channel open | |||
| 99 | msgtype | dualopend_opener_init | 7200 | ||
| 100 | msgdata | dualopend_opener_init | psbt | wally_psbt | |
| 101 | msgdata | dualopend_opener_init | funding_amount | amount_sat | |
| 102 | msgdata | dualopend_opener_init | local_shutdown_len | u16 | |
| 103 | msgdata | dualopend_opener_init | local_shutdown_scriptpubkey | u8 | local_shutdown_len |
| 104 | msgdata | dualopend_opener_init | feerate_per_kw | u32 | |
| 105 | msgdata | dualopend_opener_init | feerate_per_kw_funding | u32 | |
| 106 | msgdata | dualopend_opener_init | channel_flags | u8 | |
| 107 | # master -> dualopend: do you have a memleak? | ||||
| 108 | msgtype | dualopend_dev_memleak | 7033 | ||
| 109 | msgtype | dualopend_dev_memleak_reply | 7133 | ||
| 110 | msgdata | dualopend_dev_memleak_reply | leak | bool |