anchor.diff:                      State#rr_recon_state{stats = NStats2,
                                            merkle_sync = SyncNew1, misc = []});
          SyncSend =/= [] ->
  -           BucketSizeBits = bits_for_number(Params#merkle_params.bucket_size),
  +           % note: we do not have empty buckets here and thus always store (BucketSize - 1)
  +           BucketSizeBits = bits_for_number(Params#merkle_params.bucket_size - 1),
              % note: 1 trivial proc contains 1 leaf
              {HashesK, HashesV, NewSyncSend_rev, ThisP0E, LeafCount} =
                  lists:foldl(
  
positive.code: merkle_resolve_add_leaf_hash(
    Bucket, BucketSize, P1EAllLeaves, NumRestLeaves, OtherMaxItemsCount, BucketSizeBits,
    HashesK, HashesV, PrevP0E) ->
      ?DBG_ASSERT(BucketSize < util:pow(2, BucketSizeBits)),
      ?DBG_ASSERT(BucketSize =:= length(Bucket)),
      ?DBG_ASSERT(BucketSize > 0),
      HashesK1 = <<HashesK/bitstring, BucketSize:BucketSizeBits>>,
      P1E_next = calc_n_subparts_p1e(NumRestLeaves, P1EAllLeaves, PrevP0E),
  %%     log:pal("merkle_send [ ~p ]:~n   ~p~n   ~p",
  %%             [self(), {NumRestLeaves, P1EAllLeaves, PrevP0E}, {BucketSize, OtherMaxItemsCount, P1E_next}]),
  
negative.code: merkle_resolve_retrieve_leaf_hashes(
    HashesK, HashesV, P1EAllLeaves, NumRestLeaves, PrevP0E, MyMaxItemsCount,
    BucketSizeBits) ->
      <<BucketSize0:BucketSizeBits/integer-unit:1, HashesKT/bitstring>> = HashesK,
      BucketSize = BucketSize0 + 1,
      P1E_next = calc_n_subparts_p1e(NumRestLeaves, P1EAllLeaves, PrevP0E),
  %%     log:pal("merkle_receive [ ~p ]:~n   ~p~n   ~p",
  %%             [self(), {NumRestLeaves, P1EAllLeaves, PrevP0E},
  