Commit Graph

173 Commits

Author SHA1 Message Date
sami7777 3dfecf5cb7 Remove dead PoW mining code to reduce antivirus false positives
Strip getwork, getworkex, getblocktemplate, submitblock RPC commands
and their helper functions (SHA256Transform, FormatHashBlocks,
FormatHashBuffers, IncrementExtraNonce, CheckWork) which have been
dead code since PoW ended at block 9000. AV engines pattern-match
these nonce-incrementing loops and mining pool interfaces as
cryptominer signatures. Block validation (CheckProofOfWork) and
Hash9 algorithm files are preserved - only block *creation* for
PoW mining is removed. PoS staking code is untouched.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 17:53:35 -07:00
Krystie cf4851bede Add version bump script (scripts/bump-version.sh)
Single command to update version across all 12+ files:
  scripts/bump-version.sh 5.7.0

Updates: clientversion.h, version.h, triangles-qt.pro, Dockerfile,
and all packaging manifests (Docker, AUR, Chocolatey, Debian, RPM,
WinGet, Homebrew, Nix, AppImage).
2026-04-03 17:51:26 -07:00
Krystie 2c3a2f983c v5.5.5: Auto-bootstrap for new nodes - zero config required
- Daemon: automatically downloads blockchain snapshot when no data exists
  No -bootstrap flag needed. Use -nobootstrap to skip.
- Qt wallet: auto-bootstraps on first run (no question asked)
  Existing users still get the optional re-download prompt.
- New users just install and run - blockchain downloads automatically
- Works on all platforms (Windows, Linux, macOS, ARM64)
2026-04-03 16:18:31 -07:00
Krystie fbd498ad8e Revert hardcoded seed nodes - peer discovery is dynamic 2026-04-03 16:10:07 -07:00
Krystie 999726730b v5.5.4: Add hardcoded seed nodes for automatic network mesh
- Hardcoded DNS3 (74.208.167.19), DNS2 (194.233.88.206), and Contabo (100.98.123.59) as fixed seeds
- Nodes will automatically connect to these on first run
- No manual addnode configuration needed
- Full mesh network connectivity built into the code
2026-04-03 15:55:51 -07:00
Krystie d903ef2fc7 v5.5.3: Per-user installer (no UAC), network drive support, branding 2026-04-03 00:58:39 -07:00
Krystie 35369995fb Triangles branding + fix Qt platform plugin for Windows installer 2026-04-03 00:10:32 -07:00
Krystie 4be0101f2d Bump clientversion.h to 5.5.2 (match tag) 2026-04-02 23:38:52 -07:00
Krystie 7c79dc5ae8 Install NSIS via MSYS2 pacman (SourceForge downloads unreliable in CI) 2026-04-02 23:07:04 -07:00
Krystie 2f9841b0e3 Use NSIS portable zip instead of installer (corrupted download fix) 2026-04-02 22:57:45 -07:00
Krystie e7e2d8443e Fully self-contained on ALL platforms — zero external dependencies
Linux Qt .deb: bundles all .so files + LD_LIBRARY_PATH wrapper
Linux daemon .deb: same + systemd Environment= for LD_LIBRARY_PATH
Windows: already handled (ldd scan for DLLs)
macOS: already handled (install_name_tool into Frameworks)

Removed all Depends: from .deb control files. Every package
runs on a clean machine with nothing pre-installed.
2026-04-02 22:48:31 -07:00
Krystie 352dda5645 Bundle ALL runtime libraries for every platform
Windows Qt: ldd scan copies every MSYS2 DLL into installer
Windows daemon: ships with DLLs + Tor in a zip
macOS: copies Homebrew dylibs into .app/Frameworks with install_name_tool
Linux: unchanged (.deb Depends handles it via apt)
2026-04-02 22:46:41 -07:00
Krystie daf47d2fab Install NSIS directly from SourceForge instead of Chocolatey
Chocolatey had a 503 outage. Direct download is more reliable for CI.
2026-04-02 22:43:48 -07:00
Krystie 64e132b34b Fix Tor download: use dist.torproject.org v15.0.8 (14.0.8 was 404) 2026-04-02 22:28:38 -07:00
Krystie 7ca970d998 Proper installers for all platforms
Windows: NSIS setup.exe — double-click to install with Start Menu
  shortcuts, desktop icon, uninstaller in Add/Remove Programs.
  Tor bundled in tor/ subfolder, auto-detected by wallet.

