Skip to content

Commit

Permalink
chore: fix consensus_params
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Jan 16, 2024
1 parent 183fe43 commit 9cd30c9
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 71 deletions.
36 changes: 19 additions & 17 deletions Networks/Mainnet/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
"genesis_time": "2022-07-26T17:27:56.407386144Z",
"chain_id": "canto_7700-1",
"initial_height": "1",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
"consensus": {
"params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
}
},
"app_hash": "",
"app_state": {
Expand Down
36 changes: 19 additions & 17 deletions Networks/Testnet/genesis-files/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
"genesis_time": "2022-07-26T04:07:10.395216142Z",
"chain_id": "canto_740-1",
"initial_height": "1",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
"consensus": {
"params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
}
},
"app_hash": "",
"app_state": {
Expand Down
36 changes: 19 additions & 17 deletions Networks/Testnet/genesis-files/plex-genesis/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
"genesis_time": "2022-07-26T04:07:10.395216142Z",
"chain_id": "canto_740-1",
"initial_height": "1",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
"consensus": {
"params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
}
},
"app_hash": "",
"app_state": {
Expand Down
36 changes: 19 additions & 17 deletions Networks/Testnet/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
"genesis_time": "2022-07-26T04:07:10.395216142Z",
"chain_id": "canto_740-1",
"initial_height": "1",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
"consensus": {
"params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age_num_blocks": "100000",
"max_age_duration": "172800000000000",
"max_bytes": "1048576"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {}
}
},
"app_hash": "",
"app_state": {
Expand Down
4 changes: 2 additions & 2 deletions init.bat
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ cat %GENESIS% | jq ".app_state[\"gov\"][\"deposit_params\"][\"min_deposit\"][0][
cat %GENESIS% | jq ".app_state[\"mint\"][\"params\"][\"mint_denom\"]=\"acanto\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%

rem increase block time (?)
cat %GENESIS% | jq ".consensus_params[\"block\"][\"time_iota_ms\"]=\"30000\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
cat %GENESIS% | jq ".consensus[\"params\"][\"block\"][\"time_iota_ms\"]=\"30000\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%

rem gas limit in genesis
cat %GENESIS% | jq ".consensus_params[\"block\"][\"max_gas\"]=\"10000000\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
cat %GENESIS% | jq ".consensus[\"params\"][\"block\"][\"max_gas\"]=\"10000000\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%

rem setup
sed -i "s/create_empty_blocks = true/create_empty_blocks = false/g" %ETHCONFIG%
Expand Down
2 changes: 1 addition & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cat $HOME/.cantod/config/genesis.json | jq '.app_state["evm"]["params"]["evm_den
cat $HOME/.cantod/config/genesis.json | jq '.app_state["inflation"]["params"]["mint_denom"]="acanto"' > $HOME/.cantod/config/tmp_genesis.json && mv $HOME/.cantod/config/tmp_genesis.json $HOME/.cantod/config/genesis.json

# Set gas limit in genesis
cat $HOME/.cantod/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $HOME/.cantod/config/tmp_genesis.json && mv $HOME/.cantod/config/tmp_genesis.json $HOME/.cantod/config/genesis.json
cat $HOME/.cantod/config/genesis.json | jq '.consensus["params"]["block"]["max_gas"]="10000000"' > $HOME/.cantod/config/tmp_genesis.json && mv $HOME/.cantod/config/tmp_genesis.json $HOME/.cantod/config/genesis.json

# Set claims start time
# node_address=$(cantod keys list | grep "address: " | cut -c12-)
Expand Down

0 comments on commit 9cd30c9

Please sign in to comment.