Offchain workers storage comes in two flavors: Persistent and Local.
pub enum StorageKind {
/// Persistent storage is non-revertible and not fork-aware. It means that any value
/// set by the offchain worker triggered at block `N(hash1)` is persisted even
/// if that block is reverted as non-canonical and is available for the worker
/// that is re-run at block `N(hash2)`.
/// This storage can be used by offchain workers to handle forks
/// and coordinate offchain workers running on different forks.
PERSISTENT = 1_isize,
/// Local storage is revertible and fork-aware. It means that any value
/// set by the offchain worker triggered at block `N(hash1)` is reverted
/// if that block is reverted as non-canonical and is NOT available for the worker
/// that is re-run at block `N(hash2)`.
LOCAL = 2_isize,
}
My question is, even though one of these StorageKind is defined as PERSISTENT
, it sounds that it is only persistent as long as it exists in memory, and so persistent between different runs of the worker, as long memory is not dropped. Is this the case ?