Skip to content

Commit 3238e64

Browse files
committed
fix fee rate calculation assumptions for eclair channels
1 parent 06e4366 commit 3238e64

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

resources/charts/bitcoincore/charts/eclair/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ baseConfig: |
103103
eclair.api.port = 8080
104104
eclair.features.keysend = optional
105105
eclair.bitcoind.startup-locked-utxos-behavior = "unlock"
106-
106+
107107
config: ""
108108

109109
defaultConfig: ""

resources/scenarios/ln_framework/ln.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,17 +476,13 @@ def connect(self, target_uri, max_tries=5) -> dict:
476476
return None
477477

478478
def channel(self, pk, capacity, push_amt, fee_rate, max_tries=10) -> dict:
479-
import math
480-
481-
fee_rate_factor = math.ceil(
482-
fee_rate / 170
483-
) # FIXME: reduce fee rate by factor to get close to original value
479+
NON_GROUPED_UTXO_BYTE_SIZE = 165
484480
data = {
485481
"fundingSatoshis": capacity,
486482
"pushMsat": push_amt,
487483
"nodeId": pk,
488-
"fundingFeerateSatByte": fee_rate_factor,
489-
"fundingFeeBudgetSatoshis": fee_rate,
484+
"fundingFeerateSatByte": fee_rate,
485+
"fundingFeeBudgetSatoshis": fee_rate * NON_GROUPED_UTXO_BYTE_SIZE,
490486
} # FIXME: https://acinq.github.io/eclair/#open-2 what parameters should be sent?
491487
attempt = 0
492488
while attempt < max_tries:
@@ -537,7 +533,8 @@ def graph(self, max_tries=5) -> dict:
537533
if response:
538534
res = json.loads(response)
539535
if len(res) > 0:
540-
return {"edges": res}
536+
filtered_channels = [ch for ch in res if ch["channelFlags"]["isNode1"]]
537+
return {"edges": filtered_channels}
541538
else:
542539
self.log.warning(f"unable to list channels: {res}, wait and retry...")
543540
sleep(10)

0 commit comments

Comments
 (0)