Add electrum feature flag#558
Conversation
|
👋 I see @wpaulino was un-assigned. |
tnull
left a comment
There was a problem hiding this comment.
So far we omitted introducing features to allow dis/enabling via the builder. We will however introduce features going forward (likely with 0.7), but they need to be carefully considered (also due to the interplay with the uniffi feature) so we will not do a one-off just for electrum.
Electrum brings a dependency on aws-lc-sys which is causing lots of issues cross-compiling a project using ldk-node for many target platforms.
It's actually not 'lots of issues', AFAIK it's really just Swift bindings generation that don't work seamlessly with aws-lc-rs (please correct me if you hit other instances), which is otherwise clearly preferable to its ring counterpart. We already added the capability to select the rustls backend for lightning-transaction-sync with lightningdevkit/rust-lightning#3587, so this will be fixed going forward with the LDK 0.2 upgrade, but until then I'd recommend just running on a backport of that PR and switching the the backend to rustls-ring for any Swift builds (which is what we did for 0.5).
Going ahead and closing this for now, but let me know if you need further assistance resolving this on your side.
|
Makes sense. FWIW it wasn't related to Swift generation in my case. I'm using napi-rs to expose ldk-node functionality in javascript and NAPI builds native modules for a whole host of platform targets. Lots of them were failing because of aws-lc-rs: https://github.com/moneydevkit/lightning-js/actions/runs/15451440363/job/43494266800 With this electrum-feature branch they all passed fine: https://github.com/moneydevkit/lightning-js/actions/runs/15454322485 I suspect I can probably fix most of them by adjusting the base image / build environment github actions is using to be able to compile / cross-compile aws-lc-rs but this seemed easier and I thought maybe ldk-node would be okay with minimizing dependencies for end-users. I'll just build off the fork for now and revisit the build issues later. |
When node.run() exits (e.g. NoReachablePeers from kyoto lightningdevkit#558), the background task rebuilds the node, swaps the requester, and respawns channel processing tasks, up to MAX_RESTART_RETRIES (5) attempts with doubling backoff starting at 500ms. - Change cbf_runtime_status from Mutex<> to Arc<Mutex<>> so it can be shared with the async restart loop - Extract build_cbf_node_static() that takes explicit params instead of &self, enabling calls from 'static async blocks - Move all task spawning (info/warn/event + node.run) into a single restart loop inside spawn_background_task AI: claude
Electrum brings a dependency on
aws-lc-syswhich is causing lots of issues cross-compiling a project using ldk-node for many target platforms.This introduces an electrum feature flag and makes it a default feature as to not change the current default behavior but allows an ldk-node user to use
default-features = falseif they are not using electrum and do not wish to take the extra unnecessary dependencies.