Code Monkey home page Code Monkey logo

frontier's Introduction

Frontier

GitHub Workflow Status Matrix

Frontier is Substrate's Ethereum compatibility layer. It allows you to run unmodified Ethereum dapps.

The goal of Ethereum compatibility layer is to be able to:

  • Run a normal web3 application via the compatibility layer, using local nodes, where an extra bridge binary is acceptable.
  • Be able to import state from Ethereum mainnet.

It consists of the following components:

  • pallet-evm: EVM execution engine for Substrate.
  • pallet-ethereum: Emulation of full Ethereum block processing.
  • rpc-ethereum: Compatibility layer for web3 RPC methods.

Development notes

Frontier is still work-in-progress. Below are some notes about the development.

Runtime

A few notes on the EthereumRuntimeApi's runtime implementation requirements:

  • For supporting author rpc call, the FindAuthor trait must be implemented in an arbitrary struct. This implementation must call the authorities accessor in either Aura or Babe and convert the authority id response to H160 using pallet_evm::HashTruncateConvertAccountId::convert_account_id.

The struct implementing FindAuthor is passed as the FindAuthor associated type's value for pallet_ethereum.

An Aura example for this is available in the template's runtime (EthereumFindAuthor).

  • For supporting chain_id rpc call, a u64 ChainId constant must be defined.

  • For supporting gas_price rpc call, FeeCalculator trait must be implemented in an arbitrary struct. An example FixedGasPrice is available in the template's runtime.

Use local version of Substrate

  1. Override your local cargo config to point to your local substrate (pointing to your WIP branch): place paths = ["path/to/substrate"] in ~/.cargo/config.
  2. You are good to go.

Remember to comment out the override after it is done to avoid mysterious build issues on other repo.

frontier's People

Contributors

ashwhitehat avatar bkchr avatar boundless-forest avatar crystalin avatar danforbes avatar dependabot[bot] avatar drewstone avatar emostov avatar ermalkaleci avatar gavofyork avatar gnunicorn avatar gww-parity avatar jacogr avatar jnaviask avatar joshorndorff avatar kianenigma avatar kigawas avatar nikvolf avatar notlesh avatar pscott avatar shaunxw avatar shawntabrizi avatar sorpaas avatar stiiifff avatar tgmichel avatar thiolliere avatar tomusdrw avatar tripleight avatar warfollowsme avatar xlc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.