Skip to content

Commit

Permalink
chore: remove all unused features (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
glevco authored Oct 29, 2024
1 parent 123166e commit 550767b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 85 deletions.
36 changes: 0 additions & 36 deletions hathor/conf/mainnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 0 additions & 42 deletions hathor/conf/mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions hathor/feature_activation/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 550767b

Please sign in to comment.