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

feat: implement eth_getBalance, eth_getCode and eth_getStorageAt #1399

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

morph-dev
Copy link
Collaborator

@morph-dev morph-dev commented Aug 25, 2024

What was wrong?

The eth_getBalance, eth_getCode and eth_getStorageAt weren't implemented.

How was it fixed?

Implemented them by fetching data from history (block header) and state network (traversing tries).

I also tested it locally by running trin myself and getting data from block 51208 (I knew that block was gossiped already).

Future improvements

All these requests support passing block as one of:

  • block number
  • block hash
  • tag (i.e. latest / finalized / safe / earliest / pending)

Currently we only support block hash, but in the future we want to support block number as well (e.g. when we have block index network).
I think in the future we can support tags as well, but I would say that's the lowest of priorities at the moment.

To-Do

@morph-dev morph-dev added the state network Issue related to portal state network label Aug 25, 2024
@morph-dev morph-dev added this to the Beacon Network milestone Aug 25, 2024
@morph-dev morph-dev self-assigned this Aug 25, 2024
@morph-dev morph-dev modified the milestones: Beacon Network, Devcon 2024 Aug 28, 2024
@morph-dev morph-dev marked this pull request as ready for review August 28, 2024 07:09
@morph-dev morph-dev requested a review from ogenev August 28, 2024 07:09
Copy link
Member

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

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

:shipit:

@morph-dev morph-dev merged commit 8c6a3c7 into ethereum:master Aug 29, 2024
8 checks passed
@morph-dev morph-dev deleted the eth_rpc branch August 29, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state network Issue related to portal state network
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants