Commit graph

48 commits

Author SHA1 Message Date
Gulshan Yadav
e2a6a10bee feat(dag): implement DAGKnight adaptive consensus protocol
Phase 13 Milestone 1 - DAGKnight Protocol Implementation:

- Add LatencyTracker for network propagation delay measurement
  - Rolling statistics (mean, stddev, P95, P99)
  - Anticone growth rate tracking
  - Configurable sample window (1000 samples)

- Implement DagKnightManager extending GHOSTDAG
  - Adaptive k parameter based on observed network latency
  - Probabilistic confirmation time estimation
  - Confidence levels (Low/Medium/High/VeryHigh)
  - ConfirmationStatus with depth and finality tracking

- Add BlockRateConfig for throughput scaling
  - Standard: 10 BPS (100ms block time) - current
  - Enhanced: 32 BPS (31ms block time) - target
  - Maximum: 100 BPS (10ms block time) - stretch goal
  - Auto-adjusted merge/finality/pruning depths per config

- Utility functions for network analysis
  - calculate_optimal_k() for k parameter optimization
  - estimate_throughput() for TPS projection

Based on DAGKnight paper (2022) and Kaspa 2025 roadmap.
2026-01-19 09:46:50 +05:30
Gulshan Yadav
e20e5cb11f docs(phase12): add metering service milestone
Complete Phase 12 Economics & Billing planning with detailed metering service design:
- UsageCollector for real-time metric capture from all compute nodes
- UsageAggregator for time-windowed billing aggregation
- QuotaManager for usage limits and rate limiting
- UsageAnalytics for cost optimization insights
- Comprehensive data flow and implementation plan
2026-01-19 03:01:39 +05:30
Gulshan Yadav
3c9470abba a 2026-01-11 19:05:44 +05:30
Gulshan Yadav
162227dc71 docs(sdk): add comprehensive documentation for all 12 SDKs
Add README.md documentation for:
- Main SDK overview with quick start guides
- JavaScript/TypeScript SDK
- Python SDK
- Go SDK
- Rust SDK
- Java SDK
- Kotlin SDK
- Swift SDK
- Flutter/Dart SDK
- C SDK
- C++ SDK
- C#/.NET SDK
- Ruby SDK

Each README includes:
- Installation instructions
- Quick start examples
- Tensor operations
- Matrix operations (matmul, conv2d, attention)
- LLM inference (single and streaming)
- Configuration options
- Error handling
- Type definitions
2026-01-11 18:05:03 +05:30
Gulshan Yadav
e2a3b66123 test(sdk): add comprehensive unit tests for all SDKs
Adds unit tests covering tensor operations, type enums, client
functionality, and serialization for all 12 SDK implementations:

- JavaScript (Vitest): tensor, types, client tests
- Python (pytest): tensor, types, client tests
- Go: standard library tests with httptest
- Flutter (flutter_test): tensor, types tests
- Java (JUnit 5): tensor, types tests
- Rust: embedded module tests
- Ruby (minitest): tensor, types tests
- C# (xUnit): tensor, types tests

Tests cover:
- Tensor creation (zeros, ones, random, randn, eye, arange, linspace)
- Tensor operations (reshape, transpose, indexing)
- Reductions (sum, mean, std, min, max)
- Activations (relu, sigmoid, softmax)
- Serialization/deserialization
- Type enums and configuration
- Client request building
- Error handling
2026-01-11 17:56:11 +05:30
Gulshan Yadav
3aff77a799 feat(sdk): add consumer SDKs for Java, Kotlin, Swift, C, C++, C#, Ruby, and Rust
Expands SDK support to 8 additional languages/frameworks:
- Java SDK with Maven/OkHttp/Jackson
- Kotlin SDK with Gradle/Ktor/kotlinx.serialization
- Swift SDK with Swift Package Manager/async-await
- C SDK with CMake/libcurl
- C++ SDK with CMake/Modern C++20
- C# SDK with .NET 8.0/HttpClient
- Ruby SDK with Bundler/Faraday
- Rust SDK with Cargo/reqwest/tokio

