upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authorbitflash-maintainer <noreply@bitflash.invalid>2026-09-05 05:08:30 +0000
committerbitflash-maintainer <noreply@bitflash.invalid>2026-09-05 05:08:30 +0000
commit66e0b9158d050c46b1ff2509faeee3f4573cac1c (patch)
tree7e9132aa871fdc01cb95268d2f5ea3bb11853ddf /src/main_gui.cpp
parent36201d2795b7b49beb1a837b0252134096beb64d (diff)
parent17741d9cf4c762ea03dc83e8aae6a176e5f338b0 (diff)
Merge upstream/main into the fork
Brings the nine commits that are actually the latest on our lineage: isolated testnet parameters and genesis, optional 2 MB large pages for RandomX, and five README changes. This is what "up to date" means here -- not the 1.2.2x tags, which carry higher version numbers but were cut 2026-07-30, three weeks before the line we ship, and which upstream/main does not contain. Three conflicts, all resolved toward upstream's structure while keeping what this fork knows: main.cpp -- upstream moved genesis construction into BuildGenesisBlock() so mainnet and the new testnet can share it. Verified byte-for-byte before taking it: MAINNET_GENESIS_TIMESTAMP, _TIME (1753315200), _NONCE (3141), _HASH, _MERKLE, the scriptPubKey, nBits and nVersion all equal what this tree built inline. The mainnet genesis hash is unchanged and the asserts still guard it. Kept our warning about never editing those inputs, and kept our note that 1753315200 is 2025-07-24, not 2026 -- upstream's comment on that constant states the wrong year. net.h -- DEFAULT_PORT = htons(8433) becomes MAINNET_PORT/TESTNET_PORT in host order. Nothing is lost: net.cpp's GetDefaultPort() applies htons() itself and is what every caller uses, so the value reaching a sockaddr is unchanged and mainnet stays on 8433. selftest.cpp -- the known-tests string had diverged in both directions. Took the union: upstream's network-params alongside our payout-ledger, rather than dropping either. Gates: 15/15 selftests (our 14 plus upstream's network-params), consensus constants unchanged against e4f898c except the pre-existing MAX_BLOCK_SIZE_GEN, mainnet genesis intact, compactblock's 17 checks still pass, money-log check ok, GNU_STACK RW.
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index dd001c8..2e4eb91 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -120,7 +120,7 @@ static void PrintUsage()
120 printf(" wallet-crypto, wallet-encrypt, wallet-portability,\n"); 120 printf(" wallet-crypto, wallet-encrypt, wallet-portability,\n");
121 printf(" net-message,\n"); 121 printf(" net-message,\n");
122 printf(" consensus-limits, pool-stratum,\n"); 122 printf(" consensus-limits, pool-stratum,\n");
123 printf(" parse-money, socks5-proxy, or managed-tor\n"); 123 printf(" parse-money, network-params, socks5-proxy, or managed-tor\n");
124 printf("\n"); 124 printf("\n");
125 printf("Mining mode:\n"); 125 printf("Mining mode:\n");
126 printf(" /operator\n"); 126 printf(" /operator\n");
@@ -132,6 +132,8 @@ static void PrintUsage()
132 printf(" /stratumbridgeport=N (default 3333; listen on 127.0.0.1)\n"); 132 printf(" /stratumbridgeport=N (default 3333; listen on 127.0.0.1)\n");
133 printf(" /solomine\n"); 133 printf(" /solomine\n");
134 printf(" /genproclimit=N (mining threads; 0 or absent = every core but one)\n"); 134 printf(" /genproclimit=N (mining threads; 0 or absent = every core but one)\n");
135 printf(" /nolargepages (do not ask for 2 MB pages for the RandomX\n");
136 printf(" cache, dataset and scratchpads)\n");
135 printf(" /checkblocks=N (blocks re-verified at startup, default 288, 0 = all)\n"); 137 printf(" /checkblocks=N (blocks re-verified at startup, default 288, 0 = all)\n");
136 printf("\n"); 138 printf("\n");
137 printf("Pool operator announcement:\n"); 139 printf("Pool operator announcement:\n");
@@ -148,7 +150,8 @@ static void PrintUsage()
148 printf(" /onionservice=HOST.onion:PORT (advertise this node's Tor hidden service)\n"); 150 printf(" /onionservice=HOST.onion:PORT (advertise this node's Tor hidden service)\n");
149 printf("\n"); 151 printf("\n");
150 printf("Network:\n"); 152 printf("Network:\n");
151 printf(" /port=N (P2P listen port, default 8433)\n"); 153 printf(" /testnet (isolated test network genesis, datadir, port, and magic)\n");
154 printf(" /port=N (P2P listen port, default 8433; testnet 18433)\n");
152 printf(" /socks=HOST:PORT (SOCKS5 proxy for Nostr, .btf relay, and onion dials)\n"); 155 printf(" /socks=HOST:PORT (SOCKS5 proxy for Nostr, .btf relay, and onion dials)\n");
153 printf(" /tor[=HOST:PORT] (Tor mode; default SOCKS5 proxy is 127.0.0.1:9050)\n"); 156 printf(" /tor[=HOST:PORT] (Tor mode; default SOCKS5 proxy is 127.0.0.1:9050)\n");
154 printf(" /managedtor[=PATH] (start Tor, create a hidden service, advertise its onion)\n"); 157 printf(" /managedtor[=PATH] (start Tor, create a hidden service, advertise its onion)\n");
@@ -214,6 +217,9 @@ static void ParseStartupArguments(int argc, char* argv[])
214 if (arg(argc,argv,"/datadir") || arg(argc,argv,"-datadir")) 217 if (arg(argc,argv,"/datadir") || arg(argc,argv,"-datadir"))
215 strSetDataDir = argval2(argc, argv, "/datadir", "-datadir"); 218 strSetDataDir = argval2(argc, argv, "/datadir", "-datadir");
216 219
220 bool fUseTestNet = arg(argc, argv, "/testnet") || arg(argc, argv, "-testnet");
221 SelectChainParams(fUseTestNet);
222
217 if (arg(argc,argv,"/debug") || arg(argc,argv,"-debug")) 223 if (arg(argc,argv,"/debug") || arg(argc,argv,"-debug"))
218 fDebug = true; 224 fDebug = true;
219 225
@@ -284,6 +290,11 @@ static void ParseStartupArguments(int argc, char* argv[])
284 if (!strCheckBlocks.empty()) 290 if (!strCheckBlocks.empty())
285 nCheckBlocksOnLoad = atoi(strCheckBlocks.c_str()); 291 nCheckBlocksOnLoad = atoi(strCheckBlocks.c_str());
286 292
293 // Must be read before LoadBlockIndex(), which is what first calls
294 // RandomXInit() and fixes how the cache is allocated.
295 if (arg(argc,argv,"/nolargepages") || arg(argc,argv,"-nolargepages"))
296 fRandomXLargePages = false;
297
287 // /genproclimit=N -- threads to hash with. 0 or absent means automatic, 298 // /genproclimit=N -- threads to hash with. 0 or absent means automatic,
288 // which is every core but one. Named after Bitcoin's own option so it reads 299 // which is every core but one. Named after Bitcoin's own option so it reads
289 // familiarly to anyone who has run one of these before. 300 // familiarly to anyone who has run one of these before.