Checked against the original at ../orly (pkg/database/graph-*.go,
pkg/database/save-event.go, pkg/database/delete-event.go and
pkg/database/indexes/keys.go), and morly's pkg/store/index/keys.mx.
pks, spk, epg, peg, eeg, gee, ppg, gpp key prefixes, fieldorder, widths and direction bytes.
0; outbound p-tag edge 1; inbound reverse 2.0, in 1; pubkey-pubkey out 0, in 1.direct pubkey→pubkey edges written from every p-tag.
directions.
pp traversal is a BFS over kind-3 ppg/gpp edges.pe traversal is the original one-hop authored / p-tag-mention query.ee is seeded from the events authored by the supplied pubkey.deleteGraphIndexes copies the forward direction byte when constructing the reverse peg key, so a p-tag edge with
direction 1 constructs another peg direction 1 instead of direction 2.
torly constructs the actual reverse (DirPTagIn).
pubkeys_by_depth for outbound pe. torly always reports event IDs in
events_by_depth.
out, in or both to TraverseThread, which only recognizes outbound, inbound or both;
consequently its out and in return nothing. torly maps out to eeg,
in to gee, and both to the union.
GetEventsByAuthor and GetEventsReferencingPubkey use a short common-kind list when no kinds are
requested. torly scans all kinds.
p/e tags are not graph-indexed at all.Truncating them would silently change the graph, so they contribute no author, p-tag or e-tag edges. They remain stored and queryable through the normal NIP-01 indexes.
ee treats every event authored by the seed as a root and excludes all ofthem from the response. orly excludes only the current root, so an authored event referenced by another root can appear in its result.
only creates the edge if the target already exists.
discovery order.
The deployed orly relay currently reports `graph queries not supported on this
relay` because its graph executor is not initialized, so runtime comparison of
_graph was not possible against that instance; the comparison above is
against the source implementation.