All SDKs include:
- Tensor operations (matmul, conv2d, attention)
- LLM inference with streaming support
- Model registry, pricing, and usage APIs
- Builder patterns where idiomatic
- Full type safety
2026-01-11 17:46:22 +05:30
Gulshan Yadav
f56a6f5088 feat(wallet): add OS keychain integration with biometric unlock
Add cross-platform keychain support using the keyring crate for secure
credential storage with biometric authentication (TouchID on macOS,
Windows Hello on Windows, Secret Service on Linux).

- Add keychain module with enable/disable biometric unlock
- Add Tauri commands for keychain operations
- Add Keychain error variant for proper error handling
- Add Java SDK foundation
- Update milestone docs to reflect 95% completion
2026-01-11 17:31:21 +05:30
Gulshan Yadav
cb071a7a3b feat(sdk/flutter): add dataset upload APIs and comprehensive examples
Add comprehensive dataset management to the Flutter SDK including:
- Dataset formats: JSONL, CSV, Parquet, Arrow, HuggingFace, TFRecord, WebDataset, Text, ImageFolder, Custom
- Dataset types: text completion, instruction tuning, chat, Q&A, classification, NER, vision, audio
- Upload methods: uploadDataset, uploadDatasetFromFile, createDatasetFromRecords
- Management APIs: listDatasets, getDataset, deleteDataset
- Dataset preprocessing: splitting, shuffling, deduplication, tokenization
- Complete examples showing all formats and use cases
2026-01-11 16:47:47 +05:30
Gulshan Yadav
89fc542da4 feat(compute): add model registry and training APIs
Adds comprehensive model management and training capabilities:

synor-compute (Rust):
- ModelRegistry with pre-registered popular models
  - LLMs: Llama 3/3.1, Mistral, Mixtral, Qwen, DeepSeek, Phi, CodeLlama
  - Embedding: BGE, E5
  - Image: Stable Diffusion XL, FLUX.1
  - Speech: Whisper
  - Multi-modal: LLaVA
- ModelInfo with parameters, format, precision, context length
- Custom model upload and registration
- Model search by name/category

Flutter SDK:
- Model registry APIs: listModels, getModel, searchModels
- Custom model upload with multipart upload
- Training APIs: train(), fineTune(), trainStream()
- TrainingOptions: framework, epochs, batch_size, learning_rate
- TrainingProgress for real-time updates
- ModelUploadOptions and ModelUploadResult

Example code for:
- Listing available models by category
- Fine-tuning pre-trained models
- Uploading custom Python/ONNX models
- Streaming training progress

This enables users to:
1. Use pre-registered models like 'llama-3-70b'
2. Upload their own custom models
3. Fine-tune models on custom datasets
4. Track training progress in real-time
2026-01-11 15:22:26 +05:30
Gulshan Yadav
62ec3c92da feat(sdk): add Flutter/Dart SDK for Synor Compute
Complete SDK implementation for Flutter and Dart applications:

lib/src/types.dart:
- Precision, ProcessorType, Priority, JobStatus enums
- SynorConfig for client configuration
- MatMulOptions, Conv2dOptions, AttentionOptions, InferenceOptions
- PricingInfo and UsageStats data classes
- SynorException for error handling

lib/src/tensor.dart:
- Full Tensor class with shape, dtype, and data
- Factory constructors: zeros, ones, rand, randn, eye, linspace, arange
- Operations: reshape, transpose, flatten
- Statistics: sum, mean, std, min, max, argmin, argmax
- Element-wise: add, sub, mul, div, scalar ops
- Activations: relu, sigmoid, tanh, softmax
- JSON serialization with base64-encoded binary data

lib/src/job.dart:
- JobResult with status, result, timing, and cost
- Job class with WebSocket streaming and HTTP polling
- JobStatusUpdate for real-time progress tracking
- JobBatch for parallel job management

lib/src/client.dart:
- SynorCompute main client
- Operations: matmul, conv2d, attention, elementwise, reduce
- LLM inference with streaming support
- Tensor upload/download/delete
- Job management: submit, cancel, list
- Pricing and usage statistics

