From 237e698932a982d11d0b69d6918b6ea43e678e34 Mon Sep 17 00:00:00 2001 From: drcpu Date: Thu, 30 Jan 2025 12:15:13 +0100 Subject: [PATCH] chore(tapi): set WIP0028 TAPI start date at 05 February 2025, 9am UTC --- data_structures/src/chain/tapi.rs | 10 +++++----- data_structures/src/superblock.rs | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/data_structures/src/chain/tapi.rs b/data_structures/src/chain/tapi.rs index 446cc8c7b..c1205a4aa 100644 --- a/data_structures/src/chain/tapi.rs +++ b/data_structures/src/chain/tapi.rs @@ -226,8 +226,8 @@ impl TapiEngine { votes: 0, period: TWO_WEEKS, wip: "WIP0028".to_string(), - // Start signaling on December 14 at 9am UTC - init: 2922240, + // Start signaling on 05 February 2025 at 9am UTC + init: 3_024_000, end: u32::MAX, bit: 9, }; @@ -456,8 +456,8 @@ pub fn in_emergency_period( .collect(), ) } else if Environment::Mainnet == environment - && superblock_index > 224_300 - && superblock_index < 292_224 + && superblock_index > 302_400 + && superblock_index < 330_626 { Some( FOURTH_EMERGENCY_COMMITTEE @@ -866,7 +866,7 @@ mod tests { let (epoch, old_wips) = t.initialize_wip_information(Environment::Mainnet); // The first block whose vote must be counted is the one from WIP0028 - let init_epoch_wip0028 = 2922240; + let init_epoch_wip0028 = 3024000; assert_eq!(epoch, init_epoch_wip0028); // The TapiEngine was just created, there list of old_wips must be empty assert_eq!(old_wips, HashSet::new()); diff --git a/data_structures/src/superblock.rs b/data_structures/src/superblock.rs index b7b296f3c..c859985e4 100644 --- a/data_structures/src/superblock.rs +++ b/data_structures/src/superblock.rs @@ -471,11 +471,19 @@ impl SuperBlockState { // Override superblock signing committee during the bootstrapping of wit/2 self.signing_committee = match get_environment() { Environment::Mainnet => { - // wit/2 activates at 2_922_240 + 14 x 1_920 (TAPI delay) + 7 x 1_920 (instant activation delay) = 2_962_560 - // disabling the activation committee at 299_712 implies we add an extra 8 weeks worth of time (8 x 4320) - // to inplement a decentralized superblock committee selection mechanism. Note that any delay in activating - // wit/2 will essentially be subtracted from the extra 8 weeks, - if (292_224..299_712).contains(&superblock_index) { + // wit/2 activation timeline and superblock bootstrap committee: + // TAPI initialization is scheduled at epoch 3_024_000 + // 14 x 1_920 epochs for V1_8 activation assuming TAPI passes after two weeks + // 300M needs to be staked before V2_0 can be scheduled (unknown delay, assume it is instant) + // 7 x 1_920 epochs activation delay for V2_0 + // 21 epochs for superblock confirmation of all above actions + // 3_024_000 + 14 x 1_920 + 7 x 1_920 + 21 = 3_064_341 + // + // wit/2.0 is now activated with a fixed superblock bootstrap committee + // + // 8 x 7 x 4320 epochs to implement a decentralized superblock committee selection mechanism + // any delay in activating wit/2.0 will essentially be subtracted from these 8 weeks + if (302_400..330_626).contains(&superblock_index) { WIT2_BOOTSTRAP_COMMITTEE .iter() .map(|address| address.parse().expect("Malformed signing committee"))