anchor.diff:                    RemoteObj = Map#{<<"genesis_hash">> => RemoteGHash,
                                      <<"best_hash">>  => RemoteTopHash},
                     RemotePeers = maps:get(<<"peers">>, Map, []),
  -                  lager:debug("ping response (~p): ~p", [Uri, pp(RemoteObj)]),
  -                  {ok, RemoteObj, RemotePeers};
  +                  case maps:get(<<"peers">>, Map, []) of
  +                      RemotePeers when is_list(RemotePeers), length(RemotePeers) =< Share ->
  +                          lager:debug("ping response (~p): ~p", [Uri, pp(RemoteObj)]),
  +                          {ok, RemoteObj, RemotePeers};
  +                      _ ->
  +                          lager:debug("ping response with too many peers ~p", [Uri]),
  +                          %% Do not print the object, that in itself opens a DoS attack
  +                          {error, protocol_violation}
  +                 end;
                 _ ->
                   %% Something is wrong, block the peer later on
                   lager:debug("Erroneous ping response (~p): ~p", [Uri, Map]),
  
positive.code: %%%     as arguments
  %%%     1) the host (e.g. http://localhost:3013) in binary format
  %%%        to allow utf8 characters,
  %%%     2) the query parameters.
  %%%
  %%%     This module is transforming the query parameters into a map 
  %%%     that fits the specified endpoint. That is, it checks types and 
  %%%     business logic of the input and creates a map that can automatically
  %%%     be transformed into a JSON object that validates with the JSON 
  %%%     schema(s) for those query parameters.
  %%%
  %%%     After a HTTP request via  aeu_http_client:request the response
  %%%     is verified against its JSON schema and transformed back to 
  %%      Erlang maps or other types used internally. 
  %%%     Some business logic may be verified already here. 
  %%      For example,
  %%%     the ping request provides a "share" parameter stating how many
  %%%     peers it maximally want to receive in the response.
  %%%     It is hard to express this relation in the JSON schema(s), but 
  
negative.code: %%%     not exceeding Share. 
  %%%     
  %%%     Note that we perform both the JSON encoding and the actual 
  %%%     request in the separate aeu_http_client module. This allows
  %%%     mocking on the request layer during testing.
  %%% @end
  %%% Created: 2017
  