Platform support: Android, iOS, Linux, macOS, Web, Windows
2026-01-11 14:27:55 +05:30
Gulshan Yadav
a808bb37a6 feat(sdk): add consumer SDKs for JavaScript, Python, and Go
Add complete SDK implementations for accessing Synor Compute:

JavaScript/TypeScript SDK (sdk/js/):
- Full async/await API with TypeScript types
- Tensor operations: matmul, conv2d, attention
- Model inference with streaming support
- WebSocket-based job monitoring
- Browser and Node.js compatible

Python SDK (sdk/python/):
- Async/await with aiohttp
- NumPy integration for tensors
- Context managers for cleanup
- Type hints throughout
- PyPI-ready package structure

Go SDK (sdk/go/):
- Idiomatic Go with context support
- Efficient binary tensor serialization
- HTTP client with configurable timeouts
- Zero external dependencies (stdlib only)

All SDKs support:
- Matrix multiplication (FP64 to INT4 precision)
- Convolution operations (2D, 3D)
- Flash attention
- LLM inference
- Spot pricing queries
- Job polling and cancellation
- Heterogeneous compute targeting (CPU/GPU/TPU/NPU/LPU)
2026-01-11 14:11:58 +05:30
Gulshan Yadav
771f4f83ed feat(compute): integrate synor-compute with VM and hosting layers
VM Integration:
- Add compute module with offloadable operations support
- Enable distributed execution for heavy VM operations
- Support batch signature verification, merkle proofs, hashing
- Add ComputeContext for managing compute cluster connections
- Feature-gated behind 'compute' flag

Hosting Integration:
- Add edge compute module for serverless functions
- Support edge functions (WASM, JS, Python runtimes)
- Enable server-side rendering and image optimization
- Add AI/ML inference at the edge
- Feature-gated behind 'compute' flag

Docker Deployment:
- Add docker-compose.compute.yml for compute layer
- Deploy orchestrator, CPU workers, WASM worker, spot market
- Include Redis for task queue and Prometheus for metrics
- Reserved ports: 17250-17290 for compute services
2026-01-11 14:05:45 +05:30
Gulshan Yadav
4c36ddbdc2 feat(compute): add Phase 11 Synor Compute L2 heterogeneous compute layer
- Add synor-compute crate for heterogeneous compute orchestration
- Implement processor abstraction for CPU/GPU/TPU/NPU/LPU/FPGA/DSP
- Add device registry with cross-vendor capability tracking
- Implement task scheduler with work stealing and load balancing
- Add energy-aware and latency-aware balancing strategies
- Create spot market for compute resources with order matching
- Add memory manager with tensor handles and cross-device transfers
- Support processor capability profiles (H100, TPU v5p, Groq LPU, etc.)
- Implement priority work queues with task decomposition

Processor types supported:
- CPU (x86-64 AVX512, ARM64 SVE, RISC-V Vector)
- GPU (NVIDIA CUDA, AMD ROCm, Intel OneAPI, Apple Metal)
- TPU (v2-v5p, Edge TPU)
- NPU (Apple Neural Engine, Qualcomm Hexagon, Intel VPU)
- LPU (Groq Language Processing Unit)
- FPGA (Xilinx, Intel Altera)
- DSP (TI, Analog Devices)
- WebGPU and WASM runtimes
2026-01-11 13:53:57 +05:30
Gulshan Yadav
8da34bc73d feat(database): add SQL, Graph, and Raft Replication modules
- SQL store with SQLite-compatible subset (sqlparser 0.43)
  - CREATE TABLE, INSERT, SELECT, UPDATE, DELETE
  - WHERE clauses, ORDER BY, LIMIT
  - Aggregates (COUNT, SUM, AVG, MIN, MAX)
  - UNIQUE and NOT NULL constraints
  - BTreeMap-based indexes

- Graph store for relationship-based queries
  - Nodes with labels and properties
  - Edges with types and weights
  - BFS/DFS traversal
  - Dijkstra shortest path
  - Cypher-like query parser (MATCH, CREATE, DELETE, SET)

- Raft consensus replication for high availability
  - Leader election with randomized timeouts
  - Log replication with AppendEntries RPC
  - Snapshot management for log compaction
  - Cluster configuration and joint consensus
  - Full RPC message serialization

