chore: initial commit for v0.0.1

DChain single-node blockchain + React Native messenger client.

Core:
- PBFT consensus with multi-sig validator admission + equivocation slashing
- BadgerDB + schema migration scaffold (CurrentSchemaVersion=0)
- libp2p gossipsub (tx/v1, blocks/v1, relay/v1, version/v1)
- Native Go contracts (username_registry) alongside WASM (wazero)
- WebSocket gateway with topic-based fanout + Ed25519-nonce auth
- Relay mailbox with NaCl envelope encryption (X25519 + Ed25519)
- Prometheus /metrics, per-IP rate limit, body-size cap

Deployment:
- Single-node compose (deploy/single/) with Caddy TLS + optional Prometheus
- 3-node dev compose (docker-compose.yml) with mocked internet topology
- 3-validator prod compose (deploy/prod/) for federation
- Auto-update from Gitea via /api/update-check + systemd timer
- Build-time version injection (ldflags → node --version)
- UI / Swagger toggle flags (DCHAIN_DISABLE_UI, DCHAIN_DISABLE_SWAGGER)

Client (client-app/):
- Expo / React Native / NativeWind
- E2E NaCl encryption, typing indicator, contact requests
- Auto-discovery of canonical contracts, chain_id aware, WS reconnect on node switch

Documentation:
- README.md, CHANGELOG.md, CONTEXT.md
- deploy/single/README.md with 6 operator scenarios
- deploy/UPDATE_STRATEGY.md with 4-layer forward-compat design
- docs/contracts/*.md per contract
This commit is contained in:
vsecoder
2026-04-17 14:16:44 +03:00
commit 7e7393e4f8
196 changed files with 55947 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Validators | DChain Explorer</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/assets/explorer/style.css">
<script src="https://unpkg.com/lucide@latest"></script>
<script defer src="/assets/explorer/common.js"></script>
<script defer src="/assets/explorer/validators.js"></script>
</head>
<body>
<header class="topnav">
<div class="topnav-inner">
<a class="topnav-brand" href="/">
<span class="brand-gem"></span>
<span class="brand-name">DChain</span>
</a>
<nav class="topnav-links">
<a href="/contract">Contracts</a>
<a href="/tokens">Tokens</a>
<a href="/validators" style="color:var(--text)">Validators</a>
<a href="/relays">Relay Nodes</a>
</nav>
</div>
</header>
<main class="page-body">
<!-- page header -->
<div class="list-page-header">
<div class="list-page-header-left">
<div class="list-page-icon list-page-icon-val"><i data-lucide="shield-check"></i></div>
<div>
<h1 class="list-page-title">Validator Set</h1>
<p class="list-page-sub">
Active validators participating in PBFT consensus.
Quorum requires ⌊2/3 · N⌋ + 1 votes.
</p>
</div>
</div>
<div class="list-page-header-right">
<div class="list-page-stat">
<div class="list-page-stat-val" id="valCount"></div>
<div class="list-page-stat-label">Validators</div>
</div>
<div class="list-page-stat">
<div class="list-page-stat-val" id="quorumCount"></div>
<div class="list-page-stat-label">Quorum</div>
</div>
<button id="refreshBtn" class="pill-btn"><i data-lucide="refresh-cw"></i> Refresh</button>
</div>
</div>
<div id="status" class="hero-status" style="margin-bottom:12px"></div>
<div class="panel" style="padding:0">
<div class="table-wrap">
<table id="valTable">
<thead>
<tr>
<th style="width:36px">#</th>
<th>Address</th>
<th>Public Key</th>
<th style="width:140px">Actions</th>
</tr>
</thead>
<tbody id="valBody">
<tr><td colspan="4" class="tbl-empty">Loading…</td></tr>
</tbody>
</table>
</div>
</div>
</main>
</body>
</html>