Skip to content

Commit bd3f3e9

Browse files
authored
Merge pull request #874 from quake/quake/tweak-default-commitment-delay-epochs
chore: tweak DEFAULT_TLC_EXPIRY_DELTA to 4 hours
2 parents a207532 + d98ff3d commit bd3f3e9

21 files changed

+144
-66
lines changed

crates/fiber-lib/src/fiber/channel.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
use super::config::DEFAULT_FUNDING_TIMEOUT_SECONDS;
2-
use super::config::DEFAULT_HOLD_TLC_TIMEOUT;
1+
use super::config::{
2+
DEFAULT_COMMITMENT_DELAY_EPOCHS, DEFAULT_FUNDING_TIMEOUT_SECONDS, DEFAULT_HOLD_TLC_TIMEOUT,
3+
};
34
use super::{
45
gossip::SOFT_BROADCAST_MESSAGES_CONSIDERED_STALE_DURATION, graph::ChannelUpdateInfo,
56
types::ForwardTlcResult,
@@ -282,8 +283,6 @@ pub struct ChannelCommandWithId {
282283

283284
pub const DEFAULT_FEE_RATE: u64 = 1_000;
284285
pub const DEFAULT_COMMITMENT_FEE_RATE: u64 = 1_000;
285-
// The default commitment delay is 6 epochs = 24 hours.
286-
pub const DEFAULT_COMMITMENT_DELAY_EPOCHS: u64 = 6;
287286
// The min commitment delay is 1 epoch = 4 hours.
288287
pub const MIN_COMMITMENT_DELAY_EPOCHS: u64 = 1;
289288
// The max commitment delay is 84 epochs = 14 days.
@@ -5713,8 +5712,8 @@ impl ChannelActorState {
57135712
let current_time = now_timestamp_as_millis_u64();
57145713
if expiry <= current_time + MIN_TLC_EXPIRY_DELTA {
57155714
error!(
5716-
"TLC expiry {} is too soon, current time: {}",
5717-
expiry, current_time
5715+
"TLC expiry {} is too soon, current time: {}, MIN_TLC_EXPIRY_DELTA: {}",
5716+
expiry, current_time, MIN_TLC_EXPIRY_DELTA
57185717
);
57195718
return Err(ProcessingChannelError::TlcExpirySoon);
57205719
}
@@ -5726,6 +5725,11 @@ impl ChannelActorState {
57265725
.all_tlcs()
57275726
.filter(|tlc| tlc.removed_confirmed_at.is_none())
57285727
.count() as u64;
5728+
debug!(
5729+
"here debug pending_tlc_count: {} => delay: {}",
5730+
pending_tlc_count,
5731+
epoch_delay_milliseconds * (pending_tlc_count + 1)
5732+
);
57295733
let expect_expiry = current_time + epoch_delay_milliseconds * (pending_tlc_count + 1);
57305734
if expiry < expect_expiry {
57315735
error!(

crates/fiber-lib/src/fiber/config.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@ pub const DEFAULT_AUTO_ACCEPT_CHANNEL_CKB_FUNDING_AMOUNT: u64 =
2929
/// Default minimum ckb funding amount for auto accepting an open channel request.
3030
pub const DEFAULT_OPEN_CHANNEL_AUTO_ACCEPT_MIN_CKB_FUNDING_AMOUNT: u64 = 100 * CKB_SHANNONS;
3131

32-
/// The expiry delta to forward a tlc, in milliseconds, default to 1 day.
33-
pub const DEFAULT_TLC_EXPIRY_DELTA: u64 = 24 * 60 * 60 * 1000;
32+
// The default commitment delay is 1 epochs.
33+
pub const DEFAULT_COMMITMENT_DELAY_EPOCHS: u64 = 1;
34+
35+
/// The expiry delta to forward a tlc, in milliseconds, default to 4 hours.
36+
pub const DEFAULT_TLC_EXPIRY_DELTA: u64 = 4 * 60 * 60 * 1000;
37+
38+
/// The final hop expiry delta for a tlc, in milliseconds, default to 24 hours.
39+
pub const DEFAULT_FINAL_TLC_EXPIRY_DELTA: u64 = 24 * 60 * 60 * 1000; // 24 hours
3440

3541
/// 4 hours for each epoch
3642
#[cfg(not(debug_assertions))]
@@ -40,14 +46,10 @@ pub const MILLI_SECONDS_PER_EPOCH: u64 = 4 * 60 * 60 * 1000;
4046
// we need to make sure 2/3 commitment_delay_epoch is greater than MIN_TLC_EXPIRY_DELTA
4147
pub const MILLI_SECONDS_PER_EPOCH: u64 = 2 * 1000;
4248

43-
#[cfg(not(debug_assertions))]
44-
/// The minimal expiry delta to forward a tlc, in milliseconds. 16 hours
45-
/// expect it >= 2/3 commitment_delay_epoch, default DEFAULT_COMMITMENT_DELAY_EPOCHS is 6 epoch
46-
/// so 2/3 * 6 = 4 epoch, 4 * 4 hours = 16 hours
47-
pub const MIN_TLC_EXPIRY_DELTA: u64 = 4 * MILLI_SECONDS_PER_EPOCH;
48-
#[cfg(debug_assertions)]
49-
// 5 seconds for testing environment
50-
pub const MIN_TLC_EXPIRY_DELTA: u64 = 5 * 1000;
49+
/// The minimal expiry delta to forward a tlc, in milliseconds, 160 minutes.
50+
/// expect it >= 2/3 commitment_delay_epoch, default DEFAULT_COMMITMENT_DELAY_EPOCHS is 1 epoch
51+
pub const MIN_TLC_EXPIRY_DELTA: u64 =
52+
DEFAULT_COMMITMENT_DELAY_EPOCHS * MILLI_SECONDS_PER_EPOCH * 2 / 3;
5153

5254
/// The maximum expiry delta for a payment, in milliseconds. 2 weeks
5355
pub const MAX_PAYMENT_TLC_EXPIRY_LIMIT: u64 = 14 * 24 * 60 * 60 * 1000; // 2 weeks

crates/fiber-lib/src/fiber/fee.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ pub(crate) fn check_tlc_delta_with_epochs(
229229
) -> Result<(), ProcessingChannelError> {
230230
if tlc_expiry_delta < MIN_TLC_EXPIRY_DELTA {
231231
return Err(ProcessingChannelError::InvalidParameter(format!(
232-
"TLC expiry delta is too small, expect larger than {}",
233-
MIN_TLC_EXPIRY_DELTA
232+
"TLC expiry delta is too small, expect larger than {}, got {}",
233+
MIN_TLC_EXPIRY_DELTA, tlc_expiry_delta
234234
)));
235235
}
236236
if tlc_expiry_delta > MAX_PAYMENT_TLC_EXPIRY_LIMIT {
237237
return Err(ProcessingChannelError::InvalidParameter(format!(
238-
"TLC expiry delta is too large, expected to be smaller than {}",
239-
MAX_PAYMENT_TLC_EXPIRY_LIMIT
238+
"TLC expiry delta is too large, expected to be smaller than {}, got {}",
239+
MAX_PAYMENT_TLC_EXPIRY_LIMIT, tlc_expiry_delta
240240
)));
241241
}
242242

crates/fiber-lib/src/fiber/graph.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ use super::types::{
1111
};
1212
use super::types::{Cursor, Pubkey, TlcErr};
1313
use crate::ckb::config::UdtCfgInfos;
14-
use crate::fiber::config::DEFAULT_TLC_EXPIRY_DELTA;
14+
use crate::fiber::config::{
15+
DEFAULT_FINAL_TLC_EXPIRY_DELTA, DEFAULT_TLC_EXPIRY_DELTA, MAX_PAYMENT_TLC_EXPIRY_LIMIT,
16+
};
1517
use crate::fiber::fee::calculate_tlc_forward_fee;
1618
use crate::fiber::history::SentNode;
1719
use crate::fiber::path::NodeHeapElement;
@@ -744,10 +746,12 @@ where
744746
// but a malicious node may send a channel update with a too large expiry delta
745747
// which makes the network graph contains a channel update with a too large expiry delta.
746748
// We need to check it again here to avoid any malicious channel update
747-
if channel_update.tlc_expiry_delta > DEFAULT_TLC_EXPIRY_DELTA {
749+
// Note: we don't check the tlc_expiry_delta is too small here, because it does not effect
750+
// the path finding, and a too small tlc_expiry_delta only makes the hop itself more risky.
751+
if channel_update.tlc_expiry_delta > MAX_PAYMENT_TLC_EXPIRY_LIMIT {
748752
error!(
749753
"Channel update has too large expiry delta: {} > {}, channel update: {:?}",
750-
channel_update.tlc_expiry_delta, DEFAULT_TLC_EXPIRY_DELTA, &channel_update
754+
channel_update.tlc_expiry_delta, MAX_PAYMENT_TLC_EXPIRY_LIMIT, &channel_update
751755
);
752756
return None;
753757
}
@@ -1928,7 +1932,7 @@ where
19281932
));
19291933
}
19301934

1931-
let mut agg_tlc_expiry = final_tlc_expiry_delta.unwrap_or(DEFAULT_TLC_EXPIRY_DELTA);
1935+
let mut agg_tlc_expiry = final_tlc_expiry_delta.unwrap_or(DEFAULT_FINAL_TLC_EXPIRY_DELTA);
19321936
for (idx, cur_hop) in router_hops.iter().enumerate() {
19331937
let prev_hop_pubkey = router_hops.get(idx + 1).map(|h| h.pubkey).unwrap_or(source);
19341938

crates/fiber-lib/src/fiber/network.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,13 @@ use crate::ckb::{
7777
use crate::fiber::channel::{
7878
AddTlcCommand, AddTlcResponse, ChannelActorState, ChannelEphemeralConfig,
7979
ChannelInitializationOperation, ShutdownCommand, TxCollaborationCommand, TxUpdateCommand,
80-
DEFAULT_COMMITMENT_DELAY_EPOCHS,
8180
};
8281
use crate::fiber::channel::{
8382
AwaitingTxSignaturesFlags, ShuttingDownFlags, MAX_TLC_NUMBER_IN_FLIGHT,
8483
};
8584
use crate::fiber::config::{
86-
DEFAULT_MAX_PARTS, DEFAULT_TLC_EXPIRY_DELTA, MAX_PAYMENT_TLC_EXPIRY_LIMIT,
87-
MIN_TLC_EXPIRY_DELTA, PAYMENT_MAX_PARTS_LIMIT,
85+
DEFAULT_COMMITMENT_DELAY_EPOCHS, DEFAULT_FINAL_TLC_EXPIRY_DELTA, DEFAULT_MAX_PARTS,
86+
MAX_PAYMENT_TLC_EXPIRY_LIMIT, MIN_TLC_EXPIRY_DELTA, PAYMENT_MAX_PARTS_LIMIT,
8887
};
8988
use crate::fiber::fee::{check_open_channel_parameters, check_tlc_delta_with_epochs};
9089
use crate::fiber::gossip::{GossipConfig, GossipService, SubscribableGossipMessageStore};
@@ -566,14 +565,11 @@ impl SendPaymentData {
566565
};
567566

568567
// check htlc expiry delta and limit are both valid if it is set
569-
let final_tlc_expiry_delta = command
570-
.final_tlc_expiry_delta
571-
.or_else(|| {
572-
invoice
573-
.as_ref()
574-
.and_then(|i| i.final_tlc_minimum_expiry_delta().copied())
575-
})
576-
.unwrap_or(DEFAULT_TLC_EXPIRY_DELTA);
568+
let final_tlc_expiry_delta = invoice
569+
.as_ref()
570+
.and_then(|i| i.final_tlc_minimum_expiry_delta().copied())
571+
.or(command.final_tlc_expiry_delta)
572+
.unwrap_or(DEFAULT_FINAL_TLC_EXPIRY_DELTA);
577573
if !(MIN_TLC_EXPIRY_DELTA..=MAX_PAYMENT_TLC_EXPIRY_LIMIT).contains(&final_tlc_expiry_delta)
578574
{
579575
return Err(format!(
@@ -587,7 +583,10 @@ impl SendPaymentData {
587583
.unwrap_or(MAX_PAYMENT_TLC_EXPIRY_LIMIT);
588584

589585
if tlc_expiry_limit < final_tlc_expiry_delta || tlc_expiry_limit < MIN_TLC_EXPIRY_DELTA {
590-
return Err("tlc_expiry_limit is too small".to_string());
586+
return Err(format!(
587+
"tlc_expiry_limit is too small, final_tlc_expiry_delta: {}, tlc_expiry_limit: {}",
588+
final_tlc_expiry_delta, tlc_expiry_limit
589+
));
591590
}
592591
if tlc_expiry_limit > MAX_PAYMENT_TLC_EXPIRY_LIMIT {
593592
return Err(format!(
@@ -3357,8 +3356,9 @@ where
33573356

33583357
if tlc_expiry_delta.is_some_and(|d| d < MIN_TLC_EXPIRY_DELTA) {
33593358
return Err(ProcessingChannelError::InvalidParameter(format!(
3360-
"TLC expiry delta is too small, expect larger than {}",
3361-
MIN_TLC_EXPIRY_DELTA
3359+
"TLC expiry delta is too small, expect larger than {}, got {}",
3360+
MIN_TLC_EXPIRY_DELTA,
3361+
tlc_expiry_delta.unwrap()
33623362
)));
33633363
}
33643364

crates/fiber-lib/src/fiber/tests/channel.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
use crate::ckb::tests::test_utils::complete_commitment_tx;
22
use crate::fiber::channel::{
33
AddTlcResponse, ChannelState, CloseFlags, OutboundTlcStatus, TLCId, TlcStatus, UpdateCommand,
4-
DEFAULT_COMMITMENT_DELAY_EPOCHS, MAX_COMMITMENT_DELAY_EPOCHS, MIN_COMMITMENT_DELAY_EPOCHS,
5-
XUDT_COMPATIBLE_WITNESS,
4+
MAX_COMMITMENT_DELAY_EPOCHS, MIN_COMMITMENT_DELAY_EPOCHS, XUDT_COMPATIBLE_WITNESS,
65
};
76
use crate::fiber::config::{
8-
DEFAULT_TLC_EXPIRY_DELTA, MAX_PAYMENT_TLC_EXPIRY_LIMIT, MILLI_SECONDS_PER_EPOCH,
9-
MIN_TLC_EXPIRY_DELTA,
7+
DEFAULT_COMMITMENT_DELAY_EPOCHS, DEFAULT_FINAL_TLC_EXPIRY_DELTA, DEFAULT_TLC_EXPIRY_DELTA,
8+
MAX_PAYMENT_TLC_EXPIRY_LIMIT, MILLI_SECONDS_PER_EPOCH, MIN_TLC_EXPIRY_DELTA,
109
};
1110
use crate::fiber::features::FeatureVector;
1211
use crate::fiber::graph::ChannelInfo;
@@ -5669,7 +5668,8 @@ async fn test_send_payment_will_succeed_with_large_tlc_expiry_limit() {
56695668
let source_node = &mut node_0;
56705669
let target_pubkey = node_3.pubkey;
56715670

5672-
let expected_minimal_tlc_expiry_limit = (24 * 60 * 60 * 1000) * 3;
5671+
let expected_minimal_tlc_expiry_limit =
5672+
DEFAULT_TLC_EXPIRY_DELTA * 2 + DEFAULT_FINAL_TLC_EXPIRY_DELTA;
56735673

56745674
let res = source_node
56755675
.send_payment(SendPaymentCommand {

crates/fiber-lib/src/fiber/tests/mpp.rs

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3916,3 +3916,70 @@ async fn test_send_mpp_send_each_other_with_no_fee() {
39163916
tokio::time::sleep(Duration::from_secs(1)).await;
39173917
}
39183918
}
3919+
3920+
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
3921+
#[ignore = "need to modify MILLI_SECONDS_PER_EPOCH and MIN_TLC_EXPIRY_DELTA to run this test"]
3922+
async fn test_send_mpp_send_each_other_expire_soon() {
3923+
init_tracing();
3924+
3925+
let (nodes, _channels) = create_n_nodes_network_with_params(
3926+
&[
3927+
(
3928+
(0, 1),
3929+
ChannelParameters {
3930+
public: true,
3931+
node_a_funding_amount: MIN_RESERVED_CKB + 1000 * 100000000,
3932+
node_b_funding_amount: MIN_RESERVED_CKB,
3933+
a_tlc_fee_proportional_millionths: Some(0),
3934+
b_tlc_fee_proportional_millionths: Some(0),
3935+
..Default::default()
3936+
},
3937+
),
3938+
(
3939+
(0, 1),
3940+
ChannelParameters {
3941+
public: true,
3942+
node_a_funding_amount: MIN_RESERVED_CKB + 1000 * 100000000,
3943+
node_b_funding_amount: MIN_RESERVED_CKB,
3944+
a_tlc_fee_proportional_millionths: Some(0),
3945+
b_tlc_fee_proportional_millionths: Some(0),
3946+
..Default::default()
3947+
},
3948+
),
3949+
(
3950+
(1, 2),
3951+
ChannelParameters {
3952+
public: true,
3953+
node_a_funding_amount: MIN_RESERVED_CKB + 2000 * 100000000,
3954+
node_b_funding_amount: MIN_RESERVED_CKB,
3955+
a_tlc_fee_proportional_millionths: Some(0),
3956+
b_tlc_fee_proportional_millionths: Some(0),
3957+
..Default::default()
3958+
},
3959+
),
3960+
],
3961+
3,
3962+
None,
3963+
)
3964+
.await;
3965+
let [node_0, _node_1, node_2] = nodes.try_into().expect("3 nodes");
3966+
3967+
for _i in 0..2 {
3968+
let res = node_0
3969+
.send_mpp_payment(&node_2, 2000 * 100000000, None)
3970+
.await;
3971+
3972+
let payment_hash = res.unwrap().payment_hash;
3973+
node_0.wait_until_success(payment_hash).await;
3974+
3975+
tokio::time::sleep(Duration::from_secs(1)).await;
3976+
3977+
let res = node_2
3978+
.send_mpp_payment(&node_0, 2000 * 100000000, None)
3979+
.await;
3980+
3981+
let payment_hash = res.unwrap().payment_hash;
3982+
node_2.wait_until_success(payment_hash).await;
3983+
tokio::time::sleep(Duration::from_secs(1)).await;
3984+
}
3985+
}

crates/fiber-lib/src/fiber/tests/network.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use crate::{
1010
},
1111
fiber::{
1212
channel::ShutdownInfo,
13-
config::DEFAULT_TLC_EXPIRY_DELTA,
1413
gossip::{GossipActorMessage, GossipMessageStore},
1514
graph::ChannelUpdateInfo,
1615
network::{
@@ -865,9 +864,6 @@ fn test_send_payment_validate_invoice() {
865864
.expiry_time(Duration::from_secs(1024))
866865
.payee_pub_key(public_key)
867866
.add_attr(Attribute::FinalHtlcTimeout(5))
868-
.add_attr(Attribute::FinalHtlcMinimumExpiryDelta(
869-
DEFAULT_TLC_EXPIRY_DELTA,
870-
))
871867
.add_attr(Attribute::Description("description".to_string()))
872868
.build_with_sign(|hash| Secp256k1::new().sign_ecdsa_recoverable(hash, &private_key))
873869
.unwrap();

crates/fiber-lib/src/fiber/tests/payment.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(clippy::needless_range_loop)]
22
use crate::fiber::channel::*;
3+
use crate::fiber::config::DEFAULT_FINAL_TLC_EXPIRY_DELTA;
34
use crate::fiber::config::DEFAULT_TLC_EXPIRY_DELTA;
45
use crate::fiber::config::DEFAULT_TLC_FEE_PROPORTIONAL_MILLIONTHS;
56
use crate::fiber::config::MAX_PAYMENT_TLC_EXPIRY_LIMIT;
@@ -3558,7 +3559,7 @@ async fn test_send_payment_with_invalid_tlc_expiry() {
35583559
target_pubkey: Some(nodes[1].pubkey),
35593560
amount: Some(1000),
35603561
keysend: Some(true),
3561-
tlc_expiry_limit: Some(DEFAULT_TLC_EXPIRY_DELTA + 1), // Ok now
3562+
tlc_expiry_limit: Some(DEFAULT_FINAL_TLC_EXPIRY_DELTA + 1), // Ok now
35623563
..Default::default()
35633564
})
35643565
.await;
@@ -3617,7 +3618,7 @@ async fn test_send_payself_with_invalid_tlc_expiry() {
36173618
amount: Some(1000),
36183619
keysend: Some(true),
36193620
allow_self_payment: true,
3620-
tlc_expiry_limit: Some(DEFAULT_TLC_EXPIRY_DELTA),
3621+
tlc_expiry_limit: Some(DEFAULT_FINAL_TLC_EXPIRY_DELTA),
36213622
..Default::default()
36223623
})
36233624
.await;
@@ -6137,7 +6138,7 @@ async fn test_network_with_hops_max_number_limit() {
61376138
keysend: Some(true),
61386139
allow_self_payment: false,
61396140
dry_run: false,
6140-
tlc_expiry_limit: Some(13 * 24 * 60 * 60 * 1000), // 13 days
6141+
tlc_expiry_limit: Some(DEFAULT_TLC_EXPIRY_DELTA * 12 + DEFAULT_FINAL_TLC_EXPIRY_DELTA), // 13 hops limit
61416142
..Default::default()
61426143
})
61436144
.await;
@@ -6152,7 +6153,7 @@ async fn test_network_with_hops_max_number_limit() {
61526153
keysend: Some(true),
61536154
allow_self_payment: false,
61546155
dry_run: false,
6155-
tlc_expiry_limit: Some(13 * 24 * 60 * 60 * 1000), // 13 days
6156+
tlc_expiry_limit: Some(DEFAULT_TLC_EXPIRY_DELTA * 12 + DEFAULT_FINAL_TLC_EXPIRY_DELTA), // 13 hops limit
61566157
..Default::default()
61576158
})
61586159
.await

crates/fiber-lib/src/rpc/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ Attempts to open a channel with a peer.
203203
* `public` - <em>`Option<bool>`</em>, Whether this is a public channel (will be broadcasted to network, and can be used to forward TLCs), an optional parameter, default value is true.
204204
* `funding_udt_type_script` - <em>`Option<Script>`</em>, The type script of the UDT to fund the channel with, an optional parameter.
205205
* `shutdown_script` - <em>`Option<Script>`</em>, The script used to receive the channel balance, an optional parameter, default value is the secp256k1_blake160_sighash_all script corresponding to the configured private key.
206-
* `commitment_delay_epoch` - <em>`Option<EpochNumberWithFraction>`</em>, The delay time for the commitment transaction, must be an [EpochNumberWithFraction](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0017-tx-valid-since/e-i-l-encoding.png) in u64 format, an optional parameter, default value is 24 hours, which is 6 epochs.
206+
* `commitment_delay_epoch` - <em>`Option<EpochNumberWithFraction>`</em>, The delay time for the commitment transaction, must be an [EpochNumberWithFraction](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0017-tx-valid-since/e-i-l-encoding.png) in u64 format, an optional parameter, default value is 1 epoch, which is 4 hours.
207207
* `commitment_fee_rate` - <em>`Option<u64>`</em>, The fee rate for the commitment transaction, an optional parameter.
208208
* `funding_fee_rate` - <em>`Option<u64>`</em>, The fee rate for the funding transaction, an optional parameter.
209-
* `tlc_expiry_delta` - <em>`Option<u64>`</em>, The expiry delta to forward a tlc, in milliseconds, default to 1 day, which is 24 * 60 * 60 * 1000 milliseconds
210-
Expect it >= 2/3 commitment_delay_epoch, minimum is 16 hours.
209+
* `tlc_expiry_delta` - <em>`Option<u64>`</em>, The expiry delta to forward a tlc, in milliseconds, default to 4 hours, which is 4 * 60 * 60 * 1000 milliseconds
210+
Expect it >= 2/3 commitment_delay_epoch.
211211
This parameter can be updated with rpc `update_channel` later.
212212
* `tlc_min_value` - <em>`Option<u128>`</em>, The minimum value for a TLC our side can send,
213213
an optional parameter, default is 0, which means we can send any TLC is larger than 0.

0 commit comments

Comments
 (0)