Tracing the labels behind an ENS namehash mismatch
A resolver query for pay.team.eth consistently misses the intended record. Before blaming the RPC endpoint, compare the sequence of parent and child nodes used by the importer.
Trace the descent from the root
The example prints a symbolic trace; it does not calculate a hash. Start with the root node, take eth, then team, then pay. For the actual namehash, the root is 32 zero bytes. At each step hash the concatenation of the parent node bytes and the Keccak-256 label hash. Reversing characters or concatenating hex text gives a different node.
const labels = "pay.team.eth".split(".");
let node = "root";
for (const label of labels.reverse()) {
console.log(node, "+", label);
node = label + "." + node;
}
Compare intermediate nodes at the first divergence
Normalize the complete input with an ENS-compatible normalizer before splitting into labels. Check the intermediate value for eth and then for team.eth against an independent implementation. If those match, concentrate on the final label’s normalized UTF-8 bytes. A single label hash by itself identifies the label bytes; a full namehash also commits to the parent.