All 159 tests pass.
2026-01-10 19:32:14 +05:30
Gulshan Yadav
ab4c967a97 feat(database): complete Phase 10 Database Gateway
Add HTTP REST API gateway for Synor Database L2:

- Gateway server with Axum HTTP framework
- API key authentication with permissions and rate limiting
- Full REST endpoints for all database models:
  - Key-Value: GET/PUT/DELETE /kv/:key, POST /kv/batch
  - Documents: CRUD operations, MongoDB-style queries
  - Vectors: embedding insert, similarity search
  - Time-series: metrics recording and queries
- Usage metering for billing integration
- CORS and request timeout configuration

All 51 tests passing. Phase 10 now complete (100%).
2026-01-10 18:11:13 +05:30
Gulshan Yadav
78c226a098 feat(database): add Phase 10 Synor Database L2 foundation
Multi-model database layer for Synor blockchain:

- Key-Value Store: Redis-compatible API with TTL, INCR, MGET/MSET
- Document Store: MongoDB-compatible queries with filters
- Vector Store: AI/RAG optimized with cosine, euclidean, dot product similarity
- Time-Series Store: Metrics with downsampling and aggregations
- Query Engine: Unified queries across all data models
- Index Manager: B-tree, hash, unique, and compound indexes
- Schema Validator: Field validation with type checking
- Database Pricing: Pay-per-use model (0.1 SYNOR/GB/month)

Updates roadmap with Phase 10-12 milestones:
- Phase 10: Synor Database L2
- Phase 11: Economics & Billing
- Phase 12: Fiat Gateway (Ramp Network integration)

41 tests passing
2026-01-10 17:40:18 +05:30
Gulshan Yadav
47a04244ec feat(vm): add VM optimizations for performance and scalability
Add four major optimization modules to synor-vm:

- scheduler.rs: Sealevel-style parallel execution scheduler with access
  set declarations, conflict detection, and batch scheduling for 10-100x
  throughput on non-conflicting transactions

- tiered.rs: Multi-tier JIT compilation (Cold/Warm/Hot) with LRU caching
  and automatic tier promotion based on execution frequency

- compression.rs: Bytecode compression using zstd (40-70% size reduction),
  content-defined chunking for deduplication, and delta encoding for
  efficient contract upgrades

- speculation.rs: Speculative execution engine with hot state caching,
  version tracking, snapshot/rollback support for 30-70% latency reduction

All modules include comprehensive test coverage (57 tests passing).
2026-01-10 14:53:28 +05:30
Gulshan Yadav
c829362729 feat(cli): add deploy command for Synor Hosting
Add `synor deploy` command group for deploying web applications:
- `synor deploy push` - upload project to Synor Hosting
- `synor deploy init` - create synor.json configuration
- `synor deploy list` - list all deployments
- `synor deploy delete` - remove a deployment

Features:
- synor.json configuration parsing with build/routes/headers
- Framework auto-detection (Next.js, Vite, Astro, Angular, SvelteKit)
- Build command execution with install support
- Multipart file upload to storage gateway
- Deployment name validation with reserved word protection
- Content type detection for 20+ MIME types

Also adds Phase 9 milestone documentation and marks Synor Hosting
as 100% complete in the roadmap.
2026-01-10 12:59:35 +05:30
Gulshan Yadav
d13597b67e docs: update Phase 9 progress to 75% with hosting gateway complete 2026-01-10 12:45:59 +05:30
Gulshan Yadav
e23a56049c feat(hosting): add hosting gateway server with Docker deployment
Add HTTP server for Synor Hosting with:

- server/mod.rs: Gateway server using axum
- server/handler.rs: Request routing to storage, content type detection
- server/middleware.rs: Token bucket rate limiting, cache control, metrics
- server/ssl.rs: Let's Encrypt auto-provisioning (stub)
- bin/hosting-gateway.rs: CLI binary with env var config

Docker deployment:
- docker/hosting-gateway/Dockerfile: Multi-stage build
- docker/hosting-gateway/Caddyfile: Wildcard HTTPS for *.synor.cc
- docker-compose.hosting.yml: Full hosting stack with Caddy

