Skip to content

Init is fully sync even in spark join #101

Description

@TheBlueMatt

Fable says this, obviously fixed with lightningdevkit/ldk-node#926 but we should probably spawn not join:

  1. The join (lib.rs:667-713) runs Spark::init and LightningWallet::init concurrently — but tokio::join! is single-task
    concurrency: both futures are polled on the same task, interleaving only at await points. And LightningWallet::init
    (lightning_wallet.rs:61-214) contains zero awaits: Builder::build_with_store (lightning_wallet.rs:176) is a synchronous fn
    that internally does block_in_place(|| handle.block_on(...)) for all its store reads, and Node::start()
    (lightning_wallet.rs:204) is also sync. So the entire LDK init is one long poll that blocks the shared task/thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions