Let PVMs provide their own context backend and move Irmin context from Rollup node to PVMs
Context
Future PVMs might need specialized context subsystems. However, currently the rollup node that will run those PVMs statically uses Irmin as the context of the PVMs and forces PVMs to be based on Irmin.
In order to be able to design PVMs that use another context subsystem, this MR aims to remove the dependency to Irmin from the rollup node and, more importantly, from PVMs.
To do so, it introduces context/pvmstate existentials that are used in place of Irmin_context in the rollup node and add a Context first class module to PVMs to allow the rollup node to dynamically use the context from the running PVM (see src/lib_smart_rollup_node/context.ml).
Notably, it also introduces a Context_sigs (src/lib_smart_rollup_node/context_sigs.ml) module that describes the current signature a context subsystem must expose to be compatible with the rollup node. It currently mimics the signature of the Irmin_context previously used and may be modified to better accommodate future context systems.
Naturally smart_rollup_node PVMs included with protocol plugins for 017, 018 and alpha are patched accordingly, using Irmin_context as their current context. To avoid code_duplication, Irmin_context is kept in the rollup_node directory, instead of copying it in every protocol plugins directory needing it. However, a potential (simple) follow-up task could be to introduce an 'Irmin_context' library outside of the rollup_node directory directly used by the PVMs that need it.
Manually testing the MR
Run the rollup node tests: for instance, using
dune exec src/lib_smart_rollup_node/test/main.exe