6

I want to build a middleware that adds additional data to JSON RPC responses. This middleware would sit on the same hardware or machine as the GETH node.

The traditional approach would be to simply accept the JSON-RPC requests from a client, forward it to the GETH node and add some additional data in the response on its way back to the client.

I wanted to know if there is a way through which I can completely avoid the protocol overhead of JSON-RPC and directly interface with the GETH node? Because this way I could theoretically, handle more requests. Also I wouldn't have to redundantly parse and stringify the response.

By a direct interface, I mean, interface through some API and not actually manually changing GETH code.

0

You should look into a project called TurboGeth. It's derived from the Geth code base but has made various improvements (significant lowering of on-disc database size for one -- significant initial sync speed for another).

They are working on a solution very similar to what you describe for the same reasons.

One of their hoped-for future features is the ability to customize the JSON-RPC portion of the codebase. They've already separated the JSON-RPC from the core code, so non-team developers can customize and extend it.

2
  • Thank you for the answer. Apologies for the incredibly late review. Nov 9 at 13:18
  • Better late than never. Thanks. :-) Nov 9 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.