Skip to content

Commit

Permalink
#235 Updated benchmarks for the next release (#238)
Browse files Browse the repository at this point in the history
Added benchmarking for EVM template.
Updated benchmarking for Generic Templates.
Fixed config for EVM template.
Added benchmarking utils.
  • Loading branch information
KitHat authored Jun 28, 2024
1 parent 3c9696b commit be0abb6
Show file tree
Hide file tree
Showing 57 changed files with 5,982 additions and 493 deletions.
64 changes: 32 additions & 32 deletions evm-template/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions evm-template/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ use fp_evm::GenesisAccount;
use hex_literal::hex;
use log::error;
use parachain_template_runtime::{
constants::currency::EXISTENTIAL_DEPOSIT, AccountId, AuraId,
OpenZeppelinPrecompiles as Precompiles, Runtime, Signature,
AccountId, AuraId, OpenZeppelinPrecompiles as Precompiles, Runtime, Signature,
};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
Expand Down Expand Up @@ -180,7 +179,8 @@ pub fn local_testnet_config(contracts_path: ContractsPath) -> ChainSpec {

fn testnet_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
#[cfg(not(feature = "runtime-benchmarks"))] endowed_accounts: Vec<AccountId>,
#[cfg(feature = "runtime-benchmarks")] mut endowed_accounts: Vec<AccountId>,
root: AccountId,
id: ParaId,
contracts_path: ContractsPath,
Expand Down Expand Up @@ -218,6 +218,9 @@ fn testnet_genesis(
})
.chain(precompiles)
.collect();
let candidacy_bond: u64 = 1_000_000_000 * 16;
#[cfg(feature = "runtime-benchmarks")]
endowed_accounts.push(AccountId::from(hex!("1000000000000000000000000000000000000001")));
serde_json::json!({
"balances": {
"balances": endowed_accounts.iter().cloned().map(|k| (k, 1u64 << 60)).collect::<Vec<_>>(),
Expand All @@ -227,7 +230,7 @@ fn testnet_genesis(
},
"collatorSelection": {
"invulnerables": invulnerables.iter().cloned().map(|(acc, _)| acc).collect::<Vec<_>>(),
"candidacyBond": EXISTENTIAL_DEPOSIT * 16,
"candidacyBond": candidacy_bond,
},
"session": {
"keys": invulnerables
Expand Down
1 change: 1 addition & 0 deletions evm-template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ runtime-benchmarks = [
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
Expand Down
Loading

0 comments on commit be0abb6

Please sign in to comment.