ethereum / execution-apis

Collection of APIs provided by Ethereum execution layer clients
Creative Commons Zero v1.0 Universal
964 stars 380 forks source link

Execution API vs Ethereum JSON-RCP API #525

Open rubenrdpuma opened 8 months ago

rubenrdpuma commented 8 months ago

It's been some time since I don't use JSON-RPC in Ethereum and just found this Execution API (and the Beacon API).

I tried the new methods present in this API (i.e., debug* and engine ) against a geth and Infura and they are not recognized. However, they recognize the classical ones I was used to (i.e., web3_ , net_* , ...). Also, I found out these methods are still referenced at Ethereum

So, can anyone explain me what is the purpose of this Execution API? Will it replace the existing API in the future?

Thanks

shanejonas commented 7 months ago

you need to enable those apis since debug and engine are not exposed via JSON-RPC by default:

geth --http --http.api eth,net,web3,debug,engine

source: https://geth.ethereum.org/docs/interacting-with-geth/rpc

rubenrdpuma commented 7 months ago

Thank you for the reply but I am still a bit confused by the fact that at the end of the source you point out it claims: "The Engine API is enabled by default - the user is not required to pass any instruction to Geth to enable these methods." So, maybe the endpoints I tried could have disabled engine and not enabled debug?

shanejonas commented 7 months ago

engine is only for talking from a beacon node like teku and an execution node like geth, most JSON-RPC apis will not enable this publicly.