Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.7.0-rc.32 (Synonym Fork)
# 0.7.0-rc.33 (Synonym Fork)

## Bug Fixes

Expand Down Expand Up @@ -29,6 +29,14 @@

## Synonym Fork Additions

- Added `connection_timeout_secs` field to `ElectrumSyncConfig` (default: 10 s). This bounds
Electrum socket operations for both the BDK on-chain and LDK tx-sync clients, preventing Tokio's
blocking thread pool from being exhausted by threads stuck on dead sockets under total packet
loss (e.g. a captive portal on iOS). Set to `0` to disable; values above 255 are capped to
255 and a warning is logged.
**Breaking change:** existing struct-literal construction of `ElectrumSyncConfig` must add the
new field or switch to `ElectrumSyncConfig { .., ..Default::default() }`.

- Added `OnchainPayment::calculate_send_all_fee()` to preview the fee for a drain / send-all
transaction before broadcasting (fee-calculation counterpart of `send_all_to_address`)
- Added runtime APIs for dynamic address type management:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude = ["bindings/uniffi-bindgen"]

[package]
name = "ldk-node"
version = "0.7.0-rc.32"
version = "0.7.0-rc.33"
authors = ["Elias Rohrer <dev@tnull.de>"]
homepage = "https://lightningdevkit.org/"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import PackageDescription

let tag = "v0.7.0-rc.32"
let checksum = "89d987f390e0f8fae370c6d549aacd8b8e1c3c95fb0d6e9ccfcf216cbd263b38"
let tag = "v0.7.0-rc.33"
let checksum = "82e318ac605e04d87f1aa24c920c06627346d9500c6395db45cb23f159e200f0"
let url = "https://github.com/synonymdev/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"

let package = Package(
Expand Down
Empty file modified bindgen.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
group=com.synonym
version=0.7.0-rc.32
version=0.7.0-rc.33
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9459,15 +9459,18 @@ object FfiConverterTypeElectrumSyncConfig: FfiConverterRustBuffer<ElectrumSyncCo
override fun read(buf: ByteBuffer): ElectrumSyncConfig {
return ElectrumSyncConfig(
FfiConverterOptionalTypeBackgroundSyncConfig.read(buf),
FfiConverterULong.read(buf),
)
}

override fun allocationSize(value: ElectrumSyncConfig) = (
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`)
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`) +
FfiConverterULong.allocationSize(value.`connectionTimeoutSecs`)
)

override fun write(value: ElectrumSyncConfig, buf: ByteBuffer) {
FfiConverterOptionalTypeBackgroundSyncConfig.write(value.`backgroundSyncConfig`, buf)
FfiConverterULong.write(value.`connectionTimeoutSecs`, buf)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,8 @@ data class CustomTlvRecord (

@kotlinx.serialization.Serializable
data class ElectrumSyncConfig (
val `backgroundSyncConfig`: BackgroundSyncConfig?
val `backgroundSyncConfig`: BackgroundSyncConfig?,
val `connectionTimeoutSecs`: kotlin.ULong
) {
companion object
}
Expand Down
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-jvm/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536m
kotlin.code.style=official
group=com.synonym
version=0.7.0-rc.32
version=0.7.0-rc.33
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,8 @@ data class CustomTlvRecord (

@kotlinx.serialization.Serializable
data class ElectrumSyncConfig (
val `backgroundSyncConfig`: BackgroundSyncConfig?
val `backgroundSyncConfig`: BackgroundSyncConfig?,
val `connectionTimeoutSecs`: kotlin.ULong
) {
companion object
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9448,15 +9448,18 @@ object FfiConverterTypeElectrumSyncConfig: FfiConverterRustBuffer<ElectrumSyncCo
override fun read(buf: ByteBuffer): ElectrumSyncConfig {
return ElectrumSyncConfig(
FfiConverterOptionalTypeBackgroundSyncConfig.read(buf),
FfiConverterULong.read(buf),
)
}

override fun allocationSize(value: ElectrumSyncConfig) = (
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`)
FfiConverterOptionalTypeBackgroundSyncConfig.allocationSize(value.`backgroundSyncConfig`) +
FfiConverterULong.allocationSize(value.`connectionTimeoutSecs`)
)

override fun write(value: ElectrumSyncConfig, buf: ByteBuffer) {
FfiConverterOptionalTypeBackgroundSyncConfig.write(value.`backgroundSyncConfig`, buf)
FfiConverterULong.write(value.`connectionTimeoutSecs`, buf)
}
}

Expand Down
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dictionary EsploraSyncConfig {

dictionary ElectrumSyncConfig {
BackgroundSyncConfig? background_sync_config;
u64 connection_timeout_secs;
};

dictionary LSPS2ServiceConfig {
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ldk_node"
version = "0.7.0-rc.32"
version = "0.7.0-rc.33"
authors = [
{ name="Elias Rohrer", email="dev@tnull.de" },
]
Expand Down
11 changes: 9 additions & 2 deletions bindings/python/src/ldk_node/ldk_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -8206,31 +8206,38 @@ def write(value, buf):

class ElectrumSyncConfig:
background_sync_config: "typing.Optional[BackgroundSyncConfig]"
def __init__(self, *, background_sync_config: "typing.Optional[BackgroundSyncConfig]"):
connection_timeout_secs: "int"
def __init__(self, *, background_sync_config: "typing.Optional[BackgroundSyncConfig]", connection_timeout_secs: "int"):
self.background_sync_config = background_sync_config
self.connection_timeout_secs = connection_timeout_secs

def __str__(self):
return "ElectrumSyncConfig(background_sync_config={})".format(self.background_sync_config)
return "ElectrumSyncConfig(background_sync_config={}, connection_timeout_secs={})".format(self.background_sync_config, self.connection_timeout_secs)

def __eq__(self, other):
if self.background_sync_config != other.background_sync_config:
return False
if self.connection_timeout_secs != other.connection_timeout_secs:
return False
return True

class _UniffiConverterTypeElectrumSyncConfig(_UniffiConverterRustBuffer):
@staticmethod
def read(buf):
return ElectrumSyncConfig(
background_sync_config=_UniffiConverterOptionalTypeBackgroundSyncConfig.read(buf),
connection_timeout_secs=_UniffiConverterUInt64.read(buf),
)

@staticmethod
def check_lower(value):
_UniffiConverterOptionalTypeBackgroundSyncConfig.check_lower(value.background_sync_config)
_UniffiConverterUInt64.check_lower(value.connection_timeout_secs)

@staticmethod
def write(value, buf):
_UniffiConverterOptionalTypeBackgroundSyncConfig.write(value.background_sync_config, buf)
_UniffiConverterUInt64.write(value.connection_timeout_secs, buf)


class EsploraSyncConfig:
Expand Down
Loading