mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-08-12 05:30:27 +02:00
Gate messages now propagate via the Infonet hashchain as encrypted blobs — every node syncs them through normal chain sync while only Gate members with MLS keys can decrypt. Added mesh reputation system, peer push workers, voluntary Wormhole opt-in for node participation, fork recovery, killwormhole scripts, obfuscated terminology, and hardened the self-updater to protect encryption keys and chain state during updates. New features: Shodan search, train tracking, Sentinel Hub imagery, 8 new intelligence layers, CCTV expansion to 11,000+ cameras across 6 countries, Mesh Terminal CLI, prediction markets, desktop-shell scaffold, and comprehensive mesh test suite (215 frontend + backend tests passing). Community contributors: @wa1id, @AlborzNazari, @adust09, @Xpirix, @imqdcr, @csysp, @suranyami, @chr0n1x, @johan-martensson, @singularfailure, @smithbh, @OrfeoTerkuci, @deuza, @tm-const, @Elhard1, @ttulttul
26 lines
543 B
Python
26 lines
543 B
Python
"""Lightweight metrics for mesh protocol health signals."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import threading
|
|
import time
|
|
|
|
_lock = threading.Lock()
|
|
_metrics: dict[str, int] = {}
|
|
_last_updated: float = 0.0
|
|
|
|
|
|
def increment(name: str, count: int = 1) -> None:
|
|
global _last_updated
|
|
with _lock:
|
|
_metrics[name] = _metrics.get(name, 0) + count
|
|
_last_updated = time.time()
|
|
|
|
|
|
def snapshot() -> dict:
|
|
with _lock:
|
|
return {
|
|
"updated_at": _last_updated,
|
|
"counters": dict(_metrics),
|
|
}
|