Skip to content

Commit 034be95

Browse files
committed
feat: add connection_timeout_secs to ElectrumSyncConfig and bump to v0.7.0-rc.32
1 parent f045195 commit 034be95

20 files changed

Lines changed: 567 additions & 456 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 0.7.0-rc.31 (Synonym Fork)
1+
# 0.7.0-rc.32 (Synonym Fork)
22

33
## Bug Fixes
44

@@ -24,6 +24,14 @@
2424

2525
## Synonym Fork Additions
2626

27+
- Added `connection_timeout_secs` field to `ElectrumSyncConfig` (default: 10 s). This bounds
28+
Electrum socket operations for both the BDK on-chain and LDK tx-sync clients, preventing Tokio's
29+
blocking thread pool from being exhausted by threads stuck on dead sockets under total packet
30+
loss (e.g. a captive portal on iOS). Set to `0` to disable; values above 255 are capped to
31+
255 and a warning is logged.
32+
**Breaking change:** existing struct-literal construction of `ElectrumSyncConfig` must add the
33+
new field or switch to `ElectrumSyncConfig { .., ..Default::default() }`.
34+
2735
- Enabled line-table debug info in `release-smaller` profile for iOS dSYM generation
2836
and Android crash symbolication
2937
- Added `OnchainPayment::calculate_send_all_fee()` to preview the fee for a drain / send-all

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exclude = ["bindings/uniffi-bindgen"]
44

55
[package]
66
name = "ldk-node"
7-
version = "0.7.0-rc.31"
7+
version = "0.7.0-rc.32"
88
authors = ["Elias Rohrer <dev@tnull.de>"]
99
homepage = "https://lightningdevkit.org/"
1010
license = "MIT OR Apache-2.0"

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import PackageDescription
55

6-
let tag = "v0.7.0-rc.31"
7-
let checksum = "aa189d355dc048664652832747f9236eddd97cdf78eb1659d7def06eae72b9b4"
6+
let tag = "v0.7.0-rc.32"
7+
let checksum = "942249e5cdce1aa638ba0ef5ce0de724bf4fb543841355d5c3cdcd94fb58150e"
88
let url = "https://github.com/synonymdev/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"
99

1010
let package = Package(

bindgen.sh

100644100755
File mode changed.

bindings/kotlin/ldk-node-android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ android.useAndroidX=true
33
android.enableJetifier=true
44
kotlin.code.style=official
55
group=com.synonym
6-
version=0.7.0-rc.31
6+
version=0.7.0-rc.32

bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.android.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9459,15 +9459,18 @@ object FfiConverterTypeElectrumSyncConfig: FfiConverterRustBuffer<ElectrumSyncCo
94599459
override fun read(buf: ByteBuffer): ElectrumSyncConfig {
94609460
return ElectrumSyncConfig(
94619461
FfiConverterOptionalTypeBackgroundSyncConfig.read(buf),
9462+
FfiConverterULong.read(buf),
94629463
)
94639464
}
94649465

94659466
override fun allocationSize(value: ElectrumSyncConfig) = (
9466-
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`)
9467+
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`) +
9468+
FfiConverterULong.allocationSize(value.`connectionTimeoutSecs`)
94679469
)
94689470

94699471
override fun write(value: ElectrumSyncConfig, buf: ByteBuffer) {
94709472
FfiConverterOptionalTypeBackgroundSyncConfig.write(value.`backgroundSyncConfig`, buf)
9473+
FfiConverterULong.write(value.`connectionTimeoutSecs`, buf)
94719474
}
94729475
}
94739476

bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.common.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,8 @@ data class CustomTlvRecord (
868868

869869
@kotlinx.serialization.Serializable
870870
data class ElectrumSyncConfig (
871-
val `backgroundSyncConfig`: BackgroundSyncConfig?
871+
val `backgroundSyncConfig`: BackgroundSyncConfig?,
872+
val `connectionTimeoutSecs`: kotlin.ULong
872873
) {
873874
companion object
874875
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
org.gradle.jvmargs=-Xmx1536m
22
kotlin.code.style=official
33
group=com.synonym
4-
version=0.7.0-rc.31
4+
version=0.7.0-rc.32

bindings/kotlin/ldk-node-jvm/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.common.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,8 @@ data class CustomTlvRecord (
868868

869869
@kotlinx.serialization.Serializable
870870
data class ElectrumSyncConfig (
871-
val `backgroundSyncConfig`: BackgroundSyncConfig?
871+
val `backgroundSyncConfig`: BackgroundSyncConfig?,
872+
val `connectionTimeoutSecs`: kotlin.ULong
872873
) {
873874
companion object
874875
}

bindings/kotlin/ldk-node-jvm/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.jvm.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9448,15 +9448,18 @@ object FfiConverterTypeElectrumSyncConfig: FfiConverterRustBuffer<ElectrumSyncCo
94489448
override fun read(buf: ByteBuffer): ElectrumSyncConfig {
94499449
return ElectrumSyncConfig(
94509450
FfiConverterOptionalTypeBackgroundSyncConfig.read(buf),
9451+
FfiConverterULong.read(buf),
94519452
)
94529453
}
94539454

94549455
override fun allocationSize(value: ElectrumSyncConfig) = (
9455-
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`)
9456+
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`) +
9457+
FfiConverterULong.allocationSize(value.`connectionTimeoutSecs`)
94569458
)
94579459

94589460
override fun write(value: ElectrumSyncConfig, buf: ByteBuffer) {
94599461
FfiConverterOptionalTypeBackgroundSyncConfig.write(value.`backgroundSyncConfig`, buf)
9462+
FfiConverterULong.write(value.`connectionTimeoutSecs`, buf)
94609463
}
94619464
}
94629465

0 commit comments

Comments
 (0)