-
Notifications
You must be signed in to change notification settings - Fork 43
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
(Requires merge by @wiz) Feat: Unix sockets for Electrum RPC #50
Conversation
4205fd1
to
1043fd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK @ 1043fd2a
Nothing seems to break in TCP mode.
I tested the new unix socket RPC mode by relaying TCP requests through socat:
socat TCP-LISTEN:50001,fork UNIX-CONNECT:/tmp/esplora-bitcoin-mainnet-rpc
and it handled both the pummeller test and regular wallet requests successfully.
1043fd2
to
4ad4001
Compare
Refactored, please re-test. Thanks
I tested TCP and Unix versions and they still work post-refactor. Self tested ACK 4ad40012d0f9723220af50f08cab2280c5f94d32 using mononaut's Unix forwarding with socat. |
4ad4001
to
941cae1
Compare
Self tested ACK 941cae186adc145011c89c35d83c2bb121c4715a (The changes since the last ACK are all just startup scripts) |
941cae1
to
8c5cd7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK @ mempool-electrs 3.0.0-dev-8c5cd7e
8c5cd7e
to
4339a51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK @ mempool-electrs 3.0.0-dev-4339a51
(Requires merge by @wiz) Feat: Unix sockets for Electrum RPC
Edit: Since this PR changes fundamentally how ops works, only @wiz should merge it. The timing of this merge is important, and only @wiz should control it.
The Rust library doesn't support Unix socket connections, so I was unable to test it... however, I was able to confirm that the Tcp code hasn't broken. (No leaked threads or sockets)
Note:
When
"electrum-discovery"
feature is enabled, originally the add_peer request would upgrade a client to a peer by looking at their TcpStream's IpAddr... with UnixStream we have no IpAddr, so I just respond with an error saying that "sorry we couldn't add you as a peer because...... reasons."