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

EVM precompile #3257

Merged
merged 107 commits into from
Dec 3, 2020
Merged

EVM precompile #3257

merged 107 commits into from
Dec 3, 2020

Conversation

ilblackdragon
Copy link
Member

@ilblackdragon ilblackdragon commented Aug 28, 2020

Implements near/NEPs#106

  • PR for Ethereum chain_id
  • Return deterministic errors
  • evm accounts are EVM.
  • Create sub-account from evm are removed and we don't plan to support it originally.
  • Integrate gas usage Evm gas estimation #3299
  • Meta transaction calls are currently disabled
  • Precompile in EVM to call outside to NEAR Moved to separate issue
  • Protocol version upgrade to 42 from which evm accounts activate.
  • Add a check that the evm account doesn't have access keys.

Reviews

  • @bowenwang1996 please review changes around genesis/protocol, so we don't leak this feature accidentally.
  • @nearmax if you want to take a second look at runtime changes.
  • @frol do we need to do something from the RPC/indexer perspective?
  • @ilblackdragon In case you want to take a look as well.

Test plan

  • Set of Solidity contracts that can be run inside EVM (see runtime/near-evm-runner/tests/contracts)
  • Interact with CryptoZombies contract via runtime & RPC test
  • Nightly test that will leverage full e2e tooling to deploy & test a full fledged contract(s) Moved to separate issue
  • http://nayduck.eastus.cloudapp.azure.com:3000/#/run/764

@gitpod-io
Copy link

gitpod-io bot commented Aug 28, 2020

Copy link
Collaborator

@evgenykuzyakov evgenykuzyakov left a comment

Choose a reason for hiding this comment

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

We should wrap EVM into a thread. So if it panics, we don't crash the node and bring down the chain.

Copy link
Contributor

@MaksymZavershynskyi MaksymZavershynskyi left a comment

Choose a reason for hiding this comment

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

On a surface, looks good. I am not able to do a detailed review right now so I suggest instead of blocking this PR, we merge it to unblock Phase 1 and then we do any additional audit reviews post-factum by me or any other people.

@evgenykuzyakov
Copy link
Collaborator

we merge it to unblock Phase 1 and then we do any additional audit reviews post-factum by me or any other people.

Yep, that's the plan. It's currently very well guarded with the compilation feature so it shouldn't affect non-nightly protocol

Copy link
Contributor

@olonho olonho left a comment

Choose a reason for hiding this comment

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

Overall LGTM, few nits.

core/chain-configs/src/genesis_config.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@willemneal willemneal left a comment

Choose a reason for hiding this comment

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

LGTM just small edit

runtime/runtime-params-estimator/src/cases.rs Outdated Show resolved Hide resolved
@evgenykuzyakov evgenykuzyakov merged commit a8172d1 into master Dec 3, 2020
@evgenykuzyakov evgenykuzyakov deleted the evm-precompile branch December 3, 2020 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-EVM Area: Native EVM implementation and support
Projects
None yet
Development

Successfully merging this pull request may close these issues.