split lib_base in smaller libraries
This is a proposal to evaluate the refactoring of lib_base. The idea is to discuss looking at a bit of code and evolve this proposal is something mergiable. The code does not fully compile yet, but I think it gives a pretty good idea of a possible design.
Related to https://gitlab.com/nomadic-labs/tezos/-/issues/141
The ides is to split the actual lib_base in three different libraries.
At the lower level lib_base_types
. This contains version types,
time, data_wrapper plus RPC_args and encodings. Basically it sits on
top of stdlib/rpc/data_encoding/error_monad.
After lib_base_p2p
that depends on lib_base_types
and contains all the
p2p related data types. These are all p2p encodings that are shared between
then node and the client.
lib_base_shell
has a light dependency on lib_base_p2p
and contains all the
shell related data types.
What is left is lib_base
that contains tzPervasives to easily use and import
all base modules.
This is a simple graph of the dependency structure :