-
Notifications
You must be signed in to change notification settings - Fork 825
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
[pallet-revive] Add evm codegen #5926
base: master
Are you sure you want to change the base?
Conversation
This PR introduces the necessary changes to pallet-revive for integrating with our Ethereum JSON-RPC. The RPC proxy itself will be added in a follow up. ## Changes - A new pallet::call `Call::eth_transact`. This is used as a wrapper to accept unsigned Ethereum transaction, valid call will be routed to `Call::call` or `Call::instantiate_with_code` - A custom UncheckedExtrinsic struct, that wraps the generic one usually and add the ability to check eth_transact calls sent from an Ethereum JSON-RPC proxy. - Generated types and traits to support implementing a JSON-RPC Ethereum proxy. ## Flow Overview: - A user submits a transaction via MetaMask or another Ethereum-compatible wallet. - The proxy dry run the transaction and add metadata to the call (gas limit in Weight, storage deposit limit, and length of bytecode and constructor input for contract instantiation) - The raw transaction, along with the additional metadata, is submitted to the node as an unsigned extrinsic. - On the runtime, our custom UncheckedExtrinsic define a custom Checkable implementation that converts the unsigned extrinsics into checked one - It recovers the signer - validates the payload, and injects signed extensions, allowing the system to increment the nonce and charge the appropriate fees. - re-route the call to pallet-revive::Call::call or pallet-revive::Call::instantiateWithCode ## Dependencies - paritytech/polkavm#188 ## Follow up PRs - #5926 - #6147 (previously #5953) - #5502 --------- Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Cyrill Leutwiler <[email protected]>
/cmd prdoc --audience runtime_dev --bump minor |
Command "prdoc --audience runtime_dev --bump minor" has failed ❌! See logs here |
c479123
to
06e289c
Compare
3a10a37
to
ae59158
Compare
@@ -0,0 +1,5 @@ | |||
Generates the Ethereum JSON-RPC API from the official specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say here when and how to upgrade?
All GitHub workflows were cancelled due to failure one of the required jobs. |
Adds the code generator used to generate the types and methods of the JSON-RPC proxy