Commit graph

11 commits

Author SHA1 Message Date
Gulshan Yadav
89c7f176dd feat(sharding): add Phase 14 M3 - Sharding Protocol for 100,000+ TPS
- Add synor-sharding crate with full sharding infrastructure
- Implement ShardState with per-shard Merkle state trees
- Implement VRF-based leader election for shard consensus
- Add CrossShardMessage protocol with receipt-based confirmation
- Implement ShardRouter for address-based transaction routing
- Add ReshardManager for dynamic shard split/merge operations
- Implement ProofAggregator for cross-shard verification

Architecture:
- 32 shards default (configurable up to 1024)
- 3,125 TPS per shard = 100,000 TPS total
- VRF leader rotation every slot
- Atomic cross-shard messaging with timeout handling

Components:
- state.rs: ShardState, ShardStateManager, StateProof
- leader.rs: LeaderElection, VrfOutput, ValidatorInfo
- messaging.rs: CrossShardMessage, MessageRouter, MessageReceipt
- routing.rs: ShardRouter, RoutingTable, LoadStats
- reshard.rs: ReshardManager, ReshardEvent (Split/Merge)
- proof_agg.rs: ProofAggregator, AggregatedProof

Tests: 40 unit tests covering all modules
2026-01-19 20:23:36 +05:30
Gulshan Yadav
688d409b10 feat(dex): add Phase 15 - DEX Ecosystem with Perpetuals Trading
Implements comprehensive DEX infrastructure:

- contracts/perps (81KB WASM):
  - Long/Short positions with 2x-100x leverage
  - Funding rate mechanism (keeps price anchored to spot)
  - Liquidation engine with insurance fund
  - Mark price (EMA) vs index price (oracle)
  - Maintenance margin (0.5%) and initial margin (1%)

- contracts/oracle (80KB WASM):
  - Multi-source price aggregation (median)
  - TWAP (Time-Weighted Average Price)
  - Stale price detection
  - Confidence intervals

- contracts/aggregator (94KB WASM):
  - Cross-chain liquidity routing via IBC
  - Best price discovery across multiple DEXs
  - Split routing for large orders
  - Zero-capital model (aggregation fees only)

This enables dYdX/GMX-style trading without requiring capital.
2026-01-19 19:22:02 +05:30
Gulshan Yadav
49ba05168c feat(privacy): add Phase 14 Milestone 2 - Privacy Layer
Implements comprehensive privacy primitives for confidential transactions:

- synor-privacy crate:
  - Pedersen commitments for hidden amounts with homomorphic properties
  - Simplified range proofs (bit-wise) for value validity
  - Stealth addresses with ViewKey/SpendKey for receiver privacy
  - LSAG ring signatures for sender anonymity
  - Key images for double-spend prevention
  - Confidential transaction type combining all primitives

- contracts/confidential-token:
  - WASM smart contract for privacy-preserving tokens
  - UTXO-based model (similar to Monero/Zcash)
  - Methods: mint, transfer, burn with ring signature verification

42 passing tests, 45KB WASM output.
2026-01-19 17:58:11 +05:30
Gulshan Yadav
6037695afb feat(ibc): add Phase 14 Milestone 1 - Cross-Chain IBC Interoperability
Implements full Inter-Blockchain Communication (IBC) protocol:

synor-ibc crate (new):
- Light client management (create, update, verify headers)
- Connection handshake (4-way: Init, Try, Ack, Confirm)
- Channel handshake (4-way: Init, Try, Ack, Confirm)
- Packet handling (send, receive, acknowledge, timeout)
- Merkle commitment proofs for state verification
- ICS-20 fungible token transfer support
- Atomic swap engine with HTLC (hashlock + timelock)

IBC Bridge Contract (contracts/ibc-bridge):
- Token locking/unlocking for cross-chain transfers
- Relayer whitelist management
- Channel registration and sequence tracking
- HTLC atomic swap (create, claim, refund)
- Event emission for indexing
- 52KB optimized WASM binary

Test coverage: 40 tests passing
2026-01-19 16:51:59 +05:30
Gulshan Yadav
694e62e735 feat(zk): add ZK-rollup foundation with Groth16 proof system
Milestone 3 of Phase 13 - ZK-Rollup Foundation:
- Circuit definitions (Transfer, Batch, Deposit, Withdraw)
- Proof system with Groth16/PLONK/STARK backends
- Sparse Merkle tree state management
- Rollup manager for batch processing

Technical details:
- Uses arkworks library for ZK-SNARKs
- R1CS constraint system with BN254 curve
- 32-depth state tree supporting 4B accounts
- Batch processing with 1000 tx max
2026-01-19 14:10:46 +05:30
Gulshan Yadav
9414ef5d99 feat(crypto): add SPHINCS+ and FALCON post-quantum algorithms
Phase 13 Milestone 2 - Enhanced Quantum Cryptography:

SPHINCS+ (FIPS 205 / SLH-DSA):
- Hash-based signatures as backup if lattice schemes are compromised
- Three variants: 128s (~7.8KB), 192s (~16KB), 256s (~30KB)
- Relies only on hash function security (conservative choice)
- SphincsKeypair, SphincsPublicKey, SphincsSecretKey, SphincsSignature

FALCON (FIPS 206 / FN-DSA):
- Compact lattice signatures for bandwidth-constrained devices
- FALCON-512: 128-bit security, ~690 byte signatures
- FALCON-1024: 256-bit security, ~1,330 byte signatures
- ~79% smaller than Dilithium3 signatures
- Ideal for mobile wallets and L2 batch transactions

Algorithm Comparison:
| Algorithm | Security | Sig Size | Use Case |
|-----------|----------|----------|----------|
| Ed25519 | 128-bit | 64 B | Classical (fast) |
| Dilithium3 | 192-bit | 3,293 B | Default PQ |
| FALCON-512 | 128-bit | 690 B | Mobile/IoT |
| SPHINCS+-128s | 128-bit | 7,856 B | Backup |

All 40 unit tests + 5 doc tests passing.
2026-01-19 09:52:16 +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
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
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
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
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