torchcell.datamodels.interned_constant.verified_constant

verified_constant(ref: str, kind: str, payload: str) → Any[source]

Parse a fetched payload after checking that (kind, payload) hashes to its id.

kind is the node’s own kind property: a node whose id is not the hash of its own kind and payload is corrupt, and a pointer’s id was computed from the kind it sits under, so a matching id also proves the node’s kind is the pointer’s.