Skip to content

Commit

Permalink
Wako Release v3.3.4 (#325)
Browse files Browse the repository at this point in the history
* Remove frontier account from testnet chainspec

* Set minimum gas price and per-block gas limit. Bump version

* Reset maximum contract size

* Increase gas limit to 150,000,000/sec, bump runtime version

* Use dynamic fee calculator

* Reset gas limit for mainnet only
  • Loading branch information
raykyri authored Sep 13, 2021
1 parent 798c5fe commit 784e3f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
12 changes: 0 additions & 12 deletions node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,6 @@ pub fn testnet_genesis(
storage: BTreeMap::new(),
code: vec![],
});
// account used in frontier
evm_accounts.insert(
H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b")
.expect("internal H160 is valid; qed"),
pallet_evm::GenesisAccount {
balance: U256::from_str("0xffffffffffffffffffffffffffffffff")
.expect("internal U256 is valid; qed"),
code: Default::default(),
nonce: Default::default(),
storage: Default::default(),
}
);

let mut endowed_accounts: Vec<AccountId> = endowed_accounts.unwrap_or_else(|| {
vec![
Expand Down
19 changes: 12 additions & 7 deletions node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to equal spec_version. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 48,
impl_version: 48,
spec_version: 50,
impl_version: 50,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
};
Expand All @@ -151,8 +151,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to equal spec_version. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 10048,
impl_version: 10048,
spec_version: 10050,
impl_version: 10050,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
};
Expand Down Expand Up @@ -1033,7 +1033,7 @@ parameter_types! {
pub const EthChainId: u64 = 2022;
}

/// Clone of Istanbul config with `create_contract_limit` raised.
/// Clone of Istanbul config: https://github.com/rust-blockchain/evm/blob/master/runtime/src/lib.rs
static EVM_CONFIG: EvmConfig = EvmConfig {
gas_ext_code: 700,
gas_ext_code_hash: 700,
Expand All @@ -1059,7 +1059,7 @@ static EVM_CONFIG: EvmConfig = EvmConfig {
stack_limit: 1024,
memory_limit: usize::max_value(),
call_stack_limit: 1024,
create_contract_limit: None,
create_contract_limit: Some(0x6000),
call_stipend: 2300,
has_delegate_call: true,
has_create2: true,
Expand All @@ -1074,6 +1074,10 @@ static EVM_CONFIG: EvmConfig = EvmConfig {

/// Current (safe) approximation of the gas/s consumption considering
/// EVM execution over compiled WASM.
#[cfg(feature = "beresheet-runtime")]
pub const GAS_PER_SECOND: u64 = 150_000_000;

#[cfg(not(feature = "beresheet-runtime"))]
pub const GAS_PER_SECOND: u64 = 8_000_000;

/// Approximate ratio of the amount of Weight per Gas.
Expand All @@ -1094,7 +1098,8 @@ impl pallet_evm::GasWeightMapping for EdgewareGasWeightMapping {
}

parameter_types! {
pub BlockGasLimit: U256 = U256::from(u32::max_value());
pub BlockGasLimit: U256
= U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WEIGHT_PER_GAS);
}

impl pallet_evm::Config for Runtime {
Expand Down

0 comments on commit 784e3f9

Please sign in to comment.