Skip to content

Commit 6fac324

Browse files
committed
fix(chain-params): 5s blocks to account for global round-trip time
1 parent f836802 commit 6fac324

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/agoric-cli/lib/chain-config.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import TOML from '@iarna/toml';
44
export const MINT_DENOM = 'uag';
55
export const STAKING_DENOM = 'uagstake';
66
export const GOV_DEPOSIT_COINS = [{ amount: '10000000', denom: MINT_DENOM }];
7-
export const BLOCK_CADENCE_S = 2;
7+
8+
// Can't beat the speed of light, we need 600ms round trip time for the other
9+
// side of Earth, and multiple round trips per block.
10+
//
11+
// 5 seconds is about as fast as we can go without penalising validators.
12+
export const BLOCK_CADENCE_S = 5;
813

914
export const ORIG_BLOCK_CADENCE_S = 5;
1015
export const ORIG_SIGNED_BLOCKS_WINDOW = 100;
@@ -89,9 +94,5 @@ export function finishCosmosGenesis({ genesisJson, exportedGenesisJson }) {
8994
genesis.initial_height = exported.initial_height;
9095
}
9196

92-
// Should be equal to the block cadence in milliseconds, according to @melekes
93-
// on Discord.
94-
genesis.consensus_params.block.time_iota_ms = `${BLOCK_CADENCE_S * 1000}`;
95-
9697
return djson.stringify(genesis);
9798
}

0 commit comments

Comments
 (0)