Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .yarn/cache/fsevents-patch-19706e7e35-10.zip
Binary file not shown.
4 changes: 0 additions & 4 deletions packages/dashmate/configs/defaults/getBaseConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
const { version } = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT_DIR, 'package.json'), 'utf8'));

/**
* @param {HomeDir} homeDir
* @returns {getBaseConfig}
*/
export default function getBaseConfigFactory() {
Expand Down Expand Up @@ -398,9 +397,6 @@ export default function getBaseConfigFactory() {
validator: {
pub_key_types: ['bls12381'],
},
version: {
app_version: '1',
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
Expand Down
5 changes: 5 additions & 0 deletions packages/dashmate/configs/defaults/getMainnetConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export default function getMainnetConfigFactory(homeDir, getBaseConfig) {
genesis: {
chain_id: 'evo1',
validator_quorum_type: 4,
consensus_params: {
version: {
app_version: '1',
},
},
},
},
abci: {
Expand Down
5 changes: 5 additions & 0 deletions packages/dashmate/configs/defaults/getTestnetConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) {
genesis: {
chain_id: 'dash-testnet-51',
validator_quorum_type: 6,
consensus_params: {
version: {
app_version: '1',
},
},
},
},
},
Expand Down
293 changes: 288 additions & 5 deletions packages/dashmate/configs/getConfigFileMigrationsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,151 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs)
return configFile;
},
'1.0.0-dev.2': (configFile) => {
const genesis = {
base: {
consensus_params: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
},
local: {
consensus_params: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
},
testnet: {
chain_id: 'dash-testnet-51',
validator_quorum_type: 6,
consensus_params: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
},
mainnet: {
chain_id: 'evo1',
validator_quorum_type: 4,
consensus_params: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
},
};

Object.entries(configFile.configs)
.forEach(([name, options]) => {
if (defaultConfigs.has(name)) {
options.platform.drive.tenderdash.genesis = defaultConfigs.get(name)
.get('platform.drive.tenderdash.genesis');
if (genesis[name]) {
options.platform.drive.tenderdash.genesis = genesis[name];
}

options.platform.dapi.api.docker.deploy = base.get('platform.dapi.api.docker.deploy');

let baseConfigName = name;
Expand Down Expand Up @@ -774,6 +913,133 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs)
return configFile;
},
'1.1.0-dev.1': (configFile) => {
const consensusParams = {
base: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
local: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
testnet: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
mainnet: {
block: {
max_bytes: '2097152',
max_gas: '57631392000',
time_iota_ms: '5000',
},
evidence: {
max_age: '100000',
max_age_num_blocks: '100000',
max_age_duration: '172800000000000',
},
validator: {
pub_key_types: ['bls12381'],
},
timeout: {
propose: '50000000000',
propose_delta: '5000000000',
vote: '10000000000',
vote_delta: '1000000000',
},
synchrony: {
message_delay: '70000000000',
precision: '1000000000',
},
abci: {
recheck_tx: true,
},
version: {
app_version: '1',
},
},
};

Object.entries(configFile.configs)
.forEach(([name, options]) => {
if (name === 'local') {
Expand All @@ -792,8 +1058,12 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs)

options.platform.drive.tenderdash.p2p.maxConnections = 64;
options.platform.drive.tenderdash.p2p.maxOutgoingConnections = 30;
options.platform.drive.tenderdash.genesis
.consensus_params = base.get('platform.drive.tenderdash.genesis.consensus_params');

if (consensusParams[name]) {
options.platform.drive.tenderdash.genesis
.consensus_params = consensusParams[name];
}

options.platform.drive.tenderdash.docker.image = base.get('platform.drive.tenderdash.docker.image');
});
return configFile;
Expand Down Expand Up @@ -911,6 +1181,19 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs)
});
return configFile;
},
'1.4.0-dev.4': (configFile) => {
Object.entries(configFile.configs)
.forEach(([name, options]) => {
if (name === 'base' || name === 'local') {
delete options.platform.drive.tenderdash.genesis.consensus_params.version;
} else if (options.network === NETWORK_TESTNET) {
options.platform.drive.tenderdash.genesis.consensus_params.version = {
app_version: '1',
};
}
});
return configFile;
},
};
}

Expand Down
Loading
Loading