37 tests passing.
2026-01-10 12:45:26 +05:30
Gulshan Yadav
f2abc6f48f docs: update roadmap with Phase 8 (Storage L2) and Phase 9 (Hosting)
Add detailed breakdowns for:
- Phase 8: Synor Storage L2 (complete) - CID, chunking, erasure coding,
  proofs, deals, nodes, gateway
- Phase 9: Synor Hosting (40%) - name registry, domain verification,
  routing, synor.json config

Remaining hosting work: gateway server, CLI deploy, admin dashboard.
2026-01-10 12:35:20 +05:30
Gulshan Yadav
a70b2c765c feat(hosting): add Synor Hosting subdomain-based web hosting
Add synor-hosting crate for decentralized web hosting with:

- Name Registry: On-chain name→CID mapping with ownership, expiry,
  and custom domain linking
- Domain Verification: CNAME/TXT DNS verification for custom domains
- Hosting Router: Host-based routing with SPA support, redirects,
  and custom headers
- synor.json: Project configuration for build, routes, and error pages

Users can deploy to myapp.synor.cc and optionally link custom domains.

23 tests passing.
2026-01-10 12:34:07 +05:30
Gulshan Yadav
f5bdef2691 feat(storage): add Synor Storage L2 decentralized storage layer
Complete implementation of the Synor Storage Layer (L2) for decentralized
content storage. This enables permanent, censorship-resistant storage of
any file type including Next.js apps, Flutter apps, and arbitrary data.

Core modules:
- cid.rs: Content addressing with Blake3/SHA256 hashing (synor1... format)
- chunker.rs: File chunking for parallel upload/download (1MB chunks)
- erasure.rs: Reed-Solomon erasure coding (10+4 shards) for fault tolerance
- proof.rs: Storage proofs with Merkle trees for verification
- deal.rs: Storage deals and market economics (3 pricing tiers)

Infrastructure:
- node/: Storage node service with P2P networking and local storage
- gateway/: HTTP gateway for browser access with LRU caching
- Docker deployment with nginx load balancer

Architecture:
- Operates as L2 alongside Synor L1 blockchain
- Storage proofs verified on-chain for reward distribution
- Can lose 4 shards per chunk and still recover data
- Gateway URLs: /synor1<cid> for content access

All 28 unit tests passing.
2026-01-10 11:42:03 +05:30
Gulshan Yadav
ac3b31d491 feat: add synor.cc landing page and zero-cost deployment plan
- Add React landing page with TailwindCSS + Framer Motion for synor.cc
- Add Docker deployment configs for explorer-web and website
- Create comprehensive zero-cost deployment plan using:
  - Vercel (free tier) for all frontends
  - Supabase (free tier) for PostgreSQL
  - Upstash (free tier) for Redis rate limiting
  - Oracle Cloud Always Free for blockchain nodes (24GB RAM)
- Update Phase 7 documentation with current status

Total estimated cost: $0-1/month for production deployment
2026-01-10 09:26:21 +05:30
Gulshan Yadav
f23e7928ea fix(desktop-wallet): update crypto APIs for bech32 v0.11 and bip39 v2
- Update bech32 encoding to use Hrp struct and segwit::encode
- Update bip39 to use from_entropy() instead of generate_in()
- Update Mnemonic::parse() instead of parse_in(Language)
- Fix HMAC ambiguity with explicit type annotation
- Add Debug and Clone derives to EncryptedWallet
- Use show_menu_on_left_click() (deprecation fix)
- Add placeholder icons for development builds
2026-01-10 07:08:47 +05:30
Gulshan Yadav
ce5c996b35 feat(desktop-wallet): add system tray and auto-updater
- Add system tray with menu: Show, Hide, Lock, Check Updates, Quit
- Integrate tauri-plugin-updater for seamless auto-updates
- Add UpdateBanner component for update notifications
- Add useAutoUpdater hook for update state management
- Add useTrayEvents hook for tray event handling
- Add Updates section to Settings page for manual update checks
- Configure updater endpoints in tauri.conf.json
- Exclude desktop-wallet from Cargo workspace (uses own Tauri deps)
2026-01-10 06:55:44 +05:30
Gulshan Yadav
a6233f285d docs: add developer tutorial series
Create comprehensive step-by-step tutorials:
- Tutorial 1: Getting Started - node setup, wallet creation, transactions
- Tutorial 2: Building a Wallet - React app with state management, encryption
- Tutorial 3: Smart Contracts - Rust WASM contracts, token example, testing
- Tutorial 4: API Guide - JSON-RPC, WebSocket subscriptions, client building

