Skip to content

Releases: trusts-stack-network/trust-stack-network

v1.6.1 — Security + telemetry + complete work-comparison removal

02 Apr 20:42

Choose a tag to compare

Security: admin endpoints localhost-only. All peer cumulative_work comparisons removed. Telemetry endpoints for dashboard. Validation mode now properly blocks auto-repair.

v1.6.0 — Anti-Fork: Height-based sync, deterministic work, self-healing

02 Apr 18:22

Choose a tag to compare

Breaking Change: Fork choice by height

Fork detection no longer uses peer-reported cumulative_work (which diverged between fast-synced nodes). Sync now uses height only for peer comparison, with checkpoints for security.

Deterministic cumulative_work

Work is accumulated block-by-block in insert_block_internal() using the formula work[N] = work[N-1] + difficulty[N] (same as Bitcoin/Dilithion). No more estimation, no more divergence.

Self-healing watchdog

Built-in 30-second health check loop:

  • Stuck height (5+ min) → auto wipe + fast-sync
  • Resync loop (3+ in 5 min) → full wipe + fresh sync
  • All peers banned → clears ban list
  • Checkpoint violation → auto re-sync

370 tests passing. MINIMUM_VERSION: 1.6.0

All nodes auto-update within 5 minutes.

v1.5.1 — Fix fast-sync node reconnection

02 Apr 15:21

Choose a tag to compare

Critical fix: fast-synced nodes could ban all valid peers due to placeholder hash comparison. Now verifies peer checkpoints before deciding to ban or re-sync.

v1.5.0 — Anti-Fork: Checkpoints, Reorg Lock, Peer Banning, WAL

02 Apr 14:36

Choose a tag to compare

Anti-Fork Overhaul

Complete fork prevention system inspired by Dilithion's battle-tested approach.

Hardcoded Checkpoints

  • 6 checkpoint hashes at heights 18500-21000
  • Nodes on wrong chain forced to re-sync at startup
  • Deep violations: automatic DB wipe + fresh sync

Reorg Lock

  • Mining blocked during rollback+sync (TokioRwLock)
  • Stale block detection: blocks mined on old tip are discarded
  • Eliminates the race condition causing infinite fork loops

Peer Banning

  • 30 min ban for incompatible chain (no common ancestor)
  • 1 hour ban for checkpoint violations
  • Auto-cleanup of expired bans

Write-Ahead Log (WAL)

  • Crash during rollback detected at boot → automatic recovery
  • Prevents corrupted chain state

Auto-Checkpoints

  • Block hash saved every 500 blocks — no manual update needed

Impact

  • External miners on divergent chains are automatically banned
  • Mining cannot produce stale blocks during reorgs
  • 370 tests passing

MINIMUM_VERSION: 1.5.0 — all nodes will auto-update within 5 minutes.

v1.4.3 — Consistent cumulative_work estimation

02 Apr 10:25

Choose a tag to compare

Fix: all nodes now estimate missing blocks' work using MIN_DIFFICULTY (1500000) instead of variable avg_diff. This ensures identical cumulative_work across all fast-synced nodes.

v1.4.2 — Fix cumulative_work inflation

02 Apr 09:50

Choose a tag to compare

Fixes

  • cumulative_work inflation: Fast-sync was blindly trusting peer's claimed cumulative_work, causing ~2x work inflation on some nodes. Now always recalculated from actual block difficulties at boot.
  • Auto-update SHA256 mismatch: GitHub SHA256 is now fetched from the companion .sha256 file, not the fallback manifest. Fixes the auto-update loop where nodes downloaded but couldn't verify.
  • MINIMUM_VERSION: Bumped to 1.4.2

Impact

All nodes must update to v1.4.2. Auto-update will handle this automatically within 5 minutes.

v1.4.1 — Never Wipe Chain: Remove reset_for_resync()

02 Apr 01:46

Choose a tag to compare

Critical Fix

  • Never wipe the chain: Removed ALL calls to reset_for_resync(). When chains are incompatible (no common ancestor, fork confirmed, stuck), the node now keeps its chain and skips the incompatible peer instead of wiping everything. This was the root cause of catastrophic chain loss in v1.3.6-v1.4.0.

Full Changelog: v1.4.0...v1.4.1

v1.4.0 — Consensus Security Overhaul

02 Apr 00:40

Choose a tag to compare

Consensus Security Overhaul

Major upgrade fixing 19 bugs in fork resolution, snapshot validation, and self-healing. This is a breaking consensus change — all nodes must upgrade.

Critical Fixes

  • Heaviest chain rule: Fork choice now ALWAYS uses cumulative_work instead of height. Prevents spam attacks with low-difficulty blocks.
  • Persistent work index: New sled DB tree stores cumulative_work per height. Survives LRU eviction and restarts.
  • PoW validation in trusted mode: add_block_trusted() now verifies Proof-of-Work and MIN_DIFFICULTY. No more importing invalid blocks during fast-sync.
  • Orphan PoW validation: Orphan pool rejects blocks with invalid PoW before storing. Prevents pool pollution attacks.
  • Graduated difficulty post fast-sync: 25% tolerance within LWMA window, then strict 10%.
  • Accurate rollback work: Uses DB-stored cumulative_work instead of difficulty × depth estimation.

Network Improvements

  • Peer selection by work: Fast-sync, stuck detection, and auto-resync select peers by cumulative_work, not height alone.
  • Multi-peer agreement: Auto-resync requires at least 2 peers agreeing (within 5% of max work).
  • Peer work verification: New verify_peer_work_sample() samples blocks to validate claimed work.
  • Faster snapshots: Trusted mode interval reduced from 500 to 50 blocks.
  • Conservative estimates: When peer work unavailable, uses MIN_DIFFICULTY × height (safe lower bound).

Upgrade

MINIMUM_VERSION raised to 1.4.0 — all nodes must update. Auto-update handles this within 5 minutes.

Downloads

  • Linux x86_64: Attached below
  • Windows x86_64: Built by GitHub Actions (available shortly)
  • macOS aarch64: Built by GitHub Actions (available shortly)

Full Changelog: v1.3.9...v1.4.0

v1.3.9 — Heaviest Chain Rule: Fork Resolution by Cumulative Work

01 Apr 22:59

Choose a tag to compare

Critical Fix

  • Heaviest chain rule: Fork resolution now uses cumulative_work (like Bitcoin) instead of height. A shorter chain with more work is the correct chain. A longer chain with less work (spam attack with low-difficulty blocks) is rejected. This prevents fork attacks where an external node mines thousands of easy blocks to trick seeds into following the wrong chain.

Full Changelog: v1.3.8...v1.3.9

v1.3.8 — P2P Peer Role Display Fix

01 Apr 22:42

Choose a tag to compare

Fix

  • Peer role retention: Keep last known protocol/role when a peer temporarily disconnects, preventing nodes.html from showing all peers as "seed"
  • Default role fallback: Unknown peers now default to /relay suffix instead of no role
  • MINIMUM_VERSION: bumped to 1.3.8

Full Changelog: v1.3.7...v1.3.8