Commit graph

63 commits

Author SHA1 Message Date
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