Conversation
| pub num_block_producer_seats: Option<NumSeats>, | ||
| pub num_block_producer_seats_per_shard: Option<Vec<NumSeats>>, | ||
| pub avg_hidden_validator_seats_per_shard: Option<Vec<NumSeats>>, | ||
| pub dynamic_resharding: Option<bool>, | ||
| pub protocol_upgrade_stake_threshold: Option<Rational32>, | ||
| pub epoch_length: Option<BlockHeightDelta>, | ||
| pub gas_limit: Option<Gas>, | ||
| #[serde(with = "dec_format")] | ||
| #[serde(default)] | ||
| pub min_gas_price: Option<Balance>, | ||
| #[serde(with = "dec_format")] | ||
| #[serde(default)] | ||
| pub max_gas_price: Option<Balance>, | ||
| pub block_producer_kickout_threshold: Option<u8>, | ||
| pub chunk_producer_kickout_threshold: Option<u8>, | ||
| pub online_min_threshold: Option<Rational32>, | ||
| pub online_max_threshold: Option<Rational32>, | ||
| pub gas_price_adjustment_rate: Option<Rational32>, | ||
| pub validators: Option<Vec<AccountInfo>>, | ||
| pub transaction_validity_period: Option<NumBlocks>, | ||
| pub protocol_reward_rate: Option<Rational32>, | ||
| pub max_inflation_rate: Option<Rational32>, | ||
| #[serde(with = "dec_format")] | ||
| #[serde(default)] | ||
| pub total_supply: Option<Balance>, | ||
| pub num_blocks_per_year: Option<NumBlocks>, | ||
| pub protocol_treasury_account: Option<AccountId>, | ||
| #[serde(with = "dec_format")] | ||
| #[serde(default)] | ||
| pub fishermen_threshold: Option<Balance>, | ||
| pub minimum_stake_divisor: Option<u64>, | ||
| pub shard_layout: Option<ShardLayout>, | ||
| pub num_chunk_only_producer_seats: Option<NumSeats>, | ||
| pub minimum_validators_per_shard: Option<NumSeats>, | ||
| pub max_kickout_stake_perc: Option<u8>, | ||
| pub minimum_stake_ratio: Option<Rational32>, |
There was a problem hiding this comment.
nit: order properties alphabetically by name to improve readability
Btw, some of the fields from initial GenesisConfig are ommitted, how did you choose which to include in the patch?
There was a problem hiding this comment.
Regarding the order, I would prefer that order is the same as in the original genesis config struct. I do not have any preferences in fields being in alphabetical or current order. I can change it in both structs, but my guess is that they are ok with the current order of fields. Probably @mhalambek would know more about this
There was a problem hiding this comment.
I have omitted the first 4 fields from the original genesis config struct (protocol_version, genesis_time, chain_id, and genesis_height).
I have omitted them because it seemed to me that Calimero (or similar Near forks) would not use override of those fields as discussed earlier with Hala. I have no strong preference here, I can also include all fields for the simplicity
This is tested on localnet and the patch is applied correctly for the gas_limit and num_block_producer_seats field, other fields that are not mentioned stayed the same. Also, when omitting the "--patch-config" flag or passing
falseas a value patching of the genesis is skipped.This PR is published like this just for internal review before publishing it to near nearcore github.
The chain config store will be implemented in the next PR and will be published to near nearcore separately.