Skip to content

Commit ffecd62

Browse files
authored
Move channel parameters to their own conf section (#2149)
For consistency with existing sections: `router`, `relay`, `peer-connection`, etc.
1 parent 57c2cc5 commit ffecd62

36 files changed

Lines changed: 324 additions & 295 deletions

eclair-core/src/main/resources/reference.conf

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ eclair {
1616
password = "" // password for basic auth, must be non empty if json-rpc api is enabled
1717
}
1818

19-
watch-spent-window = 1 minute // at startup watches will be put back within that window to reduce herd effect; must be > 0s
20-
2119
bitcoind {
2220
host = "localhost"
2321
rpcport = 8332
@@ -74,45 +72,49 @@ eclair {
7472
channel-flags {
7573
announce-channel = true
7674
}
77-
}
7875

79-
dust-limit-satoshis = 546
80-
max-remote-dust-limit-satoshis = 600
81-
htlc-minimum-msat = 1
82-
// The following parameters apply to each HTLC direction (incoming or outgoing), which means that the total HTLC limits will be twice what is set here
83-
max-htlc-value-in-flight-msat = 5000000000 // 50 mBTC
84-
max-accepted-htlcs = 30
85-
86-
reserve-to-funding-ratio = 0.01 // recommended by BOLT #2
87-
max-reserve-to-funding-ratio = 0.05 // channel reserve can't be more than 5% of the funding amount (recommended: 1%)
76+
dust-limit-satoshis = 546
77+
max-remote-dust-limit-satoshis = 600
78+
htlc-minimum-msat = 1
79+
// The following parameters apply to each HTLC direction (incoming or outgoing), which means that the total HTLC limits will be twice what is set here
80+
max-htlc-value-in-flight-msat = 5000000000 // 50 mBTC
81+
max-accepted-htlcs = 30
82+
83+
reserve-to-funding-ratio = 0.01 // recommended by BOLT #2
84+
max-reserve-to-funding-ratio = 0.05 // channel reserve can't be more than 5% of the funding amount (recommended: 1%)
85+
min-funding-satoshis = 100000
86+
max-funding-satoshis = 16777215 // to open channels larger than 16777215 you must enable the large_channel_support feature in 'eclair.features'
87+
88+
to-remote-delay-blocks = 720 // number of blocks that the other node's to-self outputs must be delayed (720 ~ 5 days)
89+
max-to-local-delay-blocks = 2016 // maximum number of blocks that we are ready to accept for our own delayed outputs (2016 ~ 2 weeks)
90+
mindepth-blocks = 3
91+
expiry-delta-blocks = 144
92+
// When we receive the preimage for an HTLC and want to fulfill it but the upstream peer stops responding, we want to
93+
// avoid letting its HTLC-timeout transaction become enforceable on-chain (otherwise there is a race condition between
94+
// our HTLC-success and their HTLC-timeout).
95+
// We will close the channel when the HTLC-timeout will happen in less than this number.
96+
// NB: this number effectively reduces the expiry-delta-blocks, so you may want to take that into account and increase
97+
// expiry-delta-blocks.
98+
fulfill-safety-before-timeout-blocks = 24
99+
min-final-expiry-delta-blocks = 30 // Bolt 11 invoice's min_final_cltv_expiry; must be strictly greater than fulfill-safety-before-timeout-blocks
100+
max-block-processing-delay = 30 seconds // we add a random delay before processing blocks, capped at this value, to prevent herd effect
101+
max-tx-publish-retry-delay = 60 seconds // we add a random delay before retrying failed transaction publication
102+
103+
// The default strategy, when we encounter an unhandled exception or internal error, is to locally force-close the
104+
// channel. Not only is there a delay before the channel balance gets refunded, but if the exception was due to some
105+
// misconfiguration or bug in eclair that affects all channels, we risk force-closing all channels.
106+
// This is why an alternative behavior is to simply log an error and stop the node. Note that if you don't closely
107+
// monitor your node, there is a risk that your peers take advantage of the downtime to try and cheat by publishing a
108+
// revoked commitment. Additionally, while there is no known way of triggering an internal error in eclair from the
109+
// outside, there may very well be a bug that allows just that, which could be used as a way to remotely stop the node
110+
// (with the default behavior, it would "only" cause a local force-close of the channel).
111+
unhandled-exception-strategy = "local-close" // local-close or stop
112+
113+
revocation-timeout = 20 seconds // after sending a commit_sig, we will wait for at most that duration before disconnecting
114+
}
88115

89116
balance-check-interval = 1 hour
90117

91-
to-remote-delay-blocks = 720 // number of blocks that the other node's to-self outputs must be delayed (720 ~ 5 days)
92-
max-to-local-delay-blocks = 2016 // maximum number of blocks that we are ready to accept for our own delayed outputs (2016 ~ 2 weeks)
93-
mindepth-blocks = 3
94-
expiry-delta-blocks = 144
95-
// When we receive the preimage for an HTLC and want to fulfill it but the upstream peer stops responding, we want to
96-
// avoid letting its HTLC-timeout transaction become enforceable on-chain (otherwise there is a race condition between
97-
// our HTLC-success and their HTLC-timeout).
98-
// We will close the channel when the HTLC-timeout will happen in less than this number.
99-
// NB: this number effectively reduces the expiry-delta-blocks, so you may want to take that into account and increase
100-
// expiry-delta-blocks.
101-
fulfill-safety-before-timeout-blocks = 24
102-
min-final-expiry-delta-blocks = 30 // Bolt 11 invoice's min_final_cltv_expiry; must be strictly greater than fulfill-safety-before-timeout-blocks
103-
max-block-processing-delay = 30 seconds // we add a random delay before processing blocks, capped at this value, to prevent herd effect
104-
max-tx-publish-retry-delay = 60 seconds // we add a random delay before retrying failed transaction publication
105-
106-
// The default strategy, when we encounter an unhandled exception or internal error, is to locally force-close the
107-
// channel. Not only is there a delay before the channel balance gets refunded, but if the exception was due to some
108-
// misconfiguration or bug in eclair that affects all channels, we risk force-closing all channels.
109-
// This is why an alternative behavior is to simply log an error and stop the node. Note that if you don't closely
110-
// monitor your node, there is a risk that your peers take advantage of the downtime to try and cheat by publishing a
111-
// revoked commitment. Additionally, while there is no known way of triggering an internal error in eclair from the
112-
// outside, there may very well be a bug that allows just that, which could be used as a way to remotely stop the node
113-
// (with the default behavior, it would "only" cause a local force-close of the channel).
114-
unhandled-exception-strategy = "local-close" // local-close or stop
115-
116118
relay {
117119
fees {
118120
// Fees for public channels
@@ -197,8 +199,6 @@ eclair {
197199
update-fee-min-diff-ratio = 0.1
198200
}
199201

200-
revocation-timeout = 20 seconds // after sending a commit_sig, we will wait for at most that duration before disconnecting
201-
202202
peer-connection {
203203
auth-timeout = 15 seconds // will disconnect if connection authentication doesn't happen within that timeframe
204204
init-timeout = 15 seconds // will disconnect if initialization doesn't happen within that timeframe
@@ -213,13 +213,13 @@ eclair {
213213

214214
payment-request-expiry = 1 hour // default expiry for payment requests generated by this node
215215
multi-part-payment-expiry = 60 seconds // default expiry for receiving all parts of a multi-part payment
216-
min-funding-satoshis = 100000
217-
max-funding-satoshis = 16777215 // to open channels larger than 16777215 you must enable the large_channel_support feature in 'eclair.features'
218216
max-payment-attempts = 5
219217

220218
autoprobe-count = 0 // number of parallel tasks that send test payments to detect invalid channels
221219

222220
router {
221+
watch-spent-window = 1 minute // at startup watches will be put back within that window to reduce herd effect; must be > 0s
222+
223223
channel-exclude-duration = 60 seconds // when a temporary channel failure is returned, we exclude the channel from our payment routes for this duration
224224
broadcast-interval = 60 seconds // see BOLT #7
225225
init-timeout = 5 minutes

0 commit comments

Comments
 (0)