Linux: .deb packages (dpkg -i) for both Qt wallet and daemon.
  Wallet gets desktop entry + app icon. Daemon gets systemd service.
  Tor bundled in /usr/lib/cryptographic-triangles/tor/.

macOS: DMG with Tor inside .app bundle (unchanged).

All platforms: download one file, install, run. Zero configuration.
2026-04-02 22:11:29 -07:00
Krystie c2e5cf4330 Bundle Tor Expert Bundle in all platform releases
Every release now ships with Tor integrated:
- Windows Qt/daemon: tor.exe + geoip data in tor/ subfolder
- Linux Qt/daemon: tor binary + geoip data in tor/ subfolder
- macOS DMG: tor binary inside .app/Contents/MacOS/tor/

The wallet auto-detects tor in the tor/ subfolder next to the binary.
No user configuration needed - Tor starts automatically on launch.

Release assets now packaged as archives (zip/tar.gz) to include
the tor/ directory alongside the wallet binary.
2026-04-02 21:58:32 -07:00
Krystie 6c5ce18459 Bundle Tor binary with all platform releases
Every release now ships with the Tor Expert Bundle included:
- Windows Qt: tor/ directory alongside triangles-qt.exe
- Windows daemon: tor/ directory alongside trianglesd.exe
- Linux Qt: tor/ directory in release tarball
- Linux daemon: tor/ directory in release tarball
- macOS: tor/ inside .app bundle (Contents/MacOS/tor/)

The wallet already auto-detects tor binary next to itself or in
a tor/ subfolder. Zero configuration needed for users - Tor starts
automatically with the wallet and stops when it exits.

Release assets now packaged as zip/tar.gz to include tor directory.
2026-04-02 21:55:33 -07:00
Krystie 91e026d7ec Fix Tor v3 onion address checksum: SHA-256 -> SHA3-256
The Tor v3 spec requires SHA3-256 (FIPS-202) for the .onion address
checksum computation, but ToStringIP() was using SHA-256 (double-hash).
This caused every reconstructed .onion address to have incorrect suffix
characters, making all outbound Tor connections fail with SOCKS5 'general
failure' - the entire network had 0 Tor peers despite working Tor instances.

Fix: Replace Hash() call with OpenSSL EVP_sha3_256() which is available
in OpenSSL 3.0+ and produces the correct FIPS-202 SHA3-256 checksum.

Tested: All 5 onion seed nodes now connect successfully.
2026-04-02 14:16:41 -07:00
sami7777 1011cf84fe Fix LookupHost call to use vector overload in HTTP seed fetch
LookupHost expects std::vector<CNetAddr>& but was passed a single
CNetAddr, breaking compilation on all platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:52:06 -07:00
sami7777 ad0088ef3a Add dynamic HTTP seed discovery, remove hardcoded seeds (v5.5.0)
Replace all hardcoded seed addresses (onion, clearnet, DNS) with a
dynamic HTTP-based seed list fetched from seeds.cryptographic-triangles.org
on startup. New getseedlist RPC exposes known .onion peers from the
address manager for a collector script to publish.

Any wallet that comes online with an onion address is automatically
discovered by peers via P2P addr exchange and appears in the seed list
within minutes. No binary rebuilds needed when addresses change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:25:43 -07:00
sami7777 1f0b83f893 Optimize wallet rescan and address indexing during IBD
Move wallet rescan to a background thread after IBD completes instead
of blocking on the main thread. Address index is now built during IBD
rather than skipped and rebuilt later. Wallet scan releases cs_wallet
lock while reading blocks from disk to improve concurrency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:10:00 -07:00
Krystie 4605cb4b70 Bump version to 5.4.4 - Updated seed nodes 2026-03-31 17:07:54 -07:00
Krystie 7b021a65c0 Update Docker seed node onion addresses (contabo-de deployment) 2026-03-31 02:32:41 -07:00
Krystie 19ea33b706 Add v3 onion seed nodes for network bootstrap
Added 5 new .onion v3 seed addresses:
- DNS3 main node
- 4 Docker-based seed nodes running on DNS2

