Commit Graph

2 Commits

Author SHA1 Message Date
Aaron D. Lee
490f9d4a1d Rebrand SooSeF to FieldWitness
Complete project rebrand for better positioning in the press freedom
and digital security space. FieldWitness communicates both field
deployment and evidence testimony — appropriate for the target audience
of journalists, NGOs, and human rights organizations.

Rename mapping:
- soosef → fieldwitness (package, CLI, all imports)
- soosef.stegasoo → fieldwitness.stego
- soosef.verisoo → fieldwitness.attest
- ~/.soosef/ → ~/.fwmetadata/ (innocuous data dir name)
- SOOSEF_DATA_DIR → FIELDWITNESS_DATA_DIR
- SoosefConfig → FieldWitnessConfig
- SoosefError → FieldWitnessError

Also includes:
- License switch from MIT to GPL-3.0
- C2PA bridge module (Phase 0-2 MVP): cert.py, export.py, vendor_assertions.py
- README repositioned to lead with provenance/federation, stego backgrounded
- Threat model skeleton at docs/security/threat-model.md
- Planning docs: docs/planning/c2pa-integration.md, docs/planning/gtm-feasibility.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:05:13 -04:00
Aaron D. Lee
2a6900abed Implement live gossip federation server (5 phases)
Some checks failed
CI / lint (push) Failing after 1m3s
CI / typecheck (push) Failing after 32s
Phase 1: RFC 6962 consistency proofs in merkle.py
- Implemented _build_consistency_proof() with recursive subtree
  decomposition algorithm following RFC 6962 Section 2.1.2
- Added _subproof() recursive helper and _compute_root_of()
- Added standalone verify_consistency_proof() function

Phase 2: Federation API endpoints on FastAPI server
- GET /federation/status — merkle root + log size for gossip probes
- GET /federation/records?start=N&count=M — record fetch (cap 100)
- GET /federation/consistency-proof?old_size=N — Merkle proof
- POST /federation/records — accept records with trust filtering
  and SHA-256 deduplication
- Cached storage singleton for concurrent safety
- Added FEDERATION_DIR to paths.py

Phase 3: HttpTransport implementation
- Replaced stub with real aiohttp client (lazy import for optional dep)
- Reusable ClientSession with configurable timeout
- All 4 PeerTransport methods: get_status, get_records,
  get_consistency_proof, push_records
- FederationError wrapping for all network failures
- Added record_filter callback to GossipNode for trust-store filtering

Phase 4: Peer persistence (SQLite)
- New peer_store.py: SQLite-backed peer database + sync history
- Tables: peers (url, fingerprint, health, last_seen) and
  sync_history (timestamp, records_received, success/error)
- PeerStore follows dropbox.py SQLite pattern

Phase 5: CLI commands + Web UI dashboard
- CLI: federation status, peer-add, peer-remove, peer-list,
  sync-now (asyncio), history
- Flask blueprint at /federation/ with peer table, sync history,
  add/remove peer forms, local node info cards
- CSRF tokens on all forms

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 22:20:53 -04:00