{"record":{"id":"dbdd494213a1e6b0","repo":"ethereum/go-ethereum","slug":"t-invalid-node-v-dbdd49","errorCode":null,"errorMessage":"%T: invalid node: %v","messagePattern":"%T: invalid node: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"trie/trie.go","lineNumber":222,"sourceCode":"\t\tif err == nil && didResolve {\n\t\t\tn.Val = newnode\n\t\t}\n\t\treturn value, n, didResolve, err\n\tcase *fullNode:\n\t\tvalue, newnode, didResolve, err = t.get(n.Children[key[pos]], key, pos+1)\n\t\tif err == nil && didResolve {\n\t\t\tn.Children[key[pos]] = newnode\n\t\t}\n\t\treturn value, n, didResolve, err\n\tcase hashNode:\n\t\tchild, err := t.resolveAndTrack(n, key[:pos])\n\t\tif err != nil {\n\t\t\treturn nil, n, true, err\n\t\t}\n\t\tvalue, newnode, _, err := t.get(child, key, pos)\n\t\treturn value, newnode, true, err\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"%T: invalid node: %v\", origNode, origNode))\n\t}\n}\n\n// Prefetch attempts to resolve the leaves and intermediate trie nodes\n// specified by the key list in parallel. The results are silently\n// discarded to simplify the function.\nfunc (t *Trie) Prefetch(keylist [][]byte) error {\n\t// Short circuit if the trie is already committed and not usable.\n\tif t.committed {\n\t\treturn ErrCommitted\n\t}\n\t// Resolve the trie nodes sequentially if there are not too many\n\t// trie nodes in the trie.\n\tfn, ok := t.root.(*fullNode)\n\tif !ok || len(keylist) < 16 {\n\t\tfor _, key := range keylist {\n\t\t\t_, err := t.Get(key)\n\t\t\tif err != nil {","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/ethereum/go-ethereum/blob/6bb0588ad8e7f922e4ad5580f51265a4097af08f/trie/trie.go#L204-L240","documentation":"Error \"%T: invalid node: %v\" thrown in ethereum/go-ethereum.","triggerScenarios":"Trie node resolution (trie.get) receiving a node that is not a shortNode, fullNode, valueNode, or resolvable hashNode.","commonSituations":"Corrupted chaindata after unclean shutdown, disk errors, or incompatible database modification.","solutions":["This panic means trie.get encountered an unexpected node type — usually corrupted trie data. Re-sync or restore the state database, and verify the node data loaded from disk is intact.","If reached with healthy data, it is an internal bug: capture the node type (%T) and value (%v) from the panic for the report."],"exampleFix":"// Corrupt state: rebuild it.\n// geth removedb && geth --syncmode snap  (or restore from snapshot/backup)","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6bb0588ad8e7f922e4ad5580f51265a4097af08f","analyzedAt":"2026-08-15T10:06:53.996Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}