mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Extends the fake-nip-07-extension harness to a multi-session flow that publishes a watch history via the app (real chunking + encryption through the fake extension), then reloads to measure the decrypt-cache effect by counting nip44.decrypt extension round-trips: seed : publishes the snapshot (nip44.encrypt per chunk) COLD : first reload — decrypts chunks via the extension (~180 calls @ 300 items) WARM : second reload — decrypt cache hits, ~2 calls Validates the watch-history decrypt cache (watchHistoryDecryptCache.js): the warm reload skips ~180 serialized extension round-trips (~9s @ 50ms, more at real latency). Uses context-level bindings so localStorage (and the cache) persists across reloads; bypasses feed signature verification of seeded data via the test-only videoEventVerifier hook so the feed renders deterministically. Also surfaced: cold load still pays the full decrypt cost, and the decrypt path makes far more extension calls than there are chunks — an inefficiency to chase. Co-Authored-By: Claude Opus 4.8 <[email protected]>