anchor.diff:  %%
   %% The main high-levels differences are as follows:
   %%   1. The synctree is built entirely on pure key/value (get/put) operations,
  -%%      there is no concept of iteration nor any needed for a sorted backend.
  +%%      there is no concept of iteration nor any need for a sorted backend.
   %%
   %%   2. The synctree is always up-to-date. An insert into the tree immediately
   %%      updates the appropriate segment and relevant tree path. There is no
  
positive.code: compute_height(Segments, Width) ->
      %% By design, we require segments to be a power of width.
      Height = erlang:trunc(math:log(Segments) / math:log(Width)),
      case math:pow(Width, Height) == Segments of
          true ->
              Height
      end.
  
negative.code: -type action() :: {put, _, _} |
                    {delete, _}.
  
  -type hash()   :: binary().
  -type key()    :: term().
  -type value()  :: binary().
  -type level()  :: non_neg_integer().
  -type bucket() :: non_neg_integer().
  -type hashes() :: [{_, hash()}].
  
  -type corrupted() :: {corrupted, level(), bucket()}.
  
  -record(tree, {id        :: term(),
                 width     :: pos_integer(),
                 segments  :: pos_integer(),
                 height    :: pos_integer(),
                 shift     :: pos_integer(),
                 shift_max :: pos_integer(),
                 top_hash  :: hash(),
                 buffer    :: [action()],
                 buffered  :: non_neg_integer(),
                 mod       :: module(),
  