-
Notifications
You must be signed in to change notification settings - Fork 19
Implement EVM #214
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
Merged
Merged
Implement EVM #214
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
378d8fd
Changes based on substrate commits till the current master
dmitrylavrenov 96b6fde
Add pallet-evm and pallet-ethereum from humanode fork
dmitrylavrenov f820824
integrate EVM to current humanode runtime
dmitrylavrenov 3d91f98
Sort cargo
dmitrylavrenov b7b271b
Add ethereum rpc
dmitrylavrenov 3c1edf4
Add evm config to define max_past_logs for eth api
dmitrylavrenov 68c36de
Improve frontier precompiles and add frontier workers to service
dmitrylavrenov cc76eee
Fix cargo sort
dmitrylavrenov 99c3b21
Fix std list in humanode-runtime cargo
dmitrylavrenov d48711f
Use frontier UncheckedExtrinsic as a part of evm integration
dmitrylavrenov be2627d
Add dynamic-fee to inherent data providers
dmitrylavrenov fc5343b
Add FrontierBlockImport
dmitrylavrenov fa8239a
Avoid code duplication for getting evm_config
dmitrylavrenov 8c47e82
Add NetApi to humanode-rpc
dmitrylavrenov 36431d3
Use FullGrandpa type instead of the whole Grandpa def
dmitrylavrenov 6e837ad
Add FilterApi to humanode-rpc
dmitrylavrenov 35d76b9
Export max_stored_filters to evm_config params
dmitrylavrenov fde558d
Merge branch 'master' into pallet-evm
dmitrylavrenov c9f6d65
Correct the patch list
MOZGIII d395c3b
Correct the indent at Cargo.toml
MOZGIII c3cb5cf
Remove not used CI address
dmitrylavrenov 6835f4f
Update comment for max_past_logs at params.rs
dmitrylavrenov 3a64d12
Update comment for max_past_logs at configuration.rs
dmitrylavrenov 5b7c66e
Edit comments for FullGrandpa and FullFrontier type aliases
dmitrylavrenov 8669741
Define a FullBioauth type
dmitrylavrenov 415d32f
Remove wrapping with Arc and use it later when needed
dmitrylavrenov 1b22326
Return Gerald account as Ethereum dev account
dmitrylavrenov 19584ac
Fix comments based on review
dmitrylavrenov 2f357cb
Move subscription_task_executor to Deps
dmitrylavrenov f7da4fd
Use raw_slot_duration at frontier-mapping-sync-worker
dmitrylavrenov c889944
Make frontier-related function to separate mod
dmitrylavrenov 8b0351c
Add missing doc for frontier mod
dmitrylavrenov 69bbb7d
Use super::Block at frontier mod
dmitrylavrenov 3451193
Remove not used CheckedExtrinsic
dmitrylavrenov de2a966
Use spawn_blocking for frontier-mapping-sync-worker
dmitrylavrenov dd0de23
Implement TransactionConverterApi and RuntimeTransactionConverter
dmitrylavrenov 0926af1
Getting eth address as a helper function
dmitrylavrenov e59ddba
Use updated frontier fork
dmitrylavrenov c13dae8
Fix frontier update by changing ethereum version at evm
dmitrylavrenov 256f107
Apply frontier updates
dmitrylavrenov 275f9a5
Remove useless clippy allowers
dmitrylavrenov 505ba3b
Merge branch 'master' into pallet-evm
dmitrylavrenov 2200607
Remove default-features for frontier-api
dmitrylavrenov 2347aa9
Add eth prefix to ethereum related objects
dmitrylavrenov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,33 @@ | ||
| [workspace] | ||
| resolver = "2" | ||
| members = ["crates/*"] | ||
|
|
||
| [patch."https://github.com/paritytech/substrate"] | ||
| frame-benchmarking = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| frame-support = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| frame-system = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| pallet-balances = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| pallet-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-client-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-network = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-service = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-database = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-io = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-std = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-storage = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| substrate-prometheus-endpoint = { git = "https://github.com/humanode-network/substrate", branch = "master" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| [package] | ||
| name = "frontier-api" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
| publish = false | ||
|
|
||
| [dependencies] | ||
| codec = { package = "parity-scale-codec", version = "2", default-features = false } | ||
| pallet-ethereum = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } | ||
| sp-api = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
| sp-std = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } | ||
|
|
||
| [features] | ||
| default = ["std"] | ||
| std = ["codec/std", "sp-api/std", "sp-std/std", "pallet-ethereum/std"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //! The runtime API for the frontier related stuff. | ||
|
|
||
| #![cfg_attr(not(feature = "std"), no_std)] | ||
|
|
||
| use codec::Decode; | ||
| use sp_std::prelude::*; | ||
|
|
||
| sp_api::decl_runtime_apis! { | ||
| /// Runtime API for the transaction converter. | ||
| pub trait TransactionConverterApi<Extrinsic: Decode> { | ||
| /// Convert an ethereum transaction to an extrinsic. | ||
| fn convert_transaction(transaction: pallet_ethereum::Transaction) -> Extrinsic; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| //! The Frontier related stuff. | ||
|
|
||
| use super::Block; | ||
| use sc_cli::SubstrateCli; | ||
| use sc_service::BasePath; | ||
|
|
||
| /// Create frontier dir. | ||
| pub fn database_dir(config: &sc_service::Configuration) -> std::path::PathBuf { | ||
| let config_dir = config | ||
| .base_path | ||
| .as_ref() | ||
| .map(|base_path| base_path.config_dir(config.chain_spec.id())) | ||
| .unwrap_or_else(|| { | ||
| BasePath::from_project("", "", &crate::cli::Root::executable_name()) | ||
| .config_dir(config.chain_spec.id()) | ||
| }); | ||
| config_dir.join("frontier").join("db") | ||
| } | ||
|
|
||
| /// Construct frontier backend. | ||
| pub fn open_backend(config: &sc_service::Configuration) -> Result<fc_db::Backend<Block>, String> { | ||
| fc_db::Backend::<Block>::new(&fc_db::DatabaseSettings { | ||
| source: fc_db::DatabaseSettingsSrc::RocksDb { | ||
| path: database_dir(config), | ||
| cache_size: 0, | ||
| }, | ||
| }) | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.