Closed 2PacIsAlive closed 2 years ago
Hi @2PacIsAlive, you're absolutely correct. Thank you for bringing this to our attention. The profile_picture
and cover_photo
field are legacy fields attached to few users. We will track this issue and let you know when it has been resolved.
This was fixed in #2259 !
Affected Service:
Discovery Provider
Issue Description
The
xf
filter inget_karma
appears to act as tool to combat trending score manipulation. However, it is currently implemented in a manner where it fails to accomplish this.The goal appears to be to filter out users without pfp/cover imgs & bios (high likelihood spam accounts). However, it is looking at the wrong attributes in the
Users
table to accomplish this.When the discovery nodes index the chains, the content multihashes are written to
cover_photo_sizes
andprofile_picture_sizes
, and theircover_photo
andprofile_picture
counterparts are set to null.Source: discovery-provider/src/tasks/users.py#L374 https://github.com/AudiusProject/audius-protocol/blob/3482e9f46a53abb71eef64484e25827a31dac268/discovery-provider/src/tasks/users.py#L374
As a result, when the xf filter is True (as it is in all three trending categories), the end result of the query will yield a null result. Following, the final results of the
get_karma
function will be Null and will not be applied to the rest of the scoring algorithm.Consequences:
Remediation
An easy fix can be implemented by changing the xf query's filter logic to look at the correct table attributes
Additionally, the alembic migration creating the materialized view
trending_params
can be updated in the same manner as well: https://github.com/AudiusProject/audius-protocol/blob/3482e9f46a53abb71eef64484e25827a31dac268/discovery-provider/alembic/versions/92571f94989a_add_trending_views.py#L242