change protocol_config from JSON to protbuf serialization (at database
side still uses JSON)
small modifications