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

IPC Socket Client does not send \n delimiter #4847

Open
fipso opened this issue Sep 27, 2024 · 4 comments
Open

IPC Socket Client does not send \n delimiter #4847

fipso opened this issue Sep 27, 2024 · 4 comments
Assignees
Labels
enhancement New feature or improvement. next-patch Issues scheduled for the next arch release. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6

Comments

@fipso
Copy link

fipso commented Sep 27, 2024

Ethers Version

6

Search Terms

ipc,socket,json

Describe the Problem

So as of now, all the major ETH node implementations support \n delimiter after every JSON message on their IPC socket.
The problem is. Some even require it. Geth and Nethermind at least won't ever reply to a request if it is not terminated with \n. For Geth the reason is they use the default JSON decoder from golang which is built for streams and needs a delimiter. Nethermind just hardcoded \n as their delimiter for IPC request handling.

Please fix this. Thanks a lot. Ethers.js is amazing

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

Ethereum (mainnet/ropsten/rinkeby/goerli), node.js (v12 or newer), Geth, Other (please specify)

Environment (Other)

Nethermind

@fipso fipso added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Sep 27, 2024
@ricmoo ricmoo added enhancement New feature or improvement. on-deck This Enhancement or Bug is currently being worked on. next-patch Issues scheduled for the next arch release. and removed investigate Under investigation and may be a bug. labels Oct 16, 2024
@ricmoo
Copy link
Member

ricmoo commented Oct 16, 2024

Thanks. Testing it out right now...

@ricmoo
Copy link
Member

ricmoo commented Oct 16, 2024

My version of Geth seems to work fine without the \n, but after adding it, Geth still works just peachy.

@fipso
Copy link
Author

fipso commented Oct 16, 2024

Yes I was wrong about the geth implementation. The default json decoder from go does not need /n at all. If it sees a whitespace or /n it just skips it when parsing

@fipso
Copy link
Author

fipso commented Oct 27, 2024

Would be cool if we get this merged. Can't use nethermind ipc sockets with ethers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. next-patch Issues scheduled for the next arch release. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

3 participants
@ricmoo @fipso and others