Skip to content

Commit

Permalink
subnet-evm: update default genesis
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Aug 18, 2022
1 parent b791b82 commit 8a0ccf1
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions crates/subnet-evm/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ impl Genesis {
timestamp: BigInt::default(),
extra_data: Some(String::from("0x00")),

gas_limit: big_num_manager::from_hex_to_big_int("0x1312D00")
.expect("failed to parse big_int"),
// 8-million, same as C-chain
// ref. https://www.rapidtables.com/convert/number/decimal-to-hex.html
// ref. https://www.rapidtables.com/convert/number/hex-to-decimal.html
gas_limit: big_num_manager::from_hex_to_big_int("0x7A1200")
.expect("failed from_hex_to_big_int"),

difficulty: BigInt::default(),
mix_hash: Some(String::from(
Expand Down Expand Up @@ -261,21 +264,24 @@ impl Default for FeeConfig {
}
}

pub const DEFAULT_GAS_LIMIT: u64 = 20000000;
/// 8-million, same as C-chain
/// ref. https://www.rapidtables.com/convert/number/decimal-to-hex.html
/// ref. https://www.rapidtables.com/convert/number/hex-to-decimal.html
pub const DEFAULT_GAS_LIMIT: u64 = 8000000;

impl FeeConfig {
pub fn default() -> Self {
Self {
gas_limit: Some(DEFAULT_GAS_LIMIT),
target_block_rate: Some(2),

min_base_fee: Some(1000000000),
target_gas: Some(100000000),
base_fee_change_denominator: Some(48),
min_base_fee: Some(25000000000),
target_gas: Some(15000000),
base_fee_change_denominator: Some(36),

min_block_gas_cost: Some(0),
max_block_gas_cost: Some(10000000),
block_gas_cost_step: Some(500000),
max_block_gas_cost: Some(1000000),
block_gas_cost_step: Some(200000),
}
}
}
Expand Down

0 comments on commit 8a0ccf1

Please sign in to comment.