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

Use the new Runner trait from pallet-evm #162

Merged
merged 12 commits into from
Oct 26, 2020
Merged

Use the new Runner trait from pallet-evm #162

merged 12 commits into from
Oct 26, 2020

Conversation

sorpaas
Copy link
Member

@sorpaas sorpaas commented Oct 11, 2020

This switches from the stack runner to native runner. rel paritytech/substrate#7260

Right now for big contracts, only native runner is usable, due to a state overlay memory leak (#155). In normal operations, due to lack of state overlay and reversion logic being handled outside of runtime, native runner should be generally faster.

The only drawback of native runner is that it's much harder to get exactly gas usage match with Ethereum blockchain.

@sorpaas sorpaas marked this pull request as draft October 11, 2020 21:00
@sorpaas sorpaas marked this pull request as ready for review October 13, 2020 09:41
@sorpaas
Copy link
Member Author

sorpaas commented Oct 24, 2020

The native runner still has some issues. So let's keep using the stack runner for this PR and do the final switch in a separate PR. Otherwise this PR will be really big and standing for a long time.

@sorpaas sorpaas changed the title Switch to native runner Use the new Runner trait from pallet-evm Oct 24, 2020
ExitReason::Revert(e) => {
Err(Error {
code: ErrorCode::InternalError,
message: format!("evm revert: {:?}", e),
Copy link
Contributor

Choose a reason for hiding this comment

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

returned data need to be converted into readable error message

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry let me fix this in a separate PR!

@sorpaas sorpaas merged commit 61ba776 into master Oct 26, 2020
@sorpaas sorpaas deleted the sp-native-runner branch October 26, 2020 04:54
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* Switch to native runner

* Update substrate pin

* Fix new version compile

* Add back logs and gas used implementations and bump versions

* Fix compile and feature updates

* Update CI nightly version

* Use include_str for bytecode string

* Keep using stack runner for now

* Fix test specs

* Fix extraData mismatch in ts-tests

* Skip no gas_limit test

Fix them in a follow-up PR.
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