1

I want to build a custom version of geth that provides a new JSON-RPC call to clients.

It looks like there are two pieces to make that happen: (1) a Go implementation in internal/ethapi/api.go, and (2) a Javascript endpoint in jsre/deps/web3.js.

Is that the right approach? What connects those pieces?

  • You need to modify both. If you want to change any json output format then client will get the data from Eth node, i.e web3js will read data from node. – Jitendra Kumar. Balla Jun 13 '18 at 4:50
  • Did you achieve this? Maybe you can let us know if you found the answer – Carlos Fuentes Jul 19 at 20:55
  • I don't now recall the motivation for the new call, but in the end, I did not implement it. – Paul Steckler Jul 21 at 0:42
0

If you wish to add a custom RPC method then yes you'd have to modify the go-ethereum library so that geth can process the new method, and in web3js so that the client knows how to construct and send the new RPC call.

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.