In p2p-db-osm I've been using pubkey + seq to reference unique nodes in a hyperdb. However, it means having to reach into db._writers to
convert node.feed from an integer to a writer, so I can get its public key
iterate over _writers so I can later match a pubkey to a writer object
use writer.get() to get that node from the stored seq
Maybe the real problem is that there isn't a durable way to refer to a specific node in the database? The nodes mapped to by a key changes often, and a db.version checkout captures too much data (all writers' pubkeys and sequence numbers).
In p2p-db-osm I've been using
pubkey + seq
to reference unique nodes in a hyperdb. However, it means having to reach intodb._writers
tonode.feed
from an integer to a writer, so I can get its public key_writers
so I can later match a pubkey to a writer objectwriter.get()
to get that node from the storedseq
Maybe the real problem is that there isn't a durable way to refer to a specific node in the database? The nodes mapped to by a key changes often, and a
db.version
checkout captures too much data (all writers' pubkeys and sequence numbers).