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

EOF while setting up TLS connection between qlight.server and qlight.client #1689

Open
DiWangShePi opened this issue Jan 11, 2024 · 0 comments

Comments

@DiWangShePi
Copy link

I'm trying to establish a TLS connection between qlight.client and qlight.server. I found a description of these two parts of functionality in this document: https://docs.goquorum.consensys.io/concepts/qlight-node#docusaurus_skipToContent_fallback

However, I encountered the first problem when using the --qlight.client.serverNode parameter. The string starting with "0x" in the example reported an error when parsing:

"panic: invalid node: missing 'enr:' prefix for base64-encoded record"

So I switched to a string starting with "enode:" , which I found in static-nodes.json, and it seemed to work. I'm not sure if it's my understanding of the documentation or maybe I'm just lacking some prerequisites?

After this, I started trying to establish a connection between qlight.client and qlight.server.

On the qlight.server side, the relevant parameters are:

--qlight.server 
--qlight.server.p2p.port=30305 

On the qlight.client side, the relevant parameters are:

--qlight.client 
--qlight.client.serverNode "enode://3c567e5d8034fbed05104ecb8a9cb5cfb6468a22ce1bccbfc99ec2f5fc6789bb4f3307ff4357d2efe8609a0375d6850fc00c0cb1bc73a98041dab4b6891f3772@127.0.0.1:30300?discport=0&raftport=53000" 
--qlight.client.serverNodeRPC "http://127.0.0.1:30305"

I then try to send my transaction via qlight.client as proxy:

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"0x3cae4ee4de64422b1d17f67cd36a6e19db5223dd", "to":null, "gas":"0x24A22","gasPrice":"0x0", "data":"0x608060405234801561001057600080fd5b5060405161014d38038061014d8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000819055505060f38061005a6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80632a1afcd914604157806360fe47b114605d5780636d4ce63c146088575b600080fd5b604760a4565b6040518082815260200191505060405180910390f35b608660048036036020811015607157600080fd5b810190808035906020019092919050505060aa565b005b608e60b4565b6040518082815260200191505060405180910390f35b60005481565b8060008190555050565b6000805490509056fea2646970667358221220e6966e446bd0af8e6af40eb0d8f323dd02f771ba1f11ae05c65d1624ffb3c58264736f6c63430007060033"}], "id":1}' -H 'Content-Type: application/json' http://localhost:22000

But I encountered the following error:

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"Post \"http://127.0.0.1:30305\": EOF"}}

I'm not sure what did I do wrong or miss anything. I follow this document to set up the network: https://docs.goquorum.consensys.io/tutorials/private-network/create-ibft-network (which have some minor command order issues, but can be fixed if you check the qbft documentation).

I chose Node-1 to be the server node, add the additional qlight.server prefix shown above, then use Node-0 to be the client node, add the additional qlight.client prefix shown above. After that, I encountered this problem.

I encountered some similar confusing errors when using Security Plugins, which turned out to be missing some startup prefix. But I didn't seem to find examples of setting up qlight.server and qlight.client.

Would really appreciate any help

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

No branches or pull requests

1 participant