Skip to content

Commit c21449d

Browse files
Remove frontier stuff
1 parent 63733d2 commit c21449d

File tree

13 files changed

+60
-1644
lines changed

13 files changed

+60
-1644
lines changed

Cargo.lock

Lines changed: 25 additions & 523 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/Cargo.toml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ serde_json = { workspace = true }
3030
parity-scale-codec = { workspace = true }
3131
rand = { workspace = true }
3232

33-
clover-babe-consensus-provider = { workspace = true }
3433
frame-benchmarking = { workspace = true }
3534
frame-benchmarking-cli = { workspace = true }
3635
frame-system = { workspace = true }
@@ -92,20 +91,7 @@ sp-transaction-storage-proof = { workspace = true }
9291
frame-system-rpc-runtime-api = { workspace = true }
9392
hex-literal = { workspace = true }
9493
sc-telemetry = { workspace = true }
95-
pallet-evm = { workspace = true }
9694
pallet-im-online = { workspace = true }
97-
pallet-ethereum = { workspace = true }
98-
fc-rpc = { workspace = true, features = ["rpc-binary-search-estimate"] }
99-
fp-rpc = { workspace = true }
100-
fc-api = { workspace = true }
101-
102-
fc-consensus = { workspace = true }
103-
fp-consensus = { workspace = true }
104-
fp-evm = { workspace = true }
105-
fc-db = { workspace = true }
106-
fc-rpc-core = { workspace = true }
107-
fc-storage = { workspace = true }
108-
fc-mapping-sync = { workspace = true, features = ["sql"] }
10995
primitive-types = { workspace = true, features = ["rlp", "byteorder"] }
11096

11197
[build-dependencies]
@@ -118,4 +104,3 @@ cli = [ "sc-cli", "structopt" ]
118104
runtime-benchmarks = [ "frame-benchmarking-cli/runtime-benchmarks" ]
119105
# TODO: enable crates with `try-runtime` feature
120106
try-runtime = []
121-
txpool = ["fc-rpc/txpool"]

node/src/chain_spec.rs

Lines changed: 4 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
use std::collections::BTreeMap;
2-
use std::str::FromStr;
3-
41
use clover_primitives::currency::*;
52
pub use clover_primitives::{AccountId, Balance, Signature};
63
pub use clover_runtime::RuntimeGenesisConfig;
74
use clover_runtime::{
85
wasm_binary_unwrap, BabeConfig, BalancesConfig, Block, CouncilConfig, DemocracyConfig,
9-
EVMConfig, EthereumConfig, ImOnlineConfig, IndicesConfig, SessionConfig, SessionKeys,
10-
StakerStatus, StakingConfig, SudoConfig, SystemConfig, TechnicalCommitteeConfig,
6+
ImOnlineConfig, IndicesConfig, SessionConfig, SessionKeys, StakerStatus, StakingConfig,
7+
SudoConfig, SystemConfig, TechnicalCommitteeConfig,
118
};
12-
use fp_evm::GenesisAccount;
139
use hex_literal::hex;
1410
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
1511
use sc_chain_spec::ChainSpecExtension;
16-
use sc_service::{ChainType, Properties};
12+
use sc_service::ChainType;
1713
use sc_telemetry::TelemetryEndpoints;
1814
use serde::{Deserialize, Serialize};
1915
use serde_json::json;
2016
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
2117
use sp_consensus_babe::AuthorityId as BabeId;
2218
use sp_consensus_grandpa::AuthorityId as GrandpaId;
2319
use sp_core::crypto::UncheckedInto;
24-
use sp_core::{sr25519, Pair, Public, H160, U256};
20+
use sp_core::{sr25519, Pair, Public};
2521
use sp_runtime::traits::{IdentifyAccount, Verify};
2622
use sp_runtime::Perbill;
2723
type AccountPublic = <Signature as Verify>::Signer;
@@ -168,7 +164,6 @@ fn staging_testnet_config_genesis() -> RuntimeGenesisConfig {
168164
vec![],
169165
root_key,
170166
Some(endowed_accounts),
171-
dev_endowed_evm_accounts(),
172167
)
173168
}
174169

