From 3c5890d231d1d329f93707977a618c6bdf0dcb5d Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Thu, 20 Jan 2022 10:57:06 +0200 Subject: [PATCH] chore!: reinstate 2 min blocks for dibbler (#3720) Description --- - Updates dibble consensus to 2-minute blocks - Updates dibbler genesis timestamp Motivation and Context --- Dibbler block times are too fast How Has This Been Tested? --- --- base_layer/core/src/blocks/genesis_block.rs | 2 +- .../core/src/consensus/consensus_constants.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base_layer/core/src/blocks/genesis_block.rs b/base_layer/core/src/blocks/genesis_block.rs index 91c26415cf..a00ceb899a 100644 --- a/base_layer/core/src/blocks/genesis_block.rs +++ b/base_layer/core/src/blocks/genesis_block.rs @@ -245,7 +245,7 @@ fn get_dibbler_genesis_block_raw() -> Block { ); body.sort(); // set genesis timestamp - let genesis = DateTime::parse_from_rfc2822("07 Jan 2022 00:00:00 +0200").unwrap(); + let genesis = DateTime::parse_from_rfc2822("20 Jan 2022 00:00:00 +0200").unwrap(); let timestamp = genesis.timestamp() as u64; Block { header: BlockHeader { diff --git a/base_layer/core/src/consensus/consensus_constants.rs b/base_layer/core/src/consensus/consensus_constants.rs index 5b4c19faa5..1d124c6203 100644 --- a/base_layer/core/src/consensus/consensus_constants.rs +++ b/base_layer/core/src/consensus/consensus_constants.rs @@ -248,10 +248,10 @@ impl ConsensusConstants { let mut algos = HashMap::new(); // setting sha3/monero to 40/60 split algos.insert(PowAlgorithm::Sha3, PowAlgorithmConstants { - max_target_time: 180, - min_difficulty: 60_00.into(), + max_target_time: 1800, + min_difficulty: 60_000_000.into(), max_difficulty: u64::MAX.into(), - target_time: 30, + target_time: 300, }); algos.insert(PowAlgorithm::Monero, PowAlgorithmConstants { max_target_time: 1200, @@ -320,15 +320,15 @@ impl ConsensusConstants { // sha3/monero to 40/60 split algos.insert(PowAlgorithm::Sha3, PowAlgorithmConstants { max_target_time: 1800, - min_difficulty: 60_000.into(), + min_difficulty: 60_000_000.into(), max_difficulty: u64::MAX.into(), - target_time: 30, + target_time: 300, }); algos.insert(PowAlgorithm::Monero, PowAlgorithmConstants { max_target_time: 1200, - min_difficulty: 60.into(), + min_difficulty: 60_000.into(), max_difficulty: u64::MAX.into(), - target_time: 20, + target_time: 200, }); vec![ConsensusConstants { effective_from_height: 0,