Commit Graph

58 Commits

Author SHA1 Message Date
sami7777 3ed9a42b3c v5.1.6: Fix block sync stall for fresh nodes, REST API refactor
Build All Platforms / build-windows-qt (push) Waiting to run
Build All Platforms / build-windows-daemon (push) Waiting to run
Build All Platforms / build-linux-qt (push) Waiting to run
Build All Platforms / build-macos (push) Waiting to run
Build All Platforms / release (push) Blocked by required conditions
Build All Platforms / build-linux-daemon (push) Failing after 25m20s
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>
v5.1.6
2026-03-16 01:57:50 -07:00
sami7777 6a8fde3e92 Bump version to v5.1.5, remove tracked build artifacts
Build All Platforms / build-windows-qt (push) Waiting to run
Build All Platforms / build-windows-daemon (push) Waiting to run
Build All Platforms / build-linux-qt (push) Waiting to run
Build All Platforms / build-macos (push) Waiting to run
Build All Platforms / release (push) Blocked by required conditions
Build All Platforms / build-linux-daemon (push) Failing after 22m48s
- 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>
bootstrap-2026-03-16 v5.1.5
2026-03-15 16:50:08 -07:00
sami7777 5af44ade9e Fix Windows daemon: move 'all' target before LevelDB in makefile.mingw
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>
2026-03-15 16:26:51 -07:00
sami7777 644dfcd65f Fix Windows daemon CI: separate LevelDB step, add error handling
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>
2026-03-15 16:17:11 -07:00
sami7777 04f1be664e Fix Windows CI: add Qt5 tool symlinks, fix daemon strip path
- 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>
2026-03-15 16:07:30 -07:00
sami7777 21327c573c Fix remaining 3 CI failures: qmake, DEPSDIR, lrelease
- 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>
2026-03-15 15:58:26 -07:00
sami7777 d84a563528 Fix all 5 CI build failures in build-all.yml
- 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>
2026-03-15 15:46:07 -07:00
sami7777 fe9ff05da2 Replace macOS-only CI with unified all-platform build workflow
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>
2026-03-15 15:38:57 -07:00
sami7777 a70798c1b6 Add Windows MinGW makefile for headless daemon
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>
2026-03-15 14:42:24 -07:00
sami7777 379107ca60 Fix Boost library suffix for macOS Homebrew
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>
2026-03-15 03:15:13 -07:00
sami7777 9a5c9bd14b Fix trayIconActivated MOC mismatch on macOS
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>
2026-03-15 03:11:51 -07:00
sami7777 c5588b26f1 Fix macOS clang build errors
- Suppress -Wreserved-user-defined-literal for PRId64 format macros
- Suppress -Wdeprecated-declarations for OpenSSL 3.x legacy APIs
- Guard duplicate CDataStream::insert overload with _LIBCPP_VERSION
  (libc++ const_iterator == std::vector::const_iterator)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 03:07:46 -07:00
sami7777 233d6250db Fix LevelDB fdatasync build error on macOS
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>
2026-03-15 03:05:07 -07:00
sami7777 251e87abb0 Fix macOS CI: use macos-15 runner, fix LevelDB permissions
- 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>
2026-03-15 03:03:02 -07:00
sami7777 f64361fc11 Add macOS CI build, RPM, and Nix packaging
- 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>
2026-03-15 02:59:33 -07:00
sami7777 322d227ec6 Add Chocolatey, AppImage, and Docker packaging
- 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>
2026-03-15 02:16:59 -07:00
sami7777 269a7ea1b5 Add packaging for all major package managers
- Snap (snapcraft.yaml) - Ubuntu, Mint, Fedora
- Flatpak manifest - Fedora, most distros
- AUR PKGBUILD - Arch/Manjaro
- Homebrew formula - macOS/Linux
- Debian .deb build script - Ubuntu/Debian
- winget manifest - Windows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 01:59:26 -07:00
sami7777 7c7e951adb Bump version to v5.1.4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v5.1.4
2026-03-15 01:55:10 -07:00
sami7777 08b98a8775 Rebrand to Cryptographic Triangles v5.1.3
- 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>
v5.0.0.0
2026-03-15 01:28:52 -07:00
Sami Ahmed 0f307a498d Update client version to v5.1.3 2026-03-14 04:53:19 +01:00
sami7777 e54120108e Remove leftover diagnostic logging from messagemodel.cpp
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v5.1.3
2026-03-13 17:11:22 -07:00
sami7777 50713cc87b Add smsgbroadcast RPC command for messaging all known peers
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>
2026-03-13 17:03:51 -07:00
sami7777 ae5e97ad6e Integrate Tor V3 onion identity into wallet startup, fix freeze
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>
v5.1.2
2026-03-13 12:35:51 -07:00
sami7777 958adea2b6 Upgrade bundled LevelDB from 1.15 to 1.23
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>
v5.1.1
2026-03-13 03:17:43 -07:00
sami7777 05b1fd1610 Dramatically speed up startup and sync: headers-first, fast block index, indexed rescan
Startup optimization (fixes multi-minute hang on 2M+ block chain):
- Skip computing SHA-256 stake modifier checksum for blocks below last
  checkpoint (was doing 2M+ unnecessary hashes on every startup)
