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 block size field to eth_getBlockByHash #960

Open
Tracked by #908
carver opened this issue Oct 5, 2023 · 2 comments · May be fixed by #1244
Open
Tracked by #908

Add block size field to eth_getBlockByHash #960

carver opened this issue Oct 5, 2023 · 2 comments · May be fixed by #1244
Labels
good-first-issue Good for newcomers

Comments

@carver
Copy link
Collaborator

carver commented Oct 5, 2023

The json-rpc doc definition is underwhelming.

So we need to either:

  1. Find an authoritative spec (is it the length of the header? or the sum of the transactions' lengths? etc)
  2. Survey the existing implementations, making sure a variety of clients agree, then push a clarification back up to the specs
  3. If existing implementations don't agree... punt until we think we have our own need, or users ask for it?

Then, we need to add the test case, preferably for the block already tested by get block, mainnet block number 1000001. Simply change the size assertion from None to the correct expected value at: [TODO link after merging to master, in /tests/rpc_server test_eth_get_block_by_hash()]

Finally, of course, it needs to be implemented, by setting size in rpc/src/eth_rpc.rs

@tesol2y090
Copy link

Hi @carver

I just did some quick research on block size in existing implementations. I think we can't implement it yet because we only have the header field, and block size is calculated from the header, transactions, and withdrawals.

@akorchyn
Copy link
Contributor

akorchyn commented Apr 7, 2024

@carver, can I work on this? We already have both withdrawals and transactions available.

@akorchyn akorchyn linked a pull request Apr 8, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants