diff --git a/hathor/cli/run_node.py b/hathor/cli/run_node.py index 7f2618624..549d4b5be 100644 --- a/hathor/cli/run_node.py +++ b/hathor/cli/run_node.py @@ -79,8 +79,10 @@ def create_parser(cls) -> ArgumentParser: netargs = parser.add_mutually_exclusive_group() netargs.add_argument('--nano-testnet', action='store_true', help='Connect to Hathor nano-testnet') - netargs.add_argument('--testnet', action='store_true', help='Connect to Hathor testnet') + netargs.add_argument('--testnet', action='store_true', help='Connect to Hathor the default testnet' + ' (currently testnet-hotel)') netargs.add_argument('--testnet-hotel', action='store_true', help='Connect to Hathor testnet-hotel') + netargs.add_argument('--testnet-golf', action='store_true', help='Connect to Hathor testnet-golf') netargs.add_argument('--localnet', action='store_true', help='Create a localnet with default configuration.') parser.add_argument('--test-mode-tx-weight', action='store_true', @@ -498,8 +500,8 @@ def __init__(self, *, argv=None): from hathor.conf import ( LOCALNET_SETTINGS_FILEPATH, NANO_TESTNET_SETTINGS_FILEPATH, + TESTNET_GOLF_SETTINGS_FILEPATH, TESTNET_HOTEL_SETTINGS_FILEPATH, - TESTNET_SETTINGS_FILEPATH, ) from hathor.conf.get_settings import get_global_settings self.log = logger.new() @@ -516,9 +518,11 @@ def __init__(self, *, argv=None): if self._args.config_yaml: os.environ['HATHOR_CONFIG_YAML'] = self._args.config_yaml elif self._args.testnet: - os.environ['HATHOR_CONFIG_YAML'] = TESTNET_SETTINGS_FILEPATH + os.environ['HATHOR_CONFIG_YAML'] = TESTNET_HOTEL_SETTINGS_FILEPATH elif self._args.testnet_hotel: os.environ['HATHOR_CONFIG_YAML'] = TESTNET_HOTEL_SETTINGS_FILEPATH + elif self._args.testnet_golf: + os.environ['HATHOR_CONFIG_YAML'] = TESTNET_GOLF_SETTINGS_FILEPATH elif self._args.nano_testnet: os.environ['HATHOR_CONFIG_YAML'] = NANO_TESTNET_SETTINGS_FILEPATH elif self._args.localnet: diff --git a/hathor/cli/run_node_args.py b/hathor/cli/run_node_args.py index 96470f518..08f47aad2 100644 --- a/hathor/cli/run_node_args.py +++ b/hathor/cli/run_node_args.py @@ -31,6 +31,7 @@ class RunNodeArgs(BaseModel, extra=Extra.allow): unsafe_mode: Optional[str] testnet: bool testnet_hotel: bool + testnet_golf: bool test_mode_tx_weight: bool dns: Optional[str] peer: Optional[str] diff --git a/hathor/conf/__init__.py b/hathor/conf/__init__.py index 07dab18ab..21bb032b9 100644 --- a/hathor/conf/__init__.py +++ b/hathor/conf/__init__.py @@ -19,15 +19,15 @@ parent_dir = Path(__file__).parent MAINNET_SETTINGS_FILEPATH = str(parent_dir / 'mainnet.yml') -TESTNET_SETTINGS_FILEPATH = str(parent_dir / 'testnet.yml') -TESTNET_HOTEL_SETTINGS_FILEPATH = str(parent_dir / 'testnet_hotel.yml') +TESTNET_GOLF_SETTINGS_FILEPATH = str(parent_dir / 'testnet_golf.yml') +TESTNET_HOTEL_SETTINGS_FILEPATH = str(parent_dir / 'testnet.yml') NANO_TESTNET_SETTINGS_FILEPATH = str(parent_dir / 'nano_testnet.yml') LOCALNET_SETTINGS_FILEPATH = str(parent_dir / 'localnet.yml') UNITTESTS_SETTINGS_FILEPATH = str(parent_dir / 'unittests.yml') __all__ = [ 'MAINNET_SETTINGS_FILEPATH', - 'TESTNET_SETTINGS_FILEPATH', + 'TESTNET_GOLF_SETTINGS_FILEPATH', 'TESTNET_HOTEL_SETTINGS_FILEPATH', 'NANO_TESTNET_SETTINGS_FILEPATH', 'LOCALNET_SETTINGS_FILEPATH', diff --git a/hathor/conf/testnet.yml b/hathor/conf/testnet.yml index 9f9104475..160db7d9d 100644 --- a/hathor/conf/testnet.yml +++ b/hathor/conf/testnet.yml @@ -1,8 +1,8 @@ P2PKH_VERSION_BYTE: x49 MULTISIG_VERSION_BYTE: x87 -NETWORK_NAME: testnet-golf +NETWORK_NAME: testnet-hotel BOOTSTRAP_DNS: - - golf.testnet.hathor.network + - hotel.testnet.hathor.network # Genesis stuff GENESIS_OUTPUT_SCRIPT: 76a914a584cf48b161e4a49223ed220df30037ab740e0088ac @@ -91,14 +91,31 @@ FEATURE_ACTIVATION: version: 0.63.0 signal_support_by_default: true - COUNT_CHECKDATASIG_OP: + NANO_CONTRACTS: bit: 0 - # N = 5_120_640 - # Expected to be reached around Wednesday, 2025-08-13 03:09:44 GMT - # Right now the best block is 5_102_018 at Wednesday, 2025-08-06 15:58:44 GMT - start_height: 5_120_640 - timeout_height: 5_241_600 # N + 6 * 20160 (6 weeks after the start) + # N = 5_040_000 + # Expected to be reached around Friday, 2025-07-18. + # Right now the best block is 5_033_266 on testnet-hotel (2025-07-16). + start_height: 5_040_000 # N + timeout_height: 5_080_320 # N + 2 * 20160 (2 weeks after the start) + minimum_activation_height: 0 + lock_in_on_timeout: false + version: 0.64.0 + signal_support_by_default: true + + COUNT_CHECKDATASIG_OP: + bit: 1 + # N = 5_100_480 + # Expected to be reached around Saturday, 2025-08-09 09:31:28 GMT + # Right now the best block is 5_092_661 at Wednesday, 2025-08-06 16:21:58 GMT + start_height: 5_100_480 + timeout_height: 5_221_440 # N + 6 * 20160 (6 weeks after the start) minimum_activation_height: 0 lock_in_on_timeout: false version: 0.64.0 signal_support_by_default: true + +ENABLE_NANO_CONTRACTS: feature_activation +NC_ON_CHAIN_BLUEPRINT_ALLOWED_ADDRESSES: + - WWFiNeWAFSmgtjm4ht2MydwS5GY3kMJsEK + - WQFDxic8xWWnMLL4aE5abY2XRKPNvGhtjY diff --git a/hathor/conf/testnet.py b/hathor/conf/testnet_golf.py similarity index 100% rename from hathor/conf/testnet.py rename to hathor/conf/testnet_golf.py diff --git a/hathor/conf/testnet_hotel.yml b/hathor/conf/testnet_golf.yml similarity index 85% rename from hathor/conf/testnet_hotel.yml rename to hathor/conf/testnet_golf.yml index 4a4269e90..c0b57fd1f 100644 --- a/hathor/conf/testnet_hotel.yml +++ b/hathor/conf/testnet_golf.yml @@ -1,8 +1,8 @@ P2PKH_VERSION_BYTE: x49 MULTISIG_VERSION_BYTE: x87 -NETWORK_NAME: testnet-hotel +NETWORK_NAME: testnet-golf BOOTSTRAP_DNS: - - hotel.testnet.hathor.network + - golf.testnet.hathor.network # Genesis stuff GENESIS_OUTPUT_SCRIPT: 76a914a584cf48b161e4a49223ed220df30037ab740e0088ac @@ -94,31 +94,14 @@ FEATURE_ACTIVATION: version: 0.63.0 signal_support_by_default: true - NANO_CONTRACTS: - bit: 0 - # N = 5_040_000 - # Expected to be reached around Friday, 2025-07-18. - # Right now the best block is 5_033_266 on testnet-hotel (2025-07-16). - start_height: 5_040_000 # N - timeout_height: 5_080_320 # N + 2 * 20160 (2 weeks after the start) - minimum_activation_height: 0 - lock_in_on_timeout: false - version: 0.64.0 - signal_support_by_default: true - COUNT_CHECKDATASIG_OP: - bit: 1 - # N = 5_100_480 - # Expected to be reached around Saturday, 2025-08-09 09:31:28 GMT - # Right now the best block is 5_092_661 at Wednesday, 2025-08-06 16:21:58 GMT - start_height: 5_100_480 - timeout_height: 5_221_440 # N + 6 * 20160 (6 weeks after the start) + bit: 0 + # N = 5_120_640 + # Expected to be reached around Wednesday, 2025-08-13 03:09:44 GMT + # Right now the best block is 5_102_018 at Wednesday, 2025-08-06 15:58:44 GMT + start_height: 5_120_640 + timeout_height: 5_241_600 # N + 6 * 20160 (6 weeks after the start) minimum_activation_height: 0 lock_in_on_timeout: false version: 0.64.0 signal_support_by_default: true - -ENABLE_NANO_CONTRACTS: feature_activation -NC_ON_CHAIN_BLUEPRINT_ALLOWED_ADDRESSES: - - WWFiNeWAFSmgtjm4ht2MydwS5GY3kMJsEK - - WQFDxic8xWWnMLL4aE5abY2XRKPNvGhtjY diff --git a/tests/others/test_hathor_settings.py b/tests/others/test_hathor_settings.py index a69107b69..e41578579 100644 --- a/tests/others/test_hathor_settings.py +++ b/tests/others/test_hathor_settings.py @@ -20,10 +20,10 @@ from pydantic import ValidationError from hathor.checkpoint import Checkpoint -from hathor.conf import MAINNET_SETTINGS_FILEPATH, TESTNET_SETTINGS_FILEPATH +from hathor.conf import MAINNET_SETTINGS_FILEPATH, TESTNET_GOLF_SETTINGS_FILEPATH from hathor.conf.mainnet import SETTINGS as MAINNET_SETTINGS from hathor.conf.settings import DECIMAL_PLACES, GENESIS_TOKEN_UNITS, GENESIS_TOKENS, HathorSettings -from hathor.conf.testnet import SETTINGS as TESTNET_SETTINGS +from hathor.conf.testnet_golf import SETTINGS as TESTNET_GOLF_SETTINGS @pytest.mark.parametrize('filepath', ['fixtures/valid_hathor_settings_fixture.yml']) @@ -238,5 +238,5 @@ def test_mainnet_settings_migration(): assert MAINNET_SETTINGS == HathorSettings.from_yaml(filepath=MAINNET_SETTINGS_FILEPATH) -def test_testnet_settings_migration(): - assert TESTNET_SETTINGS == HathorSettings.from_yaml(filepath=TESTNET_SETTINGS_FILEPATH) +def test_testnet_golf_settings_migration(): + assert TESTNET_GOLF_SETTINGS == HathorSettings.from_yaml(filepath=TESTNET_GOLF_SETTINGS_FILEPATH)