testnet update: rename testnet3 to testnet
Update all references to 'testnet3' to 'testnet' for consistency. This includes: - Changing magic bytes in network messages - Updating directory paths and configuration files - Modifying documentation and test framework references - Adjusting chain parameters and validation logic
This commit is contained in:
@@ -26,7 +26,7 @@ input=/home/example/.palladium/blocks
|
||||
# testnet
|
||||
#netmagic=0b110907
|
||||
#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
|
||||
#input=/home/example/.palladium/testnet3/blocks
|
||||
#input=/home/example/.palladium/testnet/blocks
|
||||
|
||||
# regtest
|
||||
#netmagic=fabfb5da
|
||||
|
||||
@@ -33,7 +33,7 @@ Windows | `%APPDATA%\Palladium\` <sup>[\[1\]](#note1)</sup>
|
||||
Chain option | Data directory path
|
||||
--------------------|--------------------
|
||||
no option (mainnet) | *path_to_datadir*`/`
|
||||
`-testnet` | *path_to_datadir*`/testnet3/`
|
||||
`-testnet` | *path_to_datadir*`/testnet/`
|
||||
`-regtest` | *path_to_datadir*`/regtest/`
|
||||
|
||||
## Data directory layout
|
||||
|
||||
@@ -377,13 +377,13 @@ Both variables are used as a guideline for how much space the user needs on thei
|
||||
Note that all values should be taken from a **fully synced** node and have an overhead of 5-10% added on top of its base value.
|
||||
|
||||
To calculate `m_assumed_blockchain_size`:
|
||||
- For `mainnet` -> Take the size of the data directory, excluding `/regtest` and `/testnet3` directories.
|
||||
- For `testnet` -> Take the size of the `/testnet3` directory.
|
||||
- For `mainnet` -> Take the size of the data directory, excluding `/regtest` and `/testnet` directories.
|
||||
- For `testnet` -> Take the size of the `/testnet` directory.
|
||||
|
||||
|
||||
To calculate `m_assumed_chain_state_size`:
|
||||
- For `mainnet` -> Take the size of the `/chainstate` directory.
|
||||
- For `testnet` -> Take the size of the `/testnet3/chainstate` directory.
|
||||
- For `testnet` -> Take the size of the `/testnet/chainstate` directory.
|
||||
|
||||
Notes:
|
||||
- When taking the size for `m_assumed_blockchain_size`, there's no need to exclude the `/chainstate` directory since it's a guideline value and an overhead will be added anyway.
|
||||
|
||||
@@ -220,10 +220,10 @@ public:
|
||||
|
||||
|
||||
|
||||
pchMessageStart[0] = 0x0b;
|
||||
pchMessageStart[1] = 0x11;
|
||||
pchMessageStart[2] = 0x09;
|
||||
pchMessageStart[3] = 0x07;
|
||||
pchMessageStart[0] = 0x0c;
|
||||
pchMessageStart[1] = 0x12;
|
||||
pchMessageStart[2] = 0x0a;
|
||||
pchMessageStart[3] = 0x08;
|
||||
nDefaultPort = 12333;
|
||||
nPruneAfterHeight = 1000;
|
||||
m_assumed_blockchain_size = 1;
|
||||
|
||||
@@ -38,7 +38,7 @@ std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const std::string& chain
|
||||
if (chain == CBaseChainParams::MAIN)
|
||||
return MakeUnique<CBaseChainParams>("", 2332);
|
||||
else if (chain == CBaseChainParams::TESTNET)
|
||||
return MakeUnique<CBaseChainParams>("testnet3", 12332);
|
||||
return MakeUnique<CBaseChainParams>("testnet", 12332);
|
||||
else if (chain == CBaseChainParams::REGTEST)
|
||||
return MakeUnique<CBaseChainParams>("regtest", 12443);
|
||||
else
|
||||
|
||||
@@ -2039,7 +2039,7 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
||||
// edge case when manipulating the UTXO and it would be simpler not to have
|
||||
// another edge case to deal with.
|
||||
|
||||
// testnet3 has no blocks before the BIP34 height with indicated heights
|
||||
// testnet has no blocks before the BIP34 height with indicated heights
|
||||
// post BIP34 before approximately height 486,000,000 and presumably will
|
||||
// be reset before it reaches block 1,983,702 and starts doing unnecessary
|
||||
// BIP30 checking again.
|
||||
|
||||
@@ -20,13 +20,13 @@ import os
|
||||
class RejectLowDifficultyHeadersTest(PalladiumTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.chain = 'testnet3' # Use testnet chain because it has an early checkpoint
|
||||
self.chain = 'testnet'
|
||||
self.num_nodes = 2
|
||||
|
||||
def add_options(self, parser):
|
||||
parser.add_argument(
|
||||
'--datafile',
|
||||
default='data/blockheader_testnet3.hex',
|
||||
default='data/blockheader_testnet.hex',
|
||||
help='Test data file (default: %(default)s)',
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@ class RejectLowDifficultyHeadersTest(PalladiumTestFramework):
|
||||
with open(self.headers_file_path, encoding='utf-8') as headers_data:
|
||||
h_lines = [l.strip() for l in headers_data.readlines()]
|
||||
|
||||
# The headers data is taken from testnet3 for early blocks from genesis until the first checkpoint. There are
|
||||
# The headers data is taken from testnet for early blocks from genesis until the first checkpoint. There are
|
||||
# two headers with valid POW at height 1 and 2, forking off from genesis. They are indicated by the FORK_PREFIX.
|
||||
FORK_PREFIX = 'fork:'
|
||||
self.headers = [l for l in h_lines if not l.startswith(FORK_PREFIX)]
|
||||
|
||||
@@ -90,7 +90,7 @@ MESSAGEMAP = {
|
||||
|
||||
MAGIC_BYTES = {
|
||||
"mainnet": b"\xf9\xbe\xb4\xd9", # mainnet
|
||||
"testnet3": b"\x0b\x11\x09\x07", # testnet3
|
||||
"testnet": b"\x0c\x12\x0a\x08", # testnet
|
||||
"regtest": b"\xfa\xbf\xb5\xda", # regtest
|
||||
}
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ def initialize_datadir(dirname, n, chain):
|
||||
if not os.path.isdir(datadir):
|
||||
os.makedirs(datadir)
|
||||
# Translate chain name to config name
|
||||
if chain == 'testnet3':
|
||||
if chain == 'testnet':
|
||||
chain_name_conf_arg = 'testnet'
|
||||
chain_name_conf_section = 'test'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user