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

Dispatch precompile v2 #1097

Closed
boundless-forest opened this issue Apr 11, 2023 · 3 comments · Fixed by #1165
Closed

Dispatch precompile v2 #1097

boundless-forest opened this issue Apr 11, 2023 · 3 comments · Fixed by #1165
Assignees

Comments

@boundless-forest
Copy link
Member

boundless-forest commented Apr 11, 2023

Currently, the darwinia runtime uses the frontier's dispatch precompile to connect the ethereum smart contract model with the substrate runtime's call execution model. But there are some issues we found in the usage process:

  1. No selector for this precompile, it's awkward in some cases that require you to enter the method selector in some ethereum tool.
  2. Should we add a filter to restrict only allowed calls can be dispatched via this way?
@hackfisher
Copy link
Contributor

Why dispatch precompile require call's dispatch info class to be DispatchClass::Normal, root will need to call some DispatchClass::Operational calls

https://github.com/paritytech/frontier/blob/2b09a676cac8cca665c882a28bd13b2acef39395/frame/evm/precompile/dispatch/src/lib.rs#L67

@hackfisher
Copy link
Contributor

Why dispatch precompile require call's dispatch info class to be DispatchClass::Normal, root will need to call some DispatchClass::Operational calls

https://github.com/paritytech/frontier/blob/2b09a676cac8cca665c882a28bd13b2acef39395/frame/evm/precompile/dispatch/src/lib.rs#L67

Fix this by introduce a new util with_class call instead to override the dispatch class.(similar to with_weight which overrides weight)

@boundless-forest
Copy link
Member Author

@boundless-forest boundless-forest linked a pull request May 30, 2023 that will close this issue
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 a pull request may close this issue.

2 participants