Ethereum Asked by Chirag Parmar on November 20, 2021
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.
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.
Answered by Thomas Jay Rush on November 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP