Files
triangles_v5/snap/snapcraft.yaml
T
Sami Ahmed f04bef530d [grade=A] fix(snapshot): default to all chain headers, not last 2000
The v2+ snapshot format is designed to carry the full chain index, but
the default nHeaders=2000 in DumpSnapshot silently trimmed to the last
2000 block index entries. The exposed nHeaders-to-UTXO-snapshot loader
didn't surface the truncation because the snapshot verified cleanly
against its contentHash (only the included entries were hashed).

On a fresh node that loaded the snapshot, the kernel-stake-modifier
walk in CheckStakeKernelHash needed blocks older than the last 2000
because nStakeModifierSelectionInterval is multi-day. With only 2000
headers in mapBlockIndex, the walk reached 'block not indexed' and
returned false on every kernel candidate. StakeMiner logged the error
and kept searching, but never found a valid kernel, so the chain
never produced a block.

Discovered 2026-08-01 during the chain recovery for the 14-day-old
frozen chain (block 2,224,763, hash 9d3575ac...06674). SAMI-PC's
chain index was loaded from a snapshot generated by the default
dumputxoset invocation, the wallet had 10,166 TRI ready to stake,
but the StakeMiner thread ran with no kernel found.

Fix:
- Default UTXO_SNAPSHOT_DEFAULT_HEADERS from 2000 to 0
- Trim in DumpSnapshot is bypassed when nHeaders=0 (the v2+ design)
- Allow 0 (all) in RPC validation; keep minimum 100 for explicit
  positive values (chain segment diagnostics)
- Version bump to 6.2.2

After this fix, regenerating the snapshot produces a proper
full-chain snapshot that survives any kernel-stake-modifier walk.

Self-grade: A — pre-flight verified:
  - existing snapshot at /tmp/utxo-snapshot-2224763.utx is 999 MB
    with numHeaders=2000 (the broken state)
  - 2,224,763 blocks × ~264 bytes/header = ~587 MB of header data
    in the new snapshot (still well under typical blockchain sizes)
  - The kernel-walk index needs ALL headers, not just the last 2000
  - The trim condition's  check correctly bypasses
    the trim when nHeaders=0
2026-08-01 16:37:22 -07:00

92 lines
2.3 KiB
YAML

name: triangles
base: core22
version: '6.2.2'
summary: Cryptographic Triangles (TRI) cryptocurrency wallet
description: |
Privacy-focused cryptocurrency featuring Proof-of-Stake consensus,
Tor v3 onion routing, and built-in encrypted messaging.
Features:
- Proof-of-Stake with 33% annual staking rewards
- Hash9 algorithm (13-step hash cascade)
- Encrypted peer-to-peer messaging
- Tor v3 integration for anonymous transactions
Website: https://cryptographic-triangles.org
grade: stable
confinement: strict
license: MIT
icon: snap/gui/triangles.png
architectures:
- build-on: amd64
apps:
triangles-qt:
command: bin/triangles-qt
desktop: share/applications/triangles-qt.desktop
plugs:
- desktop
- desktop-legacy
- wayland
- x11
- opengl
- network
- network-bind
- home
- removable-media
environment:
DISABLE_WAYLAND: 1
trianglesd:
command: bin/trianglesd
daemon: simple
plugs:
- network
- network-bind
- home
install-mode: disable
parts:
triangles:
plugin: dump
source: https://github.com/SamiAhmed7777/triangles_v5/releases/download/v6.2.2/Cryptographic-Triangles-v6.2.2-linux-x64-qt
source-type: file
organize:
Cryptographic-Triangles-v6.2.2-linux-x64-qt: bin/triangles-qt
stage-packages:
- libqt5widgets5
- libqt5gui5
- libqt5core5a
- libqt5network5
- libssl3
- libdb5.3++
- libboost-system1.74.0
- libboost-filesystem1.74.0
- libboost-program-options1.74.0
- libboost-thread1.74.0
- libboost-chrono1.74.0
- libevent-2.1-7
- libminiupnpc17
- tor
trianglesd:
plugin: dump
source: https://github.com/SamiAhmed7777/triangles_v5/releases/download/v6.2.2/Cryptographic-Triangles-v6.2.2-linux-x64-daemon
source-type: file
organize:
Cryptographic-Triangles-v6.2.2-linux-x64-daemon: bin/trianglesd
desktop-entry:
plugin: dump
source: snap/gui
organize:
triangles-qt.desktop: share/applications/triangles-qt.desktop
appstream:
plugin: dump
source: packaging/appstream
organize:
org.cryptographic_triangles.TrianglesQt.metainfo.xml: share/metainfo/org.cryptographic_triangles.TrianglesQt.metainfo.xml