pub(crate) async fn sync_get_record(
__arg0: State<AppState>,
peer: Peer,
headers: HeaderMap,
query: Result<Query<SyncGetRecordQuery>, QueryRejection>,
) -> ResponseExpand description
GET /xrpc/com.atproto.sync.getRecord
The blocks that prove what this repository says about one record: the signed commit, the Merkle search tree nodes from its root down to where the record’s key sits, and the record itself. A verifier checks the signature with the key in the account’s DID document, then walks the nodes by hashing each one and following the link the previous one named.
§A record that is not there is a 200
The lexicon declares RecordNotFound and this never returns it. The
method’s own description is that it proves “the existence or non-existence
of a record”, and an error body cannot prove anything: the walk that ends
at the node the key would have to be in, and does not find it, is the
proof that it is not in the repository. So both answers are the same CAR
file with the same root, and the difference between them is whether the
last node names the key. That is what the reference implementation does
too.