Sub0 Online: Frontier - Ethereum Compatible Substrate Chains
Why Substrate and Polkadot Stack Exchange recommends it
Substrate Stack Exchange users link it as the standard walkthrough for building an Ethereum-compatible Substrate chain with Frontier, including precompiles and EVM setup.
Recommended by 2 people across 3 different months, 2022 to 2024.
What it is
A 1.5 hour Sub0 Online workshop by Joshy Orndorff of Moonbeam on the Frontier project, which brings Ethereum compatibility to any Substrate chain. He builds up from a minimal EVM chain to full Ethereum compatibility inside a Substrate node template, using the chain at each step.
What people said
Recommends Squirrel · 2022-02 · Substrate and Polkadot Stack Exchange · on “What is the best way to deploy Substrate and EVM based blockchain?”
You can turn your substrate into being as close as possible to ethereum by adopting ethereum conventions for example changing address types to match. But if you do that, those addresses need a translation step when talking to other parachains (not a problem if you have a solo chain). It's a question of trade offs and finding a happy medium. There was a fantastic walk-though of how to create a compatible chain at Sub0 [this video] (it's intense but an amazing demonstration of the flexibility that the generics gives you). Remember the other option which may be more appropriate to your use case is rather than doing all the work to build an EVM compatible chain, you could build on one of the existing
Recommends Squirrel · 2022-08 · Substrate and Polkadot Stack Exchange · on “Frontier template”
I suspect a great way to start is probably to watch this subzero video and then maybe try and follow along and do it yourself locally over a weekend learning as you go: [this video]
Recommends Russo · 2022-09 · Substrate and Polkadot Stack Exchange · on “Frontier: How to change EVM gas fee charged in calling precompile functions”
Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions? I saw a demonstration of that zero gas transaction from Moombeam's tutorial [this video] and its original code is here [LINK] But that video was posted about 1 year ago, so now the code has changed quite a lot... I can achieve zero fee on MetaMask as the video above did by setting FixedGasPrice and GasWeightMapping below to return zeros in pallet_evm::Config: impl pallet_evm::Config for Runtime { type FeeCalculator = FixedGasPrice; type GasWeightMapping = GasWeightMapping; ... } BUT that makes ALL transactions gasless! Not
Cites dominique · 2022-02 · Substrate and Polkadot Stack Exchange · on “What are the pros / cons of using substrate rather coding all of a Layer 1 blockchain from scratch?”
This is a very good question which I think requires a very long and extended answer. Here are some really good reasons to use Substrate over building everything from scratch : It provides all the core components of a blockchain (Database Layer, Networking Layer, Transaction Queue, Consensus Engine, etc) which have been thoroughly tested since a very big amount of blockchains have been built based on that (Polkadot, Kusama, different parachains, etc). It is modular so you can add or remove functionality as you wish by choosing only the modules you need in your blockchain. It is extensible so if the existing modules do not cover your needs then you can write your own code and extend them. You
Cites Russo · 2022-09 · Substrate and Polkadot Stack Exchange · on “How to make feeless(for parachain runtime balance) transaction in Frontier EVM for certain Ethereum smart contract functions?”
And I learned about how to wrap a pallet to make a precompile for Ethereum users to call those pallet functions ... see the video at [this video] (time = 01:10:15), and code at [LINK] in this precompile function at [LINK] : impl<Runtime> PalletTemplatePrecompile<Runtime> where Runtime: pallet_template::Config + pallet_evm::Config, Runtime::Call: Dispatchable<PostInfo = PostDispatchInfo> + GetDispatchInfo, <Runtime::Call as Dispatchable>::Origin: From<Option<Runtime::AccountId>>, Runtime::Call: From<pallet_template::Call<Runtime>>, { fn do_something( mut input: EvmDataReader, target_gas: Option<u64>, context: &Context, ) -> EvmResult<PrecompileOutput> { // This gasometer is a handy utility that wi
Cites Syed Kamran · 2024-05 · Substrate and Polkadot Stack Exchange · on “Error While Configuring EVM in Substrate Parachain: Conflict in 'syn' Crate”
I am trying to configure the EVM for my Substrate parachain and encountered an issue during the process. I am following along with this tutorial [this video] . After implementing this commit [LINK] as instructed in the tutorial and attempting to compile my node, I receive the following error: [LINK] After searching for a solution, I came across this post [LINK] on Substrate Stack Exchange. However, applying the proposed solution led to a conflict with the syn crate. Here is the error screen: [LINK] Environment Details: OS: macOS Ventura Version: 13.5.2 Rust Toolchain: rustup toolchain list stable-aarch64-apple-darwin (default) nightly-2021-10-19-aarch64-apple-darwin nightly-2022-09-10-aarch64-app