From 550767bcb08abc69456e8954b690a9887eadb9b8 Mon Sep 17 00:00:00 2001 From: Gabriel Levcovitz Date: Tue, 29 Oct 2024 12:39:51 -0300 Subject: [PATCH] chore: remove all unused features (#1150) --- hathor/conf/mainnet.py | 36 ------------------------ hathor/conf/mainnet.yml | 42 ---------------------------- hathor/feature_activation/feature.py | 8 +----- 3 files changed, 1 insertion(+), 85 deletions(-) diff --git a/hathor/conf/mainnet.py b/hathor/conf/mainnet.py index a0cc0372d..f580f9481 100644 --- a/hathor/conf/mainnet.py +++ b/hathor/conf/mainnet.py @@ -201,42 +201,6 @@ ])), FEATURE_ACTIVATION=FeatureActivationSettings( features={ - Feature.NOP_FEATURE_1: Criteria( - bit=0, - start_height=4_213_440, # N - timeout_height=4_253_760, # N + 2 * 20160 (2 weeks after the start) - minimum_activation_height=4_273_920, # N + 3 * 20160 (3 weeks after the start) - lock_in_on_timeout=False, - version='0.59.0', - signal_support_by_default=True, - ), - Feature.NOP_FEATURE_2: Criteria( - bit=1, - start_height=4_213_440, # N - timeout_height=4_253_760, # N + 2 * 20160 (2 weeks after the start) - minimum_activation_height=0, - lock_in_on_timeout=False, - version='0.59.0', - signal_support_by_default=False, - ), - Feature.NOP_FEATURE_3: Criteria( - bit=2, - start_height=4_273_920, # N (on 2024/02/22, the best block is 4_251_000 on mainnet) - timeout_height=4_475_520, # N + 10 * 20160 (10 weeks after the start) - minimum_activation_height=4_495_680, # N + 11 * 20160 (11 weeks after the start) - lock_in_on_timeout=False, - version='0.59.0', - signal_support_by_default=True, - ), - Feature.NOP_FEATURE_4: Criteria( - bit=3, - start_height=4_273_920, # N (on 2024/02/22, the best block is 4_251_000 on mainnet) - timeout_height=4_475_520, # N + 10 * 20160 (10 weeks after the start) - minimum_activation_height=0, - lock_in_on_timeout=False, - version='0.59.0', - signal_support_by_default=False, - ), Feature.INCREASE_MAX_MERKLE_PATH_LENGTH: Criteria( bit=0, # N = 4_475_520 diff --git a/hathor/conf/mainnet.yml b/hathor/conf/mainnet.yml index dea15cf56..d32845449 100644 --- a/hathor/conf/mainnet.yml +++ b/hathor/conf/mainnet.yml @@ -182,48 +182,6 @@ SOFT_VOIDED_TX_IDS: FEATURE_ACTIVATION: features: - #### First Phased Testing features on mainnet #### - - NOP_FEATURE_1: - bit: 0 - start_height: 4_213_440 # N - timeout_height: 4_253_760 # N + 2 * 20160 (2 weeks after the start) - minimum_activation_height: 4_273_920 # N + 3 * 20160 (3 weeks after the start) - lock_in_on_timeout: false - version: 0.59.0 - signal_support_by_default: true - - NOP_FEATURE_2: - bit: 1 - start_height: 4_213_440 # N - timeout_height: 4_253_760 # N + 2 * 20160 (2 weeks after the start) - minimum_activation_height: 0 - lock_in_on_timeout: false - version: 0.59.0 - signal_support_by_default: false - - #### Second Phased Testing features on mainnet #### - - NOP_FEATURE_3: - bit: 2 - start_height: 4_273_920 # N (on 2024/02/22, the best block is 4_251_000 on mainnet) - timeout_height: 4_475_520 # N + 10 * 20160 (10 weeks after the start) - minimum_activation_height: 4_495_680 # N + 11 * 20160 (11 weeks after the start) - lock_in_on_timeout: false - version: 0.59.0 - signal_support_by_default: true - - NOP_FEATURE_4: - bit: 3 - start_height: 4_273_920 # N (on 2024/02/22, the best block is 4_251_000 on mainnet) - timeout_height: 4_475_520 # N + 10 * 20160 (10 weeks after the start) - minimum_activation_height: 0 - lock_in_on_timeout: false - version: 0.59.0 - signal_support_by_default: false - - #### Actual features #### - INCREASE_MAX_MERKLE_PATH_LENGTH: bit: 0 # N = 4_475_520 diff --git a/hathor/feature_activation/feature.py b/hathor/feature_activation/feature.py index 05b08226e..58a51a3f5 100644 --- a/hathor/feature_activation/feature.py +++ b/hathor/feature_activation/feature.py @@ -23,15 +23,9 @@ class Feature(str, Enum): should NOT be changed either, as configuration uses them for setting feature activation criteria. """ - # Mainnet Phased Testing features + # These NOP features are used in tests NOP_FEATURE_1 = 'NOP_FEATURE_1' NOP_FEATURE_2 = 'NOP_FEATURE_2' NOP_FEATURE_3 = 'NOP_FEATURE_3' - # TODO: Those can be removed in a future PR - # Testnet Phased Testing features - NOP_FEATURE_4 = 'NOP_FEATURE_4' - NOP_FEATURE_5 = 'NOP_FEATURE_5' - NOP_FEATURE_6 = 'NOP_FEATURE_6' - INCREASE_MAX_MERKLE_PATH_LENGTH = 'INCREASE_MAX_MERKLE_PATH_LENGTH'