- Reduce default -checkblocks from 2500 to 50 (disk read savings)
- Add progress percentage reporting during block index load

Headers-first sync (faster initial sync):
- Switch initial sync from getblocks to getheaders protocol
- Add PushGetHeaders and headers message handler in net/main
- Downloads 80-byte headers first, then requests blocks — allows
  the node to learn chain structure before downloading full blocks

Address-index accelerated wallet rescan:
- New ScanForWalletTransactionsFromIndex() uses address index to find
  only transactions touching wallet keys (skips scanning every block)
- Follows spend chains to find related transactions
- Falls back to full scan if index unavailable
- Track index sync state with addressIndexBestChain/StartHeight in LevelDB

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 02:40:13 -07:00
sami7777 7aee073e21 Link boost_chrono on all platforms, not just Windows
smessage.cpp uses boost::chrono::steady_clock which requires
-lboost_chrono. Previously only linked on Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 01:28:03 -07:00
sami7777 4266c8f146 Defer heavy UI model loading for faster startup
- Address table and transaction table now load asynchronously via
  QTimer::singleShot after the event loop starts instead of blocking
  the constructor
- MessageModel (secure messaging) lazy-loaded 1s after wallet init
  or on-demand when navigating to message page
- Splash screen stays visible until window.show() completes
- Guard updateConfirmations() against empty transaction table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 00:48:05 -07:00
sami7777 e133e97f3b Add comprehensive RPC API upgrade: REST, ZMQ, SSE, address index
Phase 1 - New RPC commands (no new deps):
  - getblockheader: header data from memory, zero disk reads
  - estimatefee: static fee estimation (Bitcoin Core compatible)
  - getblockchaininfo: chain state, difficulty, moneysupply
  - getwalletinfo: balance, stake, txcount, keypool, encryption
  - getnetworkinfo: version, protocol, connections, proxy
  - gettxoutsetinfo: height, bestblock, total_amount

Phase 2 - REST API layer (-rest=1):
  - /rest/chaininfo.json, /rest/block/<hash>.json|hex
  - /rest/blockheader/<hash>.json, /rest/tx/<txid>.json|hex
  - /rest/blockhashbyheight/<n>, /rest/mempool.json
  - CORS headers for browser-based explorer access

Phase 3 - ZMQ pub/sub notifications (optional, USE_ZMQ=1):
  - Topics: hashblock, hashtx, rawblock, rawtx
  - Conditional compilation via ENABLE_ZMQ

Phase 4 - SSE real-time notifications (-ssenotify=1):
  - GET /events endpoint (authenticated, long-lived)
  - Block and transaction event streaming
  - 15-second keepalive for proxy compatibility

Phase 5 - Address index (-addressindex=1):
  - getaddressbalance, getaddressutxos, getaddresstxids
  - LevelDB-backed index updated in ConnectBlock/DisconnectBlock
  - Requires -reindex on first use

Also fixes QDesktopServices missing include for Qt5.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v5.1.0
2026-03-12 00:50:34 -07:00
sami7777 0f34c7d26f Improve startup performance, shutdown reliability, and Qt5 compatibility
- Defer SecureMsgStart and ReacceptWalletTransactions to background thread
  so GUI appears faster during startup
