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

Upgrade frontier deps #1958

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Upgrade frontier deps #1958

merged 1 commit into from
Sep 13, 2023

Conversation

vedhavyas
Copy link
Contributor

@vedhavyas vedhavyas commented Sep 13, 2023

We had to introduce Inherent data providers since upstream introduced pending tags for Eth rpc calls. When an rpc call with pending tag is received, we construct pending block by building a new block with extrinsics from tx pool. So they use inherent data providers to provide inherent data. For now, we just provide timestamp since that is always required. I have added an TODO to handle any new inherents that needs to be present. Ex runtime upgrade can be added in later PR

Code contributor checklist:

Copy link
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

Makes sense, could you explain to me what that pending things is in general, is it something Ethereum-specific? It wasn't there before, so I'm wondering what is going on and why it is necessary.

domains/client/eth-service/src/rpc.rs Outdated Show resolved Hide resolved
We had to introduce Inherent data providers since upstream introduced `pending` tags for Eth rpc calls.
When an rpc call with pending tag is received, we construct pending block by building a new block with extrinsics from tx pool.
So they use inherent data providers to provide inherent data. For now, we just provide timestamp since that is always required.
I have added an TODO to handle any new inherents that needs to be present. Ex runtime upgrade can be added in later PR
@vedhavyas
Copy link
Contributor Author

Makes sense, could you explain to me what that pending things is in general, is it something Ethereum-specific? It wasn't there before, so I'm wondering what is going on and why it is necessary.

This is ethereum read state rpc specific. More on the that here - https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block. Pending tag essentially pick all the txns that are ready from the tx_pool and constructs a new potential block and then return any state through the rpc call. Earlier, inherent data providers were not required and has been broken upstream. With addition of inherent data providers, they are able to construct the block like an actual block builder does.

@nazar-pc nazar-pc merged commit 7a478d9 into upgrade-substrate Sep 13, 2023
7 of 8 checks passed
@nazar-pc nazar-pc deleted the frontier_upgrade branch September 13, 2023 19:22
@nazar-pc
Copy link
Member

Hm, but we are not really building blocks on EVM domain in tranditional sense. How is it used then? Just curious, I see that it is basically required for correct RPC implementation.

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.

2 participants