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

[PoC] Use Esplora for fee estimation and tx broadcast for blocksonly nodes #1481

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kristapsk
Copy link
Member

Proof of concept, not for merging at current state.

See #1466. This allows to run JoinMarket with Bitcoin node configured in blocksonly mode (no local mempool). It fallbacks to Esplora (blockstream.info) for fee estimation, which locally will not work at all, and also tries to push tx to the network through it too, not local node, for privacy reasons.

So far have tested with direct (non coinjoin) sends on a testnet3 (unfortunatelly Blockstream doesn't run signet instance of Esplora and https://explorer.bc-2.jp/ which everyone used for signet is down for some time).

Currently this is kinda hacky, Esplora code should not be integrated into blockchaininterface, some refactorizations would be needed. But first I would want to finish with #1462.

@kristapsk
Copy link
Member Author

Did coinjoin test as a taker. It works, just with one nuance - sendpayment.py waits until tx gets first confirmation and only then quits.

@kristapsk
Copy link
Member Author

From #1466 (comment), to not forget.

We should also be careful how we connect to the block explorer, if we reuse the same circuit for multiple broadcast we would reveal (possible) common ownership to the server.

Yes, it should switch Tor circuits, especially when running yield generator. That needs to be improved in my PoC code.

@kristapsk kristapsk force-pushed the esplora branch 2 times, most recently from 5d4df3c to 3cfa5ac Compare May 9, 2023 17:31
@kristapsk
Copy link
Member Author

Rebased against master to re-run CI with latest fixes.

@kristapsk
Copy link
Member Author

Rebased

@kristapsk
Copy link
Member Author

Rebased

@kristapsk
Copy link
Member Author

Rebased.

Waiting for more concept ACKs / NACKs here, before doing any more work on this.

@kristapsk
Copy link
Member Author

Rebased

@kristapsk
Copy link
Member Author

Rebased

@kristapsk
Copy link
Member Author

Re-added missing PySocks dependency (otherwise SOCKS proxy for requests doesn't work), it was lost at rebase after moving from setup.py to pyproject.toml.

Btw, https://explorer.bc-2.jp for signet is back online, but not usable for JoinMarket, it's requests can't get though CloudFlare DDoS protection.

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.

None yet

1 participant