Total seed count: 2 -> 7 onion seeds for improved
network connectivity and peer discovery.
2026-03-30 19:08:43 -07:00
sami7777 37b69f45ea Fix Boost filesystem API for modern Boost (copy_options)
copy_option::overwrite_if_exists was removed in Boost 1.90+,
replaced with copy_options::overwrite_existing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:49:17 -07:00
sami7777 8203f97eeb Bump version to v5.4.3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:40:33 -07:00
sami7777 3e19c1b232 Raise MAX_MONEY from 222222 to 2222222
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:38:22 -07:00
sami7777 b34f7e5ebd Add data directory change feature to Options dialog
Adds a "Data Directory" section to Options > Main tab that lets users
browse for a new data directory. On confirmation, files are automatically
migrated to the new location on restart (wallet.dat copied first with
atomic rename for safety). Supports "Restart Now" or "Later" workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:38:15 -07:00
sami7777 fea90d1f0a Bump version to v5.4.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 01:00:43 -07:00
sami7777 96bf97a3b3 Fix persistent PoS chain forks with deterministic tiebreaker and tighter timestamps
PoS blocks at the same height have identical difficulty, producing equal chain
trust scores. The old "strictly greater" comparison meant first-seen-wins,
causing permanent forks when nodes received competing blocks in different order.

v5.4 fork (block 2186941) adds:
- Deterministic tiebreaker: equal-trust chains resolve to the lower tip hash
- Tighter time drift: ±3 min (was ±10 min), reducing the competing block window

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 00:59:38 -07:00
SamiAhmed7777 3fdccf2b14 Merge pull request #3 from SamiAhmed7777/fix/version-detection
Fix version detection: prioritize exact tag match in genbuild.sh
2026-03-27 23:03:53 -07:00
Krystie 0b53c21eaf Fix version detection: prioritize exact tag match in genbuild.sh
When building from a release tag (e.g. v5.4.1), git describe was finding
the nearest ancestor tag (v5.3.8) instead of the exact tag, resulting in
version strings like 'v5.3.8-9-gdfb4b22' instead of 'v5.4.1'.

Now genbuild.sh tries --exact-match first, falling back to distance-based
describe only when not on a tagged commit.
2026-03-27 23:02:04 -07:00
sami7777 2c77ebb122 Fix shutdown race conditions causing bad_weak_ptr crash (v5.4.1)
Fixes multiple concurrency bugs exposed during shutdown when Tor proxy
connections are failing:

- Reorder shutdown: stop network threads before destroying Tor V3 services
- Make RPC listener responsive to fShutdown (poll_one+sleep vs blocking run_one)
- Wrap StopRequests() in try/catch and drain io_service on exit
- Fix leaked CNode AddRef in ThreadSocketHandler2 and ThreadMessageHandler2
  (return→break so Release loop executes)
- Guard vNodes.size() read with cs_vNodes lock (data race)
- Guard Qt UI signal callbacks with fShutdown check (use-after-free)
- Add cs_vNodes lock in CNetCleanup global destructor
- Force-disconnect remaining nodes in StopNode() after threads stop
- Make Tor maintenance thread sleep in 500ms intervals for prompt shutdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 21:57:34 -07:00
sami7777 2b79d8a6f9 Suppress UI transaction notifications during initial block download
During IBD, every wallet transaction triggers NotifyTransactionChanged
which repaints the Qt transaction list. With thousands of staking
rewards across 2M blocks, this floods the event loop and makes the
wallet appear frozen ("not responding") for hours.

Skip NotifyTransactionChanged during IsInitialBlockDownload(). The UI
catches up naturally via refreshWallet() once sync completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 02:54:31 -07:00
sami7777 a81570499b Fix CService constructor ambiguity in GetEffectiveTorProxy()
Cast GetArg() return (int64_t) to unsigned short for the port
parameter to resolve overload ambiguity across all platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 01:26:46 -07:00
sami7777 853efe3ad9 Bump version to v5.4.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 01:03:53 -07:00
sami7777 8cab86518c Tor v3: fix hidden service backend, add key persistence and health monitoring
Codex changes: delegate hidden service management to the actual Tor
backend instead of generating keys the wallet never served. The new
AttachToBackendService() reads the hostname Tor creates, and the
torrc/process plumbing properly gates HiddenService directives behind
the -torhiddenservice flag.

Additional fixes:
- Back up hs_ed25519_secret_key (96 bytes) to wallet.dat so the onion
  identity survives deletion of tor_data/
- Restore the key before Tor starts so the same .onion address is
  regenerated automatically
- Add ThreadTorMaintenance: checks Tor health every 30s, auto-restarts
  with exponential backoff on crash, re-attaches the hidden service
  and re-registers the onion address with AddLocal()
- Seeder maintenance: every 30 min re-announces to peers and refreshes
  known seeder lists (when -torseeder is enabled)
