Skip to content

Store rehaul

vbot requested to merge nomadic-labs/tezos:store_rehaul into master

Major store rehaul

Replaces LMDB current store by an efficient ad hoc implementation. Moves chain and block logic and abstractions (state.ml, chain.ml, chain_traversal.ml, ...) to the new store.

Features

  • Uses less memory and faster I/Os

  • Canonical block and cycle representation

  • Fine-grain mutexes allowing less hard-locks

  • Automatic recovery on unexpected interruptions (e.g. SIGKILL) (TODO)

  • Blocks under head's last allowed fork level are "cemented" with a linear history

  • History mode with preserved metadata from additional cycles (e.g. Full with 5 more cycles containing metadata)

  • Consistent (future) checkpoint semantics (the former one is probably broken)

  • New snapshot format: faster import/export, reduced size, metadata, protocols, compression, ipfs-friendly (when not compressed)

  • Resumable store reconstruction

  • Upgrade from legacy store to the new representation

  • May import from legacy snapshots

  • Efficient history mode switch

  • Specific test framework

  • Improved UX and proper events

TODO

  • Plug Irmin with the layered store (GC)

  • Finish user documentation

  • Finish automatic check & recover

CHANGELOG

  • RPC checkpoint, history mode, snapshot default names, ...

Related issues

  • nomadic-labs/tezos#20 #912 (closed)
  • nomadic-labs/tezos#192
  • nomadic-labs/tezos#193
  • #954
  • nomadic-labs/tezos#79
  • nomadic-labs/tezos#80
  • nomadic-labs/tezos#313
  • #1163 (closed)

Closes #672 (closed) #70 (closed) #1140 (closed)

Edited by vbot

Merge request reports