@@ -228,54 +223,13 @@ pub fn authority_keys_from_seed(
228223
)
229224
}
230225

231-
/// Get hard coded endowed account for EVM.
232-
fn endowed_evm_account() -> BTreeMap<H160, GenesisAccount> {
233-
let endowed_account = vec![
234-
// clover fauct
235-
H160::from_str("9157f0316f375e4ccf67f8d21ae0881d0abcbb21").unwrap(),
236-
];
237-
get_endowed_evm_accounts(endowed_account)
238-
}
239-
240-
/// Get hard coded endowed accounts for EVM.
241-
fn dev_endowed_evm_accounts() -> BTreeMap<H160, GenesisAccount> {
242-
let endowed_account = vec![
243-
H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b").unwrap(),
244-
H160::from_str("e6206C7f064c7d77C6d8e3eD8601c9AA435419cE").unwrap(),
245-
// the dev account key
246-
// seed: bottom drive obey lake curtain smoke basket hold race lonely fit walk
247-
// private key: 0x03183f27e9d78698a05c24eb6732630eb17725fcf2b53ee3a6a635d6ff139680
248-
H160::from_str("aed40f2261ba43b4dffe484265ce82d8ffe2b4db").unwrap(),
249-
];
250-
251-
get_endowed_evm_accounts(endowed_account)
252-
}
253-
254-
/// Helper function to convert endowed accounts to EVM genesis accounts.
255-
fn get_endowed_evm_accounts(endowed_accounts: Vec<H160>) -> BTreeMap<H160, GenesisAccount> {
256-
let mut evm_accounts = BTreeMap::new();
257-
for account in endowed_accounts {
258-
evm_accounts.insert(
259-
account,
260-
GenesisAccount {
261-
nonce: U256::from(0),
262-
balance: U256::from(1_000 * DOLLARS),
263-
storage: Default::default(),
264-
code: vec![],
265-
},
266-
);
267-
}
268-
evm_accounts
269-
}
270-
271226
/// Development testnet genesis
272227
fn development_config_genesis() -> RuntimeGenesisConfig {
273228
testnet_genesis(
274229
vec![authority_keys_from_seed("Alice")],
275230
vec![],
276231
get_account_id_from_seed::<sr25519::Public>("Alice"),
277232
None,
278-
dev_endowed_evm_accounts(),
279233
)
280234
}
281235

@@ -327,7 +281,6 @@ fn local_testnet_genesis() -> RuntimeGenesisConfig {
327281
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
328282
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
329283
]),
330-
endowed_evm_account(),
331284
)
332285
}
333286

@@ -414,7 +367,6 @@ fn local_rose_testnet_genesis() -> RuntimeGenesisConfig {
414367
// 5CPQQYs3wf32fr5PhmmfFQEeVzD1Zy9Hdo8LFzQYuhP8XHW6
415368
hex!["0e42eb6f65a8ef5e3f3c3cdb5b2c3be646e791abd76e2224d5847cde786b2e01"].into(),
416369
]),
417-
endowed_evm_account(),
418370
)
419371
}
420372

@@ -518,7 +470,6 @@ fn iris_testnet_genesis() -> RuntimeGenesisConfig {
518470
// 5CPQQYs3wf32fr5PhmmfFQEeVzD1Zy9Hdo8LFzQYuhP8XHW6
519471
hex!["0e42eb6f65a8ef5e3f3c3cdb5b2c3be646e791abd76e2224d5847cde786b2e01"].into(),
520472
]),
521-
endowed_evm_account(),
522473
)
523474
}
524475