- Clean up ScheduleSeederReannouncement() stub (real work now in thread)
- Respect -torsocks port in onion proxy registration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 00:27:22 -07:00
sami7777 9a3b643a5a Derive release VERSION from clientversion.h instead of hardcoding
Build jobs extract MAJOR.MINOR.REVISION from src/clientversion.h.
Release job extracts from the git tag name. No more forgetting to
update the workflow when bumping versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 22:38:37 -07:00
sami7777 40d281c1ff Fix release filenames: update VERSION env to 5.3.9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 22:36:00 -07:00
sami7777 dd72957646 Bump version to v5.3.9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 22:20:27 -07:00
sami7777 97577a677c Fix Qt widget embedding: pages rendered as floating windows instead of tabs
Move centralWidget assignment before page creation to fix use of
uninitialized pointer. Use Qt::Widget flags when pages have a parent
(embedded in QStackedWidget) and pass centralWidget as parent for all
lazily-created pages (messagePage, signMessagePage, verifyMessagePage).
Also fix TransactionView which unconditionally set FramelessWindowHint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 22:18:01 -07:00
sami7777 cec7ca2e2e Fix unit tests: FormatMoney 6-digit precision, exclude Bitcoin tx tests
- FormatMoney used %08 (8 decimal digits) but Triangles COIN=1000000
  (6 digits); changed to %06
- Removed util_tests for 7th/8th decimal places (don't exist in Triangles)
- Excluded tx_valid/tx_invalid tests that deserialize Bitcoin-format
  transactions lacking Triangles' nTime field
- Replaced basic_transaction_tests with programmatic tx construction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 21:22:06 -07:00
sami7777 a82bf999d2 Regenerate base58 and key test data for Triangles version bytes
- base58_keys_valid.json: re-encode all entries with Triangles version
  bytes (PUBKEY=65, SCRIPT=28, SECRET=193) instead of Bitcoin's (0/5/128)
- key_tests.cpp: generate correct WIF keys and addresses from known
  private keys using Triangles version bytes
- Re-include base58_tests and key_tests in build (no longer excluded)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 21:08:01 -07:00
sami7777 52203b6003 Port unit tests to Triangles: fix runtime failures, exclude Bitcoin-specific tests
- wallet_tests: use max nSpendTime so coin time filter never applies
  (CTransaction::SetNull sets nTime=GetAdjustedTime, not 0)
- script_combineSigs: update prevout hash after modifying txFrom via
  scriptPubKey reference, fixing SignSignature assertion failure
- script_P2SH switchover: Triangles always enforces P2SH, remove
  old-rules-pass check
- Exclude base58_tests and key_tests from build (Bitcoin address
  version bytes 0/5/128 vs Triangles 65/28/193)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 21:00:36 -07:00
sami7777 76775cc697 Fix test linker errors: add missing global stubs, update orphan tx API
- test_triangles.cpp: add globals excluded with init.o (fEnforceCanonical,
  nNodeLifespan, fConfChange, CheckpointsMode, nDerivationMethodIndex,
  fUseFastIndex)
- DoS_tests.cpp: update AddOrphanTx and mapOrphanTransactions to match
  current CTransaction-based API (was old CDataStream-based)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 20:49:07 -07:00
sami7777 1911724373 Fix wallet_tests: add missing nSpendTime param to SelectCoinsMinConf calls
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 20:40:51 -07:00
sami7777 790cbd1cea Fix all remaining unit test compilation errors
- uint256_tests: uint64 -> uint64_t
- multisig_tests, script_P2SH_tests, script_tests: fix extern
  VerifyScript declarations and remove fStrictEncodings arg from
  all call sites to match 5-param function signature

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 20:31:53 -07:00
sami7777 91203c4ef4 Fix remaining unit test compilation errors
- uint160_tests: uint64 -> uint64_t (modern C++ type)
- transaction_tests: remove extra fStrictEncodings arg from VerifyScript calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 20:24:51 -07:00
sami7777 2e8f3f5194 Fix VerifySignature call in P2SH tests, add header sync diagnostics
Remove extra fStrictEncodings arg from VerifySignature call in
script_P2SH_tests.cpp to match 4-param function signature.
Add IBD-DIAG logging to AddHeaderSyncNode for all rejection reasons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 20:16:27 -07:00
sami7777 a3b479d954 Add startup performance logging and wallet sync progress UI
Instrument AppInit2 with StartupPerfLog timing for each startup phase
(block index, wallet load, rescan, tor, peers, etc). Show queued
transaction count in the progress bar during wallet history sync.
Emit transactionSyncProgressChanged for real-time pending counts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 19:06:05 -07:00