diff --git a/Makefile b/Makefile index c34c8d735..bfe793566 100644 --- a/Makefile +++ b/Makefile @@ -47,8 +47,9 @@ tests-quick: .PHONY: tests-genesis tests-genesis: - HATHOR_TEST_CONFIG_YAML='./hathor/conf/mainnet.yml' pytest tests/tx/test_genesis.py - HATHOR_TEST_CONFIG_YAML='./hathor/conf/testnet.yml' pytest tests/tx/test_genesis.py + HATHOR_TEST_CONFIG_YAML='./hathor/conf/mainnet.yml' pytest -n0 tests/tx/test_genesis.py + HATHOR_TEST_CONFIG_YAML='./hathor/conf/testnet.yml' pytest -n0 tests/tx/test_genesis.py + HATHOR_TEST_CONFIG_YAML='./hathor/conf/nano_testnet.yml' pytest -n0 tests/tx/test_genesis.py .PHONY: tests-ci tests-ci: diff --git a/hathor/builder/cli_builder.py b/hathor/builder/cli_builder.py index d7c24f3f1..2f4cd7944 100644 --- a/hathor/builder/cli_builder.py +++ b/hathor/builder/cli_builder.py @@ -115,7 +115,7 @@ def create_manager(self, reactor: Reactor) -> HathorManager: ) # XXX Remove this protection after Nano Contracts are launched. - if settings.NETWORK_NAME not in {'nano-testnet-alpha', 'unittests'}: + if settings.NETWORK_NAME != 'unittests' and not settings.NETWORK_NAME.startswith('nano-testnet-'): # Add protection to prevent enabling Nano Contracts due to misconfigurations. self.check_or_raise(not settings.ENABLE_NANO_CONTRACTS, 'configuration error: NanoContracts can only be enabled on localnets for now') diff --git a/hathor/conf/nano_testnet.py b/hathor/conf/nano_testnet.py index 4a7bc84ee..931a55895 100644 --- a/hathor/conf/nano_testnet.py +++ b/hathor/conf/nano_testnet.py @@ -17,17 +17,17 @@ SETTINGS = HathorSettings( P2PKH_VERSION_BYTE=b'\x49', MULTISIG_VERSION_BYTE=b'\x87', - NETWORK_NAME='nano-testnet-alpha', - BOOTSTRAP_DNS=['alpha.nano-testnet.hathor.network'], + NETWORK_NAME='nano-testnet-bravo', + BOOTSTRAP_DNS=['bravo.nano-testnet.hathor.network'], # Genesis stuff GENESIS_OUTPUT_SCRIPT=bytes.fromhex('76a91478e804bf8aa68332c6c1ada274ac598178b972bf88ac'), - GENESIS_BLOCK_TIMESTAMP=1677601898, - GENESIS_BLOCK_NONCE=7881594, - GENESIS_BLOCK_HASH=bytes.fromhex('000003472f6a17c2199e24c481a4326c217d07376acd9598651f8413c008554d'), - GENESIS_TX1_NONCE=110, - GENESIS_TX1_HASH=bytes.fromhex('0008f0e9dbe6e4bbc3a85fce7494fee70011b9c7e72f5276daa2a235355ac013'), - GENESIS_TX2_NONCE=180, - GENESIS_TX2_HASH=bytes.fromhex('008d81d9d58a43fd9649f33483d804a4417247b4d4e4e01d64406c4177fee0c2'), + GENESIS_BLOCK_TIMESTAMP=1750978888, + GENESIS_BLOCK_NONCE=896384, + GENESIS_BLOCK_HASH=bytes.fromhex('000003076f294c2c93d8cc48f68b6c93087361ca78c54faa91daaffde84ba916'), + GENESIS_TX1_NONCE=16, + GENESIS_TX1_HASH=bytes.fromhex('001c9a3e8810bc3389b0fd3cfb118e9190f95bd5bf313a9575a4663d0a80af2d'), + GENESIS_TX2_NONCE=154, + GENESIS_TX2_HASH=bytes.fromhex('002fecfce5e78047f9b967a27b1b2436c3fea17e24c770d59421bacdcadda0ea'), # tx weight parameters. With these settings, tx weight is always 8 MIN_TX_WEIGHT_K=0, MIN_TX_WEIGHT_COEFFICIENT=0, @@ -38,7 +38,4 @@ NC_ON_CHAIN_BLUEPRINT_ALLOWED_ADDRESSES=[ 'WWFiNeWAFSmgtjm4ht2MydwS5GY3kMJsEK', ], - SOFT_VOIDED_TX_IDS=list(map(bytes.fromhex, [ - '0000003dd5802b05f430a1f54304879173550c0944b49d74321bb9125ee727cb', - ])), ) diff --git a/hathor/conf/nano_testnet.yml b/hathor/conf/nano_testnet.yml index 2ddcaae21..f612e48b9 100644 --- a/hathor/conf/nano_testnet.yml +++ b/hathor/conf/nano_testnet.yml @@ -1,18 +1,18 @@ P2PKH_VERSION_BYTE: x49 MULTISIG_VERSION_BYTE: x87 -NETWORK_NAME: nano-testnet-alpha +NETWORK_NAME: nano-testnet-bravo BOOTSTRAP_DNS: - - alpha.nano-testnet.hathor.network + - bravo.nano-testnet.hathor.network # Genesis stuff GENESIS_OUTPUT_SCRIPT: 76a91478e804bf8aa68332c6c1ada274ac598178b972bf88ac -GENESIS_BLOCK_TIMESTAMP: 1677601898 -GENESIS_BLOCK_NONCE: 7881594 -GENESIS_BLOCK_HASH: 000003472f6a17c2199e24c481a4326c217d07376acd9598651f8413c008554d -GENESIS_TX1_NONCE: 110 -GENESIS_TX1_HASH: 0008f0e9dbe6e4bbc3a85fce7494fee70011b9c7e72f5276daa2a235355ac013 -GENESIS_TX2_NONCE: 180 -GENESIS_TX2_HASH: 008d81d9d58a43fd9649f33483d804a4417247b4d4e4e01d64406c4177fee0c2 +GENESIS_BLOCK_TIMESTAMP: 1750978888 +GENESIS_BLOCK_NONCE: 896384 +GENESIS_BLOCK_HASH: 000003076f294c2c93d8cc48f68b6c93087361ca78c54faa91daaffde84ba916 +GENESIS_TX1_NONCE: 16 +GENESIS_TX1_HASH: 001c9a3e8810bc3389b0fd3cfb118e9190f95bd5bf313a9575a4663d0a80af2d +GENESIS_TX2_NONCE: 154 +GENESIS_TX2_HASH: 002fecfce5e78047f9b967a27b1b2436c3fea17e24c770d59421bacdcadda0ea # tx weight parameters. With these settings tx weight is always 8 MIN_TX_WEIGHT_K: 0 @@ -22,6 +22,3 @@ ENABLE_NANO_CONTRACTS: true ENABLE_ON_CHAIN_BLUEPRINTS: true NC_ON_CHAIN_BLUEPRINT_ALLOWED_ADDRESSES: - WWFiNeWAFSmgtjm4ht2MydwS5GY3kMJsEK - -SOFT_VOIDED_TX_IDS: - - 0000003dd5802b05f430a1f54304879173550c0944b49d74321bb9125ee727cb diff --git a/tests/tx/test_genesis.py b/tests/tx/test_genesis.py index f83840a57..54fc29ad7 100644 --- a/tests/tx/test_genesis.py +++ b/tests/tx/test_genesis.py @@ -20,6 +20,8 @@ def get_genesis_output(): address = 'WdmDUMp8KvzhWB7KLgguA2wBiKsh4Ha8eX' elif settings.NETWORK_NAME == 'unittests': address = 'HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ' + elif settings.NETWORK_NAME.startswith('nano-testnet'): + address = 'WZhKusv57pvzotZrf4s7yt7P7PXEqyFTHk' else: raise ValueError('Network unknown.')