Skip to content

Commit 376c55b

Browse files
authored
Merge pull request #761 from HathorNetwork/feat/feature-activation/configure-nop-features
feat(feature-activation): configure NOP features on testnet
2 parents 3acc0cc + fd5941d commit 376c55b

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

hathor/conf/testnet.py

+32-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
from hathor.checkpoint import Checkpoint as cp
1616
from hathor.conf.settings import HathorSettings
17+
from hathor.feature_activation.feature import Feature
18+
from hathor.feature_activation.model.criteria import Criteria
1719
from hathor.feature_activation.settings import Settings as FeatureActivationSettings
1820

1921
SETTINGS = HathorSettings(
@@ -54,6 +56,35 @@
5456
],
5557
FEATURE_ACTIVATION=FeatureActivationSettings(
5658
enable_usage=True,
57-
default_threshold=30240
59+
default_threshold=30240,
60+
features={
61+
Feature.NOP_FEATURE_1: Criteria(
62+
bit=0,
63+
start_height=3_144_960, # N (right now the best block is 3093551 on testnet)
64+
timeout_height=3_225_600, # N + 2 * 40320 (4 weeks after the start)
65+
minimum_activation_height=3_265_920, # N + 3 * 40320 (6 weeks after the start)
66+
lock_in_on_timeout=False,
67+
version='0.56.0',
68+
signal_support_by_default=True
69+
),
70+
Feature.NOP_FEATURE_2: Criteria(
71+
bit=1,
72+
start_height=3_144_960, # N (right now the best block is 3093551 on testnet)
73+
timeout_height=3_225_600, # N + 2 * 40320 (4 weeks after the start)
74+
minimum_activation_height=0,
75+
lock_in_on_timeout=True,
76+
version='0.56.0',
77+
signal_support_by_default=False
78+
),
79+
Feature.NOP_FEATURE_3: Criteria(
80+
bit=2,
81+
start_height=3_144_960, # N (right now the best block is 3093551 on testnet)
82+
timeout_height=3_225_600, # N + 2 * 40320 (4 weeks after the start)
83+
minimum_activation_height=0,
84+
lock_in_on_timeout=False,
85+
version='0.56.0',
86+
signal_support_by_default=False
87+
)
88+
}
5889
)
5990
)

hathor/conf/testnet.yml

+28-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,31 @@ CHECKPOINTS:
3838

3939
FEATURE_ACTIVATION:
4040
enable_usage: true
41-
default_threshold: 30240 # 30240 = 75% of evaluation_interval (40320)
41+
default_threshold: 30_240 # 30240 = 75% of evaluation_interval (40320)
42+
features:
43+
NOP_FEATURE_1:
44+
bit: 0
45+
start_height: 3_144_960 # N (right now the best block is 3093551 on testnet)
46+
timeout_height: 3_225_600 # N + 2 * 40320 (4 weeks after the start)
47+
minimum_activation_height: 3_265_920 # N + 3 * 40320 (6 weeks after the start)
48+
lock_in_on_timeout: false
49+
version: 0.56.0
50+
signal_support_by_default: true
51+
52+
NOP_FEATURE_2:
53+
bit: 1
54+
start_height: 3_144_960 # N (right now the best block is 3093551 on testnet)
55+
timeout_height: 3_225_600 # N + 2 * 40320 (4 weeks after the start)
56+
minimum_activation_height: 0
57+
lock_in_on_timeout: true
58+
version: 0.56.0
59+
signal_support_by_default: false
60+
61+
NOP_FEATURE_3:
62+
bit: 2
63+
start_height: 3_144_960 # N (right now the best block is 3093551 on testnet)
64+
timeout_height: 3_225_600 # N + 2 * 40320 (4 weeks after the start)
65+
minimum_activation_height: 0
66+
lock_in_on_timeout: false
67+
version: 0.56.0
68+
signal_support_by_default: false

0 commit comments

Comments
 (0)