From 8a90bb098ea6ae75456b75fbe129808d0ffd7703 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 12 Jan 2024 18:12:50 +0700 Subject: [PATCH] chore(dashmate): adjust consensus params and enable re-check --- .../configs/defaults/getBaseConfigFactory.js | 21 ++++++++++++-- .../defaults/getTestnetConfigFactory.js | 29 ------------------- .../configs/getConfigFileMigrationsFactory.js | 10 +++++++ 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index 0f0d404023f..76b639b516b 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -230,10 +230,12 @@ export default function getBaseConfigFactory(homeDir) { genesis: { consensus_params: { block: { - max_bytes: '22020096', max_gas: '-1', time_iota_ms: '5000', + max_bytes: '2097152', max_gas: '57631392000', time_iota_ms: '5000', }, evidence: { - max_age: '100000', max_age_num_blocks: '100000', max_age_duration: '172800000000000', + max_age: '100000', + max_age_num_blocks: '100000', + max_age_duration: '172800000000000', }, validator: { pub_key_types: ['bls12381'], @@ -241,6 +243,21 @@ export default function getBaseConfigFactory(homeDir) { version: { app_version: '1', }, + timeout: { + propose: '30000000000', + propose_delta: '1000000000', + vote: '2000000000', + vote_delta: '500000000', + commit: '1000000000', + bypass_commit_timeout: false, + }, + synchrony: { + message_delay: '32000000000', + precision: '500000000', + }, + abci: { + recheck_tx: true, + }, }, }, moniker: null, diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index df5e05056f0..26e75f5b743 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -82,35 +82,6 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { genesis: { genesis_time: '2023-11-02T10:18:00.000Z', chain_id: 'dash-testnet-37', - initial_core_chain_locked_height: 918609, - consensus_params: { - timeout: { - propose: '50000000000', - propose_delta: '10000000000', - vote: '500000000', - vote_delta: '100000000', - commit: '1000000000', - bypass_commit_timeout: false, - }, - block: { - max_bytes: '22020096', - max_gas: '-1', - time_iota_ms: '5000', - }, - evidence: { - max_age: '100000', - max_age_num_blocks: '100000', - max_age_duration: '172800000000000', - }, - validator: { - pub_key_types: [ - 'bls12381', - ], - }, - version: { - app_version: '1', - }, - }, validator_quorum_type: 6, }, }, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 205271a7234..9c3bf957d36 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -406,6 +406,16 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) return configFile; }, + '1.0.0-dev.2': (configFile) => { + Object.entries(configFile.configs) + .forEach(([name, options]) => { + if (defaultConfigs.has(name)) { + options.platform.drive.tenderdash.genesis = defaultConfigs.get(name).get('options.platform.drive.tenderdash.genesis'); + } + }); + + return configFile; + }, }; }