Skip to content

Commit aa5109f

Browse files
authored
feat(feature-activation): configure new NOP features on testnet (#879)
1 parent 29a622f commit aa5109f

File tree

4 files changed

+65
-1
lines changed

4 files changed

+65
-1
lines changed

hathor/conf/testnet.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,33 @@
8484
lock_in_on_timeout=False,
8585
version='0.56.0',
8686
signal_support_by_default=False
87+
),
88+
Feature.NOP_FEATURE_4: Criteria(
89+
bit=0,
90+
start_height=3_386_880, # N (right now the best block is 3_346_600 on testnet)
91+
timeout_height=3_467_520, # N + 2 * 40320 (4 weeks after the start)
92+
minimum_activation_height=3_507_840, # N + 3 * 40320 (6 weeks after the start)
93+
lock_in_on_timeout=False,
94+
version='0.57.0',
95+
signal_support_by_default=True
96+
),
97+
Feature.NOP_FEATURE_5: Criteria(
98+
bit=1,
99+
start_height=3_386_880, # N (right now the best block is 3_346_600 on testnet)
100+
timeout_height=3_467_520, # N + 2 * 40320 (4 weeks after the start)
101+
minimum_activation_height=0,
102+
lock_in_on_timeout=True,
103+
version='0.57.0',
104+
signal_support_by_default=False
105+
),
106+
Feature.NOP_FEATURE_6: Criteria(
107+
bit=2,
108+
start_height=3_386_880, # N (right now the best block is 3_346_600 on testnet)
109+
timeout_height=3_467_520, # N + 2 * 40320 (4 weeks after the start)
110+
minimum_activation_height=0,
111+
lock_in_on_timeout=False,
112+
version='0.57.0',
113+
signal_support_by_default=False
87114
)
88115
}
89116
)

hathor/conf/testnet.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ FEATURE_ACTIVATION:
4040
enable_usage: true
4141
default_threshold: 30_240 # 30240 = 75% of evaluation_interval (40320)
4242
features:
43+
#### First Phased Testing features ####
44+
4345
NOP_FEATURE_1:
4446
bit: 0
4547
start_height: 3_144_960 # N (right now the best block is 3093551 on testnet)
@@ -66,3 +68,32 @@ FEATURE_ACTIVATION:
6668
lock_in_on_timeout: false
6769
version: 0.56.0
6870
signal_support_by_default: false
71+
72+
#### Second Phased Testing features ####
73+
74+
NOP_FEATURE_4:
75+
bit: 0
76+
start_height: 3_386_880 # N (right now the best block is 3_346_600 on testnet)
77+
timeout_height: 3_467_520 # N + 2 * 40320 (4 weeks after the start)
78+
minimum_activation_height: 3_507_840 # N + 3 * 40320 (6 weeks after the start)
79+
lock_in_on_timeout: false
80+
version: 0.57.0
81+
signal_support_by_default: true
82+
83+
NOP_FEATURE_5:
84+
bit: 1
85+
start_height: 3_386_880 # N (right now the best block is 3_346_600 on testnet)
86+
timeout_height: 3_467_520 # N + 2 * 40320 (4 weeks after the start)
87+
minimum_activation_height: 0
88+
lock_in_on_timeout: true
89+
version: 0.57.0
90+
signal_support_by_default: false
91+
92+
NOP_FEATURE_6:
93+
bit: 2
94+
start_height: 3_386_880 # N (right now the best block is 3_346_600 on testnet)
95+
timeout_height: 3_467_520 # N + 2 * 40320 (4 weeks after the start)
96+
minimum_activation_height: 0
97+
lock_in_on_timeout: false
98+
version: 0.57.0
99+
signal_support_by_default: false

hathor/feature_activation/feature.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ class Feature(Enum):
2323
should NOT be changed either, as configuration uses them for setting feature activation criteria.
2424
"""
2525

26+
# First Phased Testing features
2627
NOP_FEATURE_1 = 'NOP_FEATURE_1'
2728
NOP_FEATURE_2 = 'NOP_FEATURE_2'
2829
NOP_FEATURE_3 = 'NOP_FEATURE_3'
30+
31+
# Second Phased Testing features
32+
NOP_FEATURE_4 = 'NOP_FEATURE_4'
33+
NOP_FEATURE_5 = 'NOP_FEATURE_5'
34+
NOP_FEATURE_6 = 'NOP_FEATURE_6'

hathor/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ def _log_feature_states(self, vertex: BaseTransaction) -> None:
10751075
features_states=state_by_feature
10761076
)
10771077

1078-
features = [Feature.NOP_FEATURE_1, Feature.NOP_FEATURE_2, Feature.NOP_FEATURE_3]
1078+
features = [Feature.NOP_FEATURE_4, Feature.NOP_FEATURE_5, Feature.NOP_FEATURE_6]
10791079
for feature in features:
10801080
self._log_if_feature_is_active(vertex, feature)
10811081

0 commit comments

Comments
 (0)