DustSyncManager
Dust state manager — keeps a single in-memory DustLocalState for the session.
On the first sync the persisted checkpoint (if any) is reused for a fast delta; only a genuinely-empty start falls back to a full genesis sync. Serialize/deserialize is root-lossless (proven by the compact-engine serialize_deserialize_reproduces_root test), so the checkpoint is authoritative across process restarts. On error 170: forceResync does a fresh full sync from genesis.
On a cold start with no local checkpoint, an optional cloudBackupSource (e.g. Google Drive, cross-device) is consulted to seed one before genesis — see maybeSeedCheckpointFromCloud. Null (the default) preserves today's behavior exactly.
Constructors
Functions
Get a synced DustLocalState. First call does full sync (~60s on PREPROD). All subsequent calls return the same in-memory state instantly.
Force a completely fresh sync. Clears everything. For error 170 recovery.
After submit: no-op. State stays in memory.
On-demand incremental refresh (UI "refresh" affordance, between-tx freshness): drop the in-memory memo and re-sync, which lands as a fast DELTA on the persisted checkpoint. Unlike forceResync this does NOT delete the checkpoint, so a routine refresh never triggers a full genesis re-sync. forceResync stays reserved for error-170 recovery, where stale roots require a clean rebuild from genesis.