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

eth JSON-RPC #22

Merged
merged 10 commits into from
Nov 1, 2020
Merged

eth JSON-RPC #22

merged 10 commits into from
Nov 1, 2020

Conversation

i-norden
Copy link
Collaborator

@i-norden i-norden commented Oct 28, 2020

For #2 and #9

Adds remaining currently supportable eth_* endpoints:

eth_getBalance
eth_getStorageAt
eth_getCode
eth_getProof
eth_getHeaderByHash
eth_getTransactionCount
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByNumber
eth_getTransactionByBlockHashAndIndex
eth_getTransactionByBlockNumberAndIndex
eth_getRawTransactionByBlockHashAndIndex
eth_getRawTransactionByBlockNumberAndIndex
eth_getRawTransactionByHash
eth_getTransactionReceipt
eth_getUncleCountByBlockHash
eth_getUncleCountByBlockNumber
eth_getUncleByBlockHashAndIndex
eth_getUncleByBlockNumberAndIndex

Still a WIP

TODO:

  • Unit tests

  • Cache miss forwarding for the new endpoints

@i-norden i-norden mentioned this pull request Oct 28, 2020
3 tasks
…hich is still TODO because testing its current implementation requires complete state (e.g. like eth_call test) so- ideally- will first refactor it to use state diff 2ndary indexes rather than proceeding through regular ethdb interface)
…y indexes instead of operating through ethdb where we have to iterate down trie from root to leaf (multiple db lookups) to access account info
@i-norden
Copy link
Collaborator Author

Unit tests finished for everything except eth_getProof

Have also optimized endpoints that read from leafs e.g. eth_getBalance, eth_getStorageAt, eth_getTransactionCount.

@i-norden
Copy link
Collaborator Author

I think optimizing and testing eth_GetProof deserves its own focus, and this diff is already rather large, so I will merge this shortly.

… a range; update backend to use these to retrieve state and storage leafs in single (albeit complex) SELECT query
@i-norden i-norden merged commit ca07107 into master Nov 1, 2020
@i-norden i-norden deleted the eth_json_rpc branch November 1, 2020 19:29
@i-norden i-norden changed the title [WIP] eth JSON-RPC eth JSON-RPC Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant