- trianglesrpc.cpp: revert std::shared_ptr back to boost::shared_ptr
(boost::signals2::slot::track() requires boost::shared_ptr)
- miner.cpp: auto_ptr → unique_ptr (auto_ptr removed in C++17,
caught by macOS clang)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- miner.cpp: .get<N>() → std::get<N>() (boost::tuple member syntax
doesn't exist on std::tuple)
- script.cpp: remove 'using namespace boost' (no boost headers left)
- smessage.cpp: include lz4/lz4.h instead of lz4/lz4.c (U64 typedef
conflict with xxhash when LZ4 1.10.0 source included in same TU)
- makefile.unix: add obj/lz4.o as separate compilation unit
- triangles-qt.pro: add src/lz4/lz4.c to SOURCES
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace boost::assign::list_of/map_list_of with brace-init in
rpcrawtransaction.cpp (7 call sites missed in previous commit)
- Remove C++17-banned 'register' keyword from lz4.c (macOS build fix)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changes improve sync speed without changing consensus:
- dbcache: 128MB → 2048MB (better caching during sync)
- checkblocks: 2500 → 24 (faster startup validation)
- checklevel: 1 → 2 (lighter verification during sync)
These changes make the node faster to sync and restart while maintaining
security and consensus compatibility.
Moved setOrganizationName/setApplicationName calls BEFORE
IntroDialog::pickDataDirectory() so QSettings knows where to save the
user's data directory choice.
Previously, QSettings was created without org/app names set, causing
the "strDataDir" setting to be lost, forcing the dialog to appear on
every startup.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed missing braces in CNode constructor (net.h:327-329) that caused
PushVersion() to execute unconditionally for ALL connections instead of
only outbound connections.
This bug caused inbound peers (seed nodes) to:
1. Send version on connection (unintended)
2. Send version again when receiving peer's version (intended)
3. Trigger Misbehaving(1) on peer side for duplicate version
4. Get disconnected by peer (ProcessMessage fails → CloseSocketDisconnect)
Result: Seed nodes could only serve ~120 blocks before disconnect,
making sync nearly impossible.
Bump version to 5.2.1.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Verbose logging at every critical sync pipeline stage:
- Version handler: whether getblocks was sent and why
- Inv handler: count of new vs already-known blocks
- Block handler: every block received (throttled), ProcessBlock failures
- ProcessBlock: CheckBlock failures with details
- SendMessages: stall detection with queue sizes
- Periodic status: height, peers, askfor queue, orphan count
- Getblocks handler: what range the seed is serving
All lines prefixed with IBD-DIAG for easy grep.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DNS2 was sending a stale sync checkpoint (block 2,186,940) to DNS3
on connect. ProcessSyncCheckpoint then called PushGetBlocks with the
checkpoint hash as the stop point, and AskFor'd block 2,186,940
directly — overriding the normal sequential getblocks chain. DNS3
would request a block it can't process (missing 2M predecessors)
instead of syncing from genesis.
Fix: ignore incoming checkpoint messages entirely (master key was
already removed in V5 fork, no new checkpoints possible). Also stop
relaying stored checkpoint messages to new peers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of skipping the anti-spam difficulty check during IBD, fix it
properly:
- Fall back to pindexBest when sync checkpoint is genesis (height 0)
- Add NULL safety for GetLastBlockIndex in both PoS and PoW cases
- PoS case: if no PoS block exists yet (below 9001), skip gracefully
since AcceptBlock already rejects PoS below MODIFIER_INTERVAL_SWITCH
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The anti-spam check in ProcessBlock used GetLastSyncCheckpoint() which
pointed to genesis after our reset. When processing PoS blocks,
GetLastBlockIndex(genesis, true) returned NULL (no PoS blocks at genesis),
causing a crash or Misbehaving(100) which banned the seed node.
Fix: skip the entire anti-spam check during IBD - hardcoded checkpoints
already guarantee chain integrity. Also add NULL safety for the PoS
case after IBD completes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
version.h had a separate DISPLAY_VERSION set (5.1.7.0) used by
version.cpp for the user-visible version string. clientversion.h
was updated but version.h was not, causing binaries to report
v5.1.7.0 despite being built from v5.2.0 source.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The sync checkpoint (hashSyncCheckpoint) was persisted in LevelDB pointing
to block 2,186,940. On startup it was loaded from DB, overriding any code
change to the initial value. CheckSync then rejected every block below
that height during IBD since they weren't in mapBlockIndex yet.
Three-pronged fix:
- CheckSync now always returns true (master key disabled, no new sync
checkpoints will ever be broadcast)
- AcceptBlock no longer calls sync checkpoint enforcement
- LoadBlockIndex resets sync checkpoint to genesis if stored hash is
not in the block index (prevents assert crash)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hashSyncCheckpoint was initialized to block 2,186,940 hash, causing
CheckSync to reject ALL blocks below that height during initial block
download (they aren't in mapBlockIndex yet when checked). Changed to
genesis hash so IBD can proceed from block 0.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major sync performance overhaul:
- Assumevalid: skip FetchInputs/ConnectInputs for blocks below
checkpoint (2,186,940). Only write txindex entries. Eliminates
millions of LevelDB reads during initial sync.
- Skip SyncWithWallets during IBD with automatic post-IBD wallet
rescan from genesis and SecureMsg chain scan.
- Skip wallet best-chain locator update during IBD so restarts
trigger proper rescan.
- Remove send/receive buffer limits (were 1MB/5MB, now unlimited).
The 1MB send buffer was the root cause of ~180 block stalls -
ProcessMessages stops reading when nSendSize >= SendBufferSize().
- Reduce IBD pipeline batch from 500 to 100 blocks for faster
re-requesting with near-instant block processing.
- Seed getblocks limit raised to 20000 during IBD (was 500).
- Faster message handler polling during IBD (10ms vs 100ms).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove IBD guards on SyncWithWallets and SetBestChain so wallet
transactions appear as blocks are connected. Log every 500 blocks
during sync instead of every 10,000.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds CTorProcess which finds and launches an external Tor binary as a
subprocess, providing a SOCKS5 proxy on port 19099 and a v3 hidden
service on port 24112. The wallet auto-detects Tor from common install
locations or the app directory. Falls back gracefully to clearnet-only
if Tor is not found. Also fixes Tor-only network restriction that
blocked IPv4/IPv6, and bumps version to 5.1.7.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows an intro dialog on first launch letting users choose where to store
blockchain data. Saves the choice in QSettings so it only appears once.
Styled to match the existing Triangles dark theme.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Critical fix: revert initial sync from getheaders back to getblocks.
The headers-first change (05b1fd1) broke chain continuation — after
downloading the first 2000 blocks, fresh nodes would stall because
the getheaders path has no orphan-based continuation mechanism.
The getblocks/inv/orphan cycle is required for full chain sync.
Also adds getblocks fallback to the headers handler so if headers
are used via other paths, sync still continues.
Other changes:
- Extract REST API into separate rest.cpp/rest.h
- Add REST rate limiting and CORS support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Bump version 5.1.4 → 5.1.5 across all source, CI, and packaging files
- Remove 157 build artifacts (build/*.o, release/*.dll, etc.) from git tracking
These were added before .gitignore existed and caused cross-platform CI failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The 'all: trianglesd.exe' target was defined after 'leveldb/libleveldb.a:'
making LevelDB the default target. Make would only build LevelDB and exit.
Move 'all' to before LevelDB so it becomes the default target (like
makefile.unix). Also pass explicit 'all' target in CI as belt-and-suspenders.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Build LevelDB separately so daemon make errors are visible.
Add set -eo pipefail and stderr redirect to capture all output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create symlinks qmake->qmake-qt5, lrelease->lrelease-qt5,
windeployqt->windeployqt-qt5 for MSYS2 Qt5 tool naming
- Fix daemon strip by running in same directory as build output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Windows Qt: use qmake-qt5/windeployqt-qt5 (MSYS2 binary names)
- Windows daemon: override DEPSDIR=/mingw64 for CI, separate steps
- Linux Qt: add qttools5-dev-tools for lrelease (qm file generation)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Linux: add chmod +x build_detect_platform for LevelDB builds
- Linux daemon: add separate LevelDB build step (was missing)
- macOS: clean stale Windows .o files from git before building
- Windows Qt: add qt5-tools package, use full qmake path
- Windows daemon: combine build+strip in same step to fix path issue
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removes build-macos.yml and adds build-all.yml which builds Windows Qt,
Windows daemon, Linux Qt, Linux daemon, and macOS on every push to master.
Automatically creates GitHub releases with all assets on version tags.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New makefile.mingw builds trianglesd.exe on MSYS2/MinGW64.
Adapted from makefile.unix with Windows-specific libraries
and static linking.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Homebrew's Boost libraries don't use the -mt suffix
(e.g. libboost_filesystem.dylib, not libboost_filesystem-mt.dylib).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove Q_OS_MAC guards around trayIconActivated slot declaration
and implementation. MOC generates code referencing the slot
unconditionally, causing a build error on macOS. The slot is
harmless when present - on macOS the tray icon isn't created
so it simply never gets called.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
macOS does not have fdatasync(), it uses fcntl(F_FULLFSYNC) instead.
Set HAVE_FDATASYNC=0 for __APPLE__ alongside _WIN32.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- macos-13 (Intel) runners no longer available, use macos-15 (ARM64)
- chmod +x build_detect_platform before LevelDB build
- Simplify to single ARM64 build for now
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- GitHub Actions workflow builds DMGs for both Intel and Apple Silicon
- Update .pro file: macOS 11+ target, Homebrew paths instead of MacPorts
- Add RPM spec + build script for Fedora/RHEL/openSUSE
- Add Nix derivation with autoPatchelfHook
- Update Homebrew formula to support macOS (Intel + ARM64)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Chocolatey .nuspec + install script for Windows
- AppImage build script for universal Linux
- Dockerfile for headless daemon container
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename client from "Black Pharao" to "Cryptographic Triangles"
- Update CLIENT_VERSION from 4.2.1.0 to 5.1.3.0
- Update DISPLAY_VERSION from 5.0.0.0 to 5.1.3.0
- Update .pro VERSION to 5.1.3.0
- Fix RC file: copyright 2014-2026, fix OriginalFilename typo
- Update about dialog copyright to 2014-2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New command: smsgbroadcast <addrFrom> <message>
Iterates all public keys in smsgDB and sends an encrypted message to each.
Skips the sender's own address. Reports sent/failed counts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The wallet was freezing on "Verifying database integrity" because the
old Tor v2 startup code blocked on a mutex (wait_initialized) and
required an onion/hostname file that no longer existed after v2 removal.
Replace the blocking v2 startup with internal V3 onion identity:
- Every wallet now auto-generates Ed25519 keys and a V3 .onion address
- Keys are stored in wallet.dat (encrypted if wallet is encrypted)
- Onion identity is created after wallet loads (Step 8.5) so keys
persist across restarts
- No external Tor process required for identity generation
- Writes onion/hostname and tor_data/ config for optional external Tor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major improvements:
- C++11 port layer (std::mutex/condition_variable replaces platform-specific code)
- Better write performance and compaction scheduling
- Improved Windows support (env_windows.cc replaces env_win.cc)
- More robust crash recovery and corruption detection
- Bloom filter improvements for faster reads
API is backward compatible - no changes needed to txdb-leveldb.cpp.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>