@@ -567,7 +518,6 @@ pub fn testnet_genesis(
567518
initial_nominators: Vec<AccountId>,
568519
root_key: AccountId,
569520
endowed_accounts: Option<Vec<AccountId>>,
570-
endowed_eth_accounts: BTreeMap<H160, GenesisAccount>,
571521
) -> RuntimeGenesisConfig {
572522
let mut endowed_accounts: Vec<AccountId> = endowed_accounts.unwrap_or_else(|| {
573523
vec![
@@ -638,11 +588,6 @@ pub fn testnet_genesis(
638588
.map(|x| (x, ENDOWMENT))
639589
.collect(),
640590
},
641-
evm: EVMConfig {
642-
accounts: endowed_eth_accounts,
643-
..Default::default()
644-
},
645-
ethereum: EthereumConfig::default(),
646591
im_online: ImOnlineConfig { keys: vec![] },
647592
indices: IndicesConfig { indices: vec![] },
648593
session: SessionConfig {
@@ -704,7 +649,6 @@ pub(crate) mod tests {
704649
vec![],
705650
get_account_id_from_seed::<sr25519::Public>("Alice"),
706651
None,
707-
dev_endowed_evm_accounts(),
708652
)
709653
}
710654

node/src/cli.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
// You should have received a copy of the GNU General Public License
1717
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

19-
use crate::eth::EthConfiguration;
20-
2119
/// An overarching CLI command definition.
2220
#[derive(Debug, clap::Parser)]
2321
pub struct Cli {
@@ -43,10 +41,6 @@ pub struct Cli {
4341
#[allow(missing_docs)]
4442
#[clap(flatten)]
4543
pub storage_monitor: sc_storage_monitor::StorageMonitorParams,
46-
47-
/// Configuration for the Ethereum compatibility layer.
48-
#[command(flatten)]
49-
pub eth: EthConfiguration,
5044
}
5145

5246
/// Possible subcommands of the main binary.

node/src/command.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use crate::cli::{Cli, Subcommand};
2121
use crate::service::{new_partial, FullClient};
2222
use crate::{chain_spec, service};
2323
use clover_primitives::Block;
24-
// use clover_runtime::{ExistentialDeposit, RuntimeApi};
2524
use frame_benchmarking_cli::*;
2625
use sc_cli::{Result, SubstrateCli};
2726
use sc_consensus_grandpa as grandpa;
@@ -112,7 +111,7 @@ pub fn run() -> Result<()> {
112111
}
113112
BenchmarkCmd::Block(cmd) => {
114113
// ensure that we keep the task manager alive
115-
let partial = new_partial(&config, &cli.eth)?;
114+
let partial = new_partial(&config)?;
116115
cmd.run(partial.client)
117116
}
118117
#[cfg(not(feature = "runtime-benchmarks"))]
@@ -186,7 +185,7 @@ pub fn run() -> Result<()> {
186185
task_manager,
187186
import_queue,
188187
..
189-
} = new_partial(&config, &cli.eth)?;
188+
} = new_partial(&config)?;
190189
Ok((cmd.run(client, import_queue), task_manager))
191190
})
192191
}
@@ -197,7 +196,7 @@ pub fn run() -> Result<()> {
197196
client,
198197
task_manager,
199198
..
200-
} = new_partial(&config, &cli.eth)?;
199+
} = new_partial(&config)?;
201200
Ok((cmd.run(client, config.database), task_manager))
202201
})
203202
}
@@ -208,7 +207,7 @@ pub fn run() -> Result<()> {
208207
client,
209208
task_manager,
210209
..
211-
} = new_partial(&config, &cli.eth)?;
210+
} = new_partial(&config)?;
212211
Ok((cmd.run(client, config.chain_spec), task_manager))
213212
})
214213
}
@@ -220,7 +219,7 @@ pub fn run() -> Result<()> {
220219
task_manager,
221220
import_queue,
222221
..
223-
} = new_partial(&config, &cli.eth)?;
222+
} = new_partial(&config)?;
224223
Ok((cmd.run(client, import_queue), task_manager))
225224
})
226225
}
@@ -236,7 +235,7 @@ pub fn run() -> Result<()> {
236235
task_manager,
237236
backend,
238237
..
239-
} = new_partial(&config, &cli.eth)?;
238+
} = new_partial(&config)?;
240239
let aux_revert = Box::new(|client: Arc<FullClient>, backend, blocks| {
241240
sc_consensus_babe::revert(client.clone(), backend, blocks)?;
242241
grandpa::revert(client, blocks)?;

0 commit comments

Comments
 (0)