Rework snapshot's context format
The snapshot format was recently updated (!1512 (merged)) toward v2, however, only the way blocks are stored was upgraded. The way the context is "snapshot" is still very naive.
After the activation of Hangzhou, we hit a memory consumption issue while importing a snapshot, see #2217 (closed). Thanks to a "quick fix" from !4076 (merged), the issue was mitigated.
We need to rework the way the context is stored into snapshot to:
- speedup the import and export
- reduce the memory consumption
The release of Irmin.3.0
will enable such optimizations.
Additionally, the snapshot v3 should take care of exporting canonical snapshots, see #2312 (closed) and !3723 (closed)
Edited by Victor Allombert