Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM: Update boltz client dependency and use included wasm tokio-tungstenite #769

Merged
merged 3 commits into from
Mar 15, 2025

Conversation

danielgranhao
Copy link
Contributor

@danielgranhao danielgranhao commented Mar 10, 2025

This PR upgrades the boltz client dependency to the updated version proposed in SatoshiPortal/boltz-rust#91.

Besides updating the dependency, it also starts using it for connecting the status stream websocket. The updated boltz client uses tokio-tungstenite-wasm for websockets, which doesn't expose pinging. To address this Boltz now supports application-level ping messages, which the boltz client PR also exposes.

Because now the boltz client is used to start the websocket connection, I've merged the BoltzStatusStreamstruct into BoltzSwapper, which now also implements SwapperStatusStream.

The electrum client is still kept in use. Supporting WASM will require using esplora, which I propose we address in a follow-up PR.

@danielgranhao danielgranhao force-pushed the daniel-wasm-boltz-rust-client branch from 1948bf4 to 4391a69 Compare March 12, 2025 01:21
@danielgranhao danielgranhao marked this pull request as ready for review March 12, 2025 01:37
Copy link
Member

@roeierez roeierez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@dangeross dangeross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danielgranhao danielgranhao force-pushed the daniel-wasm-boltz-rust-client branch from a237ae1 to f75d2d4 Compare March 12, 2025 15:35
@danielgranhao
Copy link
Contributor Author

Interestingly enough, the changes here fix #746. I feel a bit uneasy because I don't fully understand why. My best guess is that somehow, the lower latency to a local websocket server was causing some concurrency issue between sending and receiving?

@danielgranhao danielgranhao linked an issue Mar 14, 2025 that may be closed by this pull request
@danielgranhao danielgranhao merged commit 7bd09ae into main Mar 15, 2025
10 of 13 checks passed
@danielgranhao danielgranhao deleted the daniel-wasm-boltz-rust-client branch March 15, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

regtest: swapper not sending updates in status stream
3 participants