- Add shutdown checks in wallet scan/reaccept to prevent hanging on exit
- Smart wallet rescan: start from wallet birthday instead of genesis block
- Raise default dbcache from 25 to 128 MB for better performance
- Replace deprecated QDesktopServices with QStandardPaths (Qt5 compat)
- Enforce Qt5+ requirement in build system, remove -fpermissive flag

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:04:29 -07:00
sami7777 6af3f819ed Merge branch 'master' of https://github.com/SamiAhmed7777/triangles_v5 2026-03-11 00:55:26 -07:00
sami7777 96aeacea65 Fix ConnectToSeederNode call signature in seeder message handler
Combine onionAddress and port into single "address:port" string
to match the function's expected parameter format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 00:54:19 -07:00
sami7777 741487d533 Remove test files and debug scripts 2026-03-11 08:34:54 +01:00
sami7777 1db41cdfd6 Remove additional build artifacts and debug files 2026-03-11 08:30:37 +01:00
sami7777 661e5cb5e9 Clean up repository: remove internal docs and build artifacts, add .gitignore 2026-03-11 08:29:56 +01:00
sami7777 c636edb6eb Triangles v5.0.0.0 - Chain revival with Tor v3, messaging, and seed nodes
- Revived frozen chain (Dec 2022) with two live seed nodes
- Added Tor v3 onion hidden service support (Ed25519)
- Wired seeder message handlers (seeder/getseederlist/seederlist)
- Hardcoded onion seeds and clearnet IP seeds for DNS2/DNS3
- Fixed bind address (0.0.0.0) so nodes accept external connections
- Added boost_chrono to makefile.unix for modern Boost
- Fixed LoadExternalBlockFile block-skip bug for faster imports
- Import-only optimizations for chain replay (checkpoint-gated)
- Added sort_blocks.c tool for blockchain data recovery
- Comprehensive README with build/run/messaging/Tor instructions
- Chain revival status document for project coordination

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:34:33 -07:00
sami7777 d36b1e7050 Triangles v5: Chain restart updates - DNS seeds, checkpoint, protocol 70205 2026-03-09 02:45:04 -07:00
sami7777 dba7f9642f Black Pharao Release Fix 5 - OpenSSL 3.x and modern Boost compatibility
Port codebase to build with OpenSSL 3.x and Boost 1.90+:
- Rewrite bignum.h to use BIGNUM* pointer instead of inheriting from opaque BIGNUM
- Fix ECDSA_SIG, EVP_CIPHER_CTX, HMAC_CTX opaque type access across key.cpp, crypter.cpp, smessage.cpp
- Modernize Boost.Asio API (io_context, resolver, executor) in trianglesrpc.cpp
- Remove embedded Tor v2 client (incompatible with OpenSSL 3.x), keep Tor v3 SOCKS5 approach
- Update header logo to Cryptographic Triangles branding (300x63)
- Replace Bittrex exchange link with Pinball (313.cash) across all locales
- Fix MSYS2/MinGW64 build: linker flags, Boost library names, miniupnpc static linking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 22:29:42 -07:00
sami7777 41d9ae4c7a Updated Triangles project - new features and branding 2026-03-08 15:57:09 -07:00
wurstgelee 51bd951eb8 Black Pharao Release Fix 4
- fix serialize.h for Mac build
2015-07-30 23:39:42 +02:00
wurstgelee 3c2830cc6f Black Pharao Release Fix 3
- .pro file adjustments for Mac builds
2015-07-29 14:31:29 +02:00
wurstgelee afd20621c2 Black Pharao Release Fix 2
- fixed Mac build
- removed unused ttf
2015-07-28 15:59:06 +02:00
unknown 7b5be5f44a Black Pharao Release Fix 1
- fixed macdockiconhandler filename issues
2015-07-26 18:56:25 +02:00
TrianglesCommunityProject 2bbdc915ba Black Pharao Update 1
- added/fixed some Mac build instructions
2015-07-23 10:06:42 +02:00
TrianglesCommunityProject 627c13c0fc Black Pharao Release
Version 4.2.1.0
- wallet makeover
- staking behaviour adjustments
- non mandatory update-
- no need for updating daemons (only recomended if used for staking)
2015-07-22 23:00:36 +02:00
TrianglesCommunityProject 69cc21394f Pharao Release Fix 1
Added missing triangles.icns for Mac builds.
2014-10-06 19:51:31 +02:00
TrianglesCommunityProject 69aedf2533 Pharao Release
Version 4.0.0.4
- refactored code
- migrated vom Qt4 to Qt5
- added secure messaging
2014-10-05 23:37:30 +02:00
TrianglesCommunityProject 215a52f3e6 Cheops Release Fix 2
Adressing small node number network issues.
2014-08-29 13:49:42 +02:00
TrianglesCommunityProject a0158e66f2 Cheops Release Fix 1
Version 3.4.2.0.
- reverted previous idiocy
2014-08-28 15:34:57 +02:00
TrianglesCommunityProject fbadfb5086 Cheops Release
Version 3.4.1.0.
- changed parameters to prevent future blockchain deadlocks
- minor bugs fixed
- checkpoint added.
2014-08-27 16:38:26 +02:00
TrianglesCommunityProject caac12acb7 Protocol version fix
This change never made it into the original repository although both
v3.3.4.4 ("Illuminatus") Windows and Mac Wallets were compiled with it.
2014-08-27 12:46:43 +02:00