bluesky-social / indigo

Go source code for Bluesky's atproto services.
https://atproto.com/docs
Apache License 2.0
600 stars 88 forks source link

getLatestCommit on Relay returns 500 for (some?) deleted accounts #621

Open mackuba opened 3 months ago

mackuba commented 3 months ago

https://bsky.network/xrpc/com.atproto.sync.getLatestCommit?did=did:plc:pkmfz5soq2swsvbhvjekb36g https://bsky.network/xrpc/com.atproto.sync.getLatestCommit?did=did:plc:ravrgr24ltd5oxft2mha6chc https://bsky.network/xrpc/com.atproto.sync.getLatestCommit?did=did:plc:cw2oqmrjzpfaezhs6pp3bksy

HTTP/2 500 
vary: Origin
date: Fri, 15 Mar 2024 22:17:37 GMT
content-length: 0
strict-transport-security: max-age=63072000

The first one is a DID from an independent PDS where the owner (IIRC) has manually added a plc_tombstone operation to PLC because they thought it was needed. The second one is also a repo on another independent PDS, the repo doesn't seem to exist on the PDS anymore.

The third was a DID on a Bluesky PDS, so I'm assuming this might actually be happening for all deleted repos?

mackuba commented 3 months ago

More examples:

did:plc:icjkfdhae2trwtx3ikmv62ii (maitake.us-west.host.bsky.network) did:plc:5voyzxlltvyvfzw5umluvfu5 (bsky.gdgd.tokyo) did:plc:g6klig5oawtvtqb7qnuyhhwb (bsky.gdgd.tokyo)

bnewbold commented 3 months ago

Thanks for reporting these! Sorry to leave these lingering.

We are planning to iterate on how identity and account lifecycle events are transmitted over the repo event stream ("firehose"), most likely deprecating the #handle and #tombstone events to use just #identity and #account. When we do that, the relay will be updated to have slightly different internal account state tracking. I think that we'll probably wait to debug these accounts until we do that update, and then ensure/test that tombstoned accounts are handled consistently.