diff --git a/tools/amend-genesis/src/cli.rs b/tools/amend-genesis/src/cli.rs index efeedc114e9..3afad616594 100644 --- a/tools/amend-genesis/src/cli.rs +++ b/tools/amend-genesis/src/cli.rs @@ -57,6 +57,9 @@ pub struct AmendGenesisCommand { /// protocol_reward_rate to set in the output genesis file. Give a ratio here (e.g. "1/10") #[clap(long)] protocol_reward_rate: Option, + /// maximum inflation to se in the output genesis file. Give a ratio here (e.g. "1/10") + #[clap(long)] + max_inflation_rate: Option, /// optional file that should contain a JSON-serialized shard layout #[clap(long)] shard_layout_file: Option, @@ -68,6 +71,9 @@ pub struct AmendGenesisCommand { /// on accounts in the output state #[clap(long)] num_extra_bytes_record: Option, + /// initial gas limit to set in the output genesis file + #[clap(long)] + gas_limit: Option, /// min_gas_price to set in the output genesis file #[clap(long)] min_gas_price: Option, @@ -85,8 +91,10 @@ impl AmendGenesisCommand { epoch_length: self.epoch_length, transaction_validity_period: self.transaction_validity_period, protocol_reward_rate: self.protocol_reward_rate, + max_inflation_rate: self.max_inflation_rate, block_producer_kickout_threshold: self.block_producer_kickout_threshold, chunk_producer_kickout_threshold: self.chunk_producer_kickout_threshold, + gas_limit: self.gas_limit, min_gas_price: self.min_gas_price, max_gas_price: self.max_gas_price, }; diff --git a/tools/amend-genesis/src/lib.rs b/tools/amend-genesis/src/lib.rs index 2d8f6de9a5e..a5019b02778 100644 --- a/tools/amend-genesis/src/lib.rs +++ b/tools/amend-genesis/src/lib.rs @@ -277,8 +277,10 @@ pub struct GenesisChanges { pub epoch_length: Option, pub transaction_validity_period: Option, pub protocol_reward_rate: Option, + pub max_inflation_rate: Option, pub block_producer_kickout_threshold: Option, pub chunk_producer_kickout_threshold: Option, + pub gas_limit: Option, pub min_gas_price: Option, pub max_gas_price: Option, } @@ -398,12 +400,18 @@ pub fn amend_genesis( if let Some(r) = genesis_changes.protocol_reward_rate { genesis.config.protocol_reward_rate = r; } + if let Some(r) = genesis_changes.max_inflation_rate { + genesis.config.max_inflation_rate = r; + } if let Some(t) = genesis_changes.block_producer_kickout_threshold { genesis.config.block_producer_kickout_threshold = t; } if let Some(t) = genesis_changes.chunk_producer_kickout_threshold { genesis.config.chunk_producer_kickout_threshold = t; } + if let Some(l) = genesis_changes.gas_limit { + genesis.config.gas_limit = l; + } if let Some(p) = genesis_changes.min_gas_price { genesis.config.min_gas_price = p; }