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

add json rpc endpoints list #1738

Merged
merged 2 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ Required services and components:

There must be only one synchronizer, and it's recommended that it has exclusive access to an executor instance, although it's not necessary. This role can perfectly be run in a single instance, however, the JSON RPC and executor services can benefit from running in multiple instances, if the performance decreases due to the number of requests received

[`zkEVM RPC Custom endpoints documentation`](./docs/zkEVM-custom-endpoints.md)
- [`zkEVM RPC endpoints`](./docs/json-rpc-endpoints.md)
- [`zkEVM RPC Custom endpoints documentation`](./docs/zkEVM-custom-endpoints.md)

### Trusted sequencer

Expand Down
115 changes: 115 additions & 0 deletions docs/json-rpc-endpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# JSON RPC Endpoints

## ETH

### Supported

- eth_blockNumber
- eth_chainId
- eth_gasPrice
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getFilterChanges
- eth_getFilterLogs
- eth_getLogs
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getTransactionReceipt
- eth_newBlockFilter
- eth_newFilter
- eth_uninstallFilter
- eth_syncing
- eth_subscribe
- eth_unsubscribe

### Differences

- eth_call _* doesn't support state override at the moment and pending block_
- eth_estimateGas _* if the block number is set to pending we assume it is the latest_
- eth_getBalance _* if the block number is set to pending we assume it is the latest_
- eth_getCode _* if the block number is set to pending we assume it is the latest_
- eth_getCompilers _* response is always empty_
- eth_getStorageAt _* if the block number is set to pending we assume it is the latest_
- eth_getTransactionByBlockNumberAndIndex _* if the block number is set to pending we assume it is the latest_
- eth_newPendingTransactionFilter _* not supported yet_
- eth_sendRawTransaction _* can relay TXs to another node_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't consider this a discrepancy, as geth nodes do the same through P2P. If anything the difference could be that the tx is not added atomically to the pool (needs to come and go to the trusted sequencer). Actually maybe it would be a good idea to add txs to the pool before being relayed for this reason

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added this as a note, so everyone can be aware of it. Should we remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's ok

- eth_getUncleByBlockHashAndIndex _* response is always empty_
- eth_getUncleByBlockNumberAndIndex _* response is always empty_
- eth_getUncleCountByBlockHash _* response is always zero_
- eth_getUncleCountByBlockNumber _* response is always zero_
- eth_protocolVersion _* response is always zero_

### Not supported

- eth_accounts _* not supported_
- eth_coinbase _* not supported_
- eth_compileSolidity _* not supported_
- eth_compileLLL _* not supported_
- eth_compileSerpent _* not supported_
- eth_getWork _* not supported_
- eth_hashrate _* not supported_
- eth_mining _* not supported_
- eth_sendTransaction _* not supported_
- eth_sign _* not supported_
- eth_signTransaction _* not supported_
- eth_submitWork _* not supported_
- eth_submitHashrate _* not supported_

## NET

### Supported

- net_version

### Differences

TBD

### Not supported

- net_listening _* not supported_
- net_peerCount _* not supported_

## TXPOOL

### Supported

TBD

### Differences

- txpool_content _* response is always empty_

### Not supported

TBD

## WEB3

### Supported

- web3_clientVersion
- web3_sha3

### Differences

TBD

### Not supported

TBD

## ZKEVM

- zkevm_consolidatedBlockNumber
- zkevm_isBlockConsolidated
- zkevm_isBlockVirtualized
- zkevm_batchNumberByBlockNumber
- zkevm_batchNumber
- zkevm_virtualBatchNumber
- zkevm_verifiedBatchNumber
- zkevm_getBatchByNumber
- zkevm_getBroadcastURI