Each tutorial includes working code examples and best practices.
2026-01-10 06:24:51 +05:30
Gulshan Yadav
960c25eb8a docs: add comprehensive exchange integration guide
- Document network overview and confirmation requirements
- Provide node setup instructions with Docker
- Explain address generation for hot/cold wallets
- Detail deposit monitoring via WebSocket and polling
- Document withdrawal transaction building
- Explain hybrid signature format (Ed25519 + Dilithium3)
- Include complete API reference
- Add security recommendations for exchange operations
- Document testnet environment for testing
2026-01-10 06:20:35 +05:30
Gulshan Yadav
4a2825f516 feat(api): add public API gateway with rate limiting
- Create API gateway service with Express.js
- Implement sliding window rate limiting via Redis
- Add API key management with tiered access (free/developer/enterprise)
- Track usage analytics per key and globally
- Add RPC proxy to blockchain nodes
- Configure Docker Compose with api-gateway and redis services
- Free tier: 100 req/min, Developer: 1000 req/min, Enterprise: unlimited
2026-01-10 06:19:08 +05:30
Gulshan Yadav
d121759d2c feat(web-wallet): add multi-language support (i18n)
- Add i18next, react-i18next, and browser language detection
- Create translations for 6 languages: English, Chinese, Spanish, Korean, Japanese, Russian
- Add LanguageSelector component for settings page
- Integrate language selection into Settings page with translated security options
- Language preference persists to localStorage
2026-01-10 06:12:10 +05:30
Gulshan Yadav
fd7f6446ea feat(web-wallet): add hardware wallet support (Ledger/Trezor)
- Add hardware-wallet.ts with Ledger and Trezor integration
- Create HardwareWalletConnect.tsx component for wallet selection UI
- Add Hardware Wallet section to Settings page
- Support WebHID transport for Ledger (Nano S/X/S Plus)
- Support Trezor Connect for Trezor Model T/One
- Implement hybrid signature flow for hardware wallets:
  - Ed25519 signed on hardware device (key never leaves device)
  - Dilithium3 requested from server (for post-quantum protection)

Dependencies added:
- @ledgerhq/hw-transport-webhid: WebHID transport for Ledger
- @trezor/connect-web: Trezor Connect integration

Note: Hardware wallets don't support Dilithium3 yet, so the hybrid
signature scheme uses server-side Dilithium signing with Ed25519 proof.
2026-01-10 06:03:24 +05:30
Gulshan Yadav
a439389943 feat(web-wallet): add QR code generation and scanning support
- Add QRCode component using qrcode.react (SVG-based, H error correction)
- Add QRScanner component using html5-qrcode for camera-based scanning
- Update Receive page with real QR code and payment request amount
- Update Send page with QR scan button to auto-fill recipient address
- Support Synor payment URI format: synor:address?amount=X
- Add Dockerfile for web wallet with nginx serving
- Add web-wallet service to docker-compose.testnet.yml (port 17300)
- Fix TypeScript WebCrypto ArrayBuffer type issues

QR features:
- SVG rendering for crisp display at any size
- Error correction level H (30% recovery) for printed codes
- Camera permission handling with user-friendly error states
- Auto-fill amount when scanning payment requests
2026-01-10 05:53:34 +05:30
Gulshan Yadav
e0475176c5 docs: update ecosystem milestone progress after Dilithium3 WASM completion 2026-01-10 05:35:13 +05:30
Gulshan Yadav
3041c6d654 feat(crypto-wasm): add deterministic Dilithium3 key derivation and hybrid signatures
This commit enables full wallet recovery from BIP-39 mnemonics by implementing
deterministic Dilithium3 key derivation using HKDF-SHA3-256 with domain separation.

Changes:
- crates/synor-crypto-wasm: Implement deterministic Dilithium keygen
  - Use HKDF with info="synor:dilithium:v1" for key derivation
  - Enable pqc_dilithium's crypto_sign_keypair via dilithium_kat cfg flag
  - Add proper memory zeroization on drop
  - Add tests for deterministic key generation

- apps/web: Update transaction signing for hybrid signatures
  - Add signTransactionHybrid() for Ed25519 + Dilithium3 signatures
  - Add createSendTransactionHybrid() for quantum-resistant transactions
  - Update fee estimation for larger hybrid signature size (~5.5KB/input)
  - Maintain legacy Ed25519-only functions for backwards compatibility

- WASM module: Rebuild with deterministic keygen
  - Update synor_crypto_bg.wasm with new implementation
  - Module size reduced to ~470KB (optimized)

- Documentation updates:
  - Update mobile wallet plan: React Native -> Flutter
  - Add testnet-first approach note
  - Update explorer frontend progress to 90%
2026-01-10 05:34:26 +05:30
Gulshan Yadav
6b5a232a5e feat: Desktop wallet, gas estimator UI, and 30-day monitoring stack
Security (Desktop Wallet):
- Implement BIP39 mnemonic generation with cryptographic RNG
- Add Argon2id password-based key derivation (64MB, 3 iterations)
- Add ChaCha20-Poly1305 authenticated encryption for seed storage
- Add mnemonic auto-clear (60s timeout) and clipboard auto-clear (30s)
- Add sanitized error logging to prevent credential leaks
- Strengthen CSP with object-src, base-uri, form-action, frame-ancestors
- Clear sensitive state on component unmount

Explorer (Gas Estimator):
- Add Gas Estimation page with from/to/amount/data inputs
- Add bech32 address validation (synor1/tsynor1 prefix)
- Add BigInt-based amount parsing to avoid floating point errors
- Add production guard for mock mode (cannot enable in prod builds)

Monitoring (30-day Testnet):
- Add Prometheus config with 30-day retention
- Add comprehensive alert rules for node health, consensus, network, mempool
- Add Alertmanager with severity-based routing and inhibition rules
- Add Grafana with auto-provisioned datasource and dashboard
- Add Synor testnet dashboard with uptime SLA tracking

Docker:
- Update docker-compose.testnet.yml with monitoring profile
- Fix node-exporter for macOS Docker Desktop compatibility
- Change Grafana port to 3001 to avoid conflict
2026-01-10 04:38:09 +05:30
Gulshan Yadav
1606776394 feat: Phase 7 critical tasks - security, formal verification, WASM crypto
## Formal Verification
- Add TLA+ specs for UTXO conservation (formal/tla/UTXOConservation.tla)
- Add TLA+ specs for GHOSTDAG ordering (formal/tla/GHOSTDAGOrdering.tla)
- Add mathematical proof of DAA convergence (formal/proofs/)
- Document Kani verification approach (formal/kani/)

## Bug Bounty Program
- Add SECURITY.md with vulnerability disclosure process
- Add docs/BUG_BOUNTY.md with $500-$100,000 reward tiers
- Define scope, rules, and response SLA

## Web Wallet Dilithium3 WASM Integration
- Build WASM module via Docker (498KB optimized)
- Add wasm-crypto.ts lazy loader for Dilithium3
- Add createHybridSignatureLocal() for full client-side signing
- Add createHybridSignatureSmart() for auto-mode selection
- Add Dockerfile.wasm and build scripts

## Security Review ($0 Approach)
- Add .github/workflows/security.yml CI workflow
- Add deny.toml for cargo-deny license/security checks
- Add Dockerfile.security for audit container
- Add scripts/security-audit.sh for local audits
- Configure cargo-audit, cargo-deny, cargo-geiger, gitleaks
2026-01-10 01:40:03 +05:30
Gulshan Yadav
16c7e87a66 fix(explorer): fix RPC method calls and add WebSocket support
- Fix health check to use RPC call instead of GET /health
- Update API endpoints to use correct RPC method names:
  - synor_getInfo, synor_getMiningInfo, synor_getTips
  - synor_getBlockCount, synor_getBlueScore, synor_getBlocksByBlueScore
- Fix response format handling (synor_getTips returns {tips: [...]})
- Add WebSocket endpoint at /ws for real-time updates:
  - stats_update events (every second)
  - new_block events on block detection
  - tip_update events on DAG changes
- Add ws feature to axum and tokio-tungstenite dependency
2026-01-08 13:15:40 +05:30
Gulshan Yadav
4d7171f4bf a 2026-01-08 09:24:26 +05:30
Gulshan Yadav
6094319ddf feat(crypto-wasm): add Dilithium3 post-quantum signatures
Implements WASM-compatible Dilithium3 (ML-DSA-65) signatures using the
pure Rust pqc_dilithium crate. This provides NIST Security Category 3
post-quantum signature support for the web wallet.

Changes:
- Add pqc_dilithium dependency with WASM feature
- Create DilithiumSigningKey wrapper for WASM bindings
- Add dilithiumVerify and dilithiumSizes helper functions
- Update tests to work on both native and WASM targets
- Update README to reflect completed Dilithium3 support

Key sizes (Dilithium3 / ML-DSA-65):
- Public Key: 1,952 bytes
- Signature: 3,293 bytes
2026-01-08 07:31:36 +05:30
Gulshan Yadav
b22c1b89f0 feat: Phase 7 production readiness improvements
- Add SYNOR_BOOTSTRAP_PEERS env var for runtime seed node configuration
- Implement secrets provider abstraction for faucet wallet key security
  (supports file-based secrets in /run/secrets for production)
- Create WASM crypto crate foundation for web wallet (Ed25519, BIP-39)
- Add DEPLOYMENT.md guide for testnet deployment
- Add SECURITY_AUDIT_SCOPE.md for external security audit preparation
- Document seed node deployment process in synor-network

Security improvements:
- Faucet now auto-detects /run/secrets for secure key storage
- CORS already defaults to specific origins (https://faucet.synor.cc)
- Bootstrap peers now configurable at runtime without recompilation
2026-01-08 07:21:14 +05:30
Gulshan Yadav
8bdc9d6086 style: apply cargo fmt formatting 2026-01-08 06:23:23 +05:30
Gulshan Yadav
5c643af64c fix: resolve all clippy warnings for CI
Fix all Rust clippy warnings that were causing CI failures when built
with RUSTFLAGS=-Dwarnings. Changes include:

- Replace derivable_impls with derive macros for BlockBody, Network, etc.
- Use div_ceil() instead of manual implementation
- Fix should_implement_trait by renaming from_str to parse
- Add type aliases for type_complexity warnings
- Use or_default(), is_some_and(), is_multiple_of() where appropriate
- Remove needless borrows and redundant closures
- Fix manual_strip with strip_prefix()
- Add allow attributes for intentional patterns (too_many_arguments,
  needless_range_loop in cryptographic code, assertions_on_constants)
- Remove unused imports, mut bindings, and dead code in tests
2026-01-08 05:58:22 +05:30
Gulshan Yadav
8dac870e5e chore: add .vite to gitignore 2026-01-08 05:22:24 +05:30
Gulshan Yadav
d917f1ed22 style: format all Rust code with cargo fmt 2026-01-08 05:22:24 +05:30
Gulshan Yadav
ae0a9d7cfa fix(ci): correct rust-toolchain action name
Changed dtolnay/rust-action to dtolnay/rust-toolchain
2026-01-08 05:22:18 +05:30
Gulshan Yadav
ef9a8cd50f ci: add GitHub Actions workflows
- CI workflow for Rust and web builds
- Release workflow for automated releases
2026-01-08 05:22:17 +05:30
Gulshan Yadav
65b55637d8 chore: remove workflows temporarily for initial push 2026-01-08 05:22:17 +05:30
Gulshan Yadav
48949ebb3f Initial commit: Synor blockchain monorepo
A complete blockchain implementation featuring:
- synord: Full node with GHOSTDAG consensus
- explorer-web: Modern React blockchain explorer with 3D DAG visualization
- CLI wallet and tools
- Smart contract SDK and example contracts (DEX, NFT, token)
- WASM crypto library for browser/mobile
2026-01-08 05:22:17 +05:30