farcasterxyz / hub-monorepo

Implementation of the Farcaster Hub specification and supporting libraries for building applications on Farcaster
https://www.thehubble.xyz
MIT License
707 stars 401 forks source link

userData for specific fid not returned by Hubble #1460

Closed vrypan closed 1 year ago

vrypan commented 1 year ago

What is the bug? My hub does not return userData for fid=3887. I know that this is the fid of https://warpcast.com/slokh that removed their signer, etc. Can this be a bug in hub syncing in some edge cases?

How can it be reproduced? (optional) On my hub (1.6.0). (I also request an other fid, to illustrate that in general, I get results.)

$ curl -D - http://192.168.1.23:2281/v1/userDataByFid\?user_data_type\=1\&fid\=3887
HTTP/1.1 400 Bad Request
vary: Origin
access-control-allow-origin: *
content-type: application/json; charset=utf-8
content-length: 130
Date: Sun, 08 Oct 2023 17:50:28 GMT
Connection: keep-alive
Keep-Alive: timeout=72

{"errCode":"not_found","presentable":false,"name":"HubError","code":5,"details":"NotFound: ","metadata":{"errcode":["not_found"]}}%

$ curl -D - http://192.168.1.23:2281/v1/userDataByFid\?user_data_type\=1\&fid\=3886
HTTP/1.1 200 OK
vary: Origin
access-control-allow-origin: *
content-type: application/json; charset=utf-8
content-length: 524
Date: Sun, 08 Oct 2023 17:50:52 GMT
Connection: keep-alive
Keep-Alive: timeout=72

{"data":{"type":"MESSAGE_TYPE_USER_DATA_ADD","fid":3886,"timestamp":69403837,"network":"FARCASTER_NETWORK_MAINNET","userDataBody":{"type":"USER_DATA_TYPE_PFP","value":"https://mubs.me/assets/site/mubs-512.png"}},"hash":"0x97423233b3df4b45d429135dd0b3613ff4f54980","hashScheme":"HASH_SCHEME_BLAKE3","signature":"mSK3BtbRhALgOqsi73XAPly5jBcASxWBpOuI84gtp7/p+rYGfVvDd/AP8Kq5SK7+lP8YiHEELF9LzAH8535qCw==","signatureScheme":"SIGNATURE_SCHEME_ED25519","signer":"0xe126702d6e742285c47a32e02365e08efa70f05ea4e82f36aec2b5a2f2f80c07"}
sds commented 1 year ago

It's not a bug, but the confusion is understandable.

Since the user removed their signer, all messages signed with that signer are considered revoked, resulting in them not being returned by hubs. Hope that explains.

vrypan commented 1 year ago

Thank you! Yes this explains it.

My confusion came from the fact that almost every other client out there did not share this view 😄 . Warpcast, Neynar, etc. all showed (still show) a full user profile, with a username, avatar and description.

Not a good sign to have different data on hubs and different data presented to users.

sds commented 1 year ago

Agreed—Warpcast in particular usually does not show this data, but in this specific case the user revoked the Warpcast signer itself, which is the case we didn't explicitly handle. We are hoping to resolve this anomaly for this user in a little while.