Skip to content

Commit 3efe298

Browse files
kallewoofajtowns
andcommitted
signet: hard-coded parameters for Signet Global Network VI (2020-09-07)
Co-authored-by: Anthony Towns <[email protected]>
1 parent c7898bc commit 3efe298

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

src/chainparams.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -265,19 +265,25 @@ class SigNetParams : public CChainParams {
265265
vSeeds.clear();
266266

267267
if (!args.IsArgSet("-signetchallenge")) {
268-
throw std::runtime_error(strprintf("%s: -signetchallenge is mandatory for signet networks", __func__));
269-
}
270-
const auto signet_challenge = args.GetArgs("-signetchallenge");
271-
if (signet_challenge.size() != 1) {
272-
throw std::runtime_error(strprintf("%s: -signetchallenge cannot be multiple values.", __func__));
268+
LogPrintf("Using default signet network\n");
269+
bin = ParseHex("512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae");
270+
vSeeds.emplace_back("178.128.221.177");
271+
vSeeds.emplace_back("2a01:7c8:d005:390::5");
272+
vSeeds.emplace_back("ntv3mtqw5wt63red.onion:38333");
273+
} else {
274+
const auto signet_challenge = args.GetArgs("-signetchallenge");
275+
if (signet_challenge.size() != 1) {
276+
throw std::runtime_error(strprintf("%s: -signetchallenge cannot be multiple values.", __func__));
277+
}
278+
bin = ParseHex(signet_challenge[0]);
279+
280+
LogPrintf("Signet with challenge %s\n", signet_challenge[0]);
273281
}
274-
bin = ParseHex(signet_challenge[0]);
282+
275283
if (args.IsArgSet("-signetseednode")) {
276284
vSeeds = args.GetArgs("-signetseednode");
277285
}
278286

279-
LogPrintf("Signet with challenge %s\n", signet_challenge[0]);
280-
281287
strNetworkID = CBaseChainParams::SIGNET;
282288
consensus.signet_blocks = true;
283289
consensus.signet_challenge.assign(bin.begin(), bin.end());

src/chainparamsbase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman)
2525
argsman.AddArg("-testnet", "Use the test chain. Equivalent to -chain=test.", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
2626
argsman.AddArg("-vbparams=deployment:start:end", "Use given start/end times for specified version bits deployment (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
2727
argsman.AddArg("-signet", "Use the signet chain. Note that the network is defined by the -signetchallenge parameter", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
28-
argsman.AddArg("-signetchallenge", "Blocks must satisfy the given script to be considered valid (only for signet networks)", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
29-
argsman.AddArg("-signetseednode", "Specify a seed node for the signet network, in the hostname[:port] format, e.g. sig.net:1234 (may be used multiple times to specify multiple seed nodes)", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
28+
argsman.AddArg("-signetchallenge", "Blocks must satisfy the given script to be considered valid (only for signet networks; defaults to the global default signet test network challenge)", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
29+
argsman.AddArg("-signetseednode", "Specify a seed node for the signet network, in the hostname[:port] format, e.g. sig.net:1234 (may be used multiple times to specify multiple seed nodes; defaults to the global default signet test network seed node(s))", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
3030
}
3131

3232
static std::unique_ptr<CBaseChainParams> globalChainBaseParams;

0 commit comments

Comments
 (0)