ethereum/go-ethereum · error
not supported
Error message
not supported
What it means
ProofSet is a tiny in-memory map used by trie proof verification (VerifyRange/VerifyProof): it is a read-collecting fake database that only supports Has/Put/Get. DeleteRange panics because a proof verification never bulk-deletes — calling it means the ProofSet was passed to an API that expects a real KeyValueStore writer.
Source
Thrown at trie/trienode/proof.go:73
db.nodes[keystr] = common.CopyBytes(value)
db.order = append(db.order, keystr)
db.dataSize += len(value)
return nil
}
// Delete removes a node from the set
func (db *ProofSet) Delete(key []byte) error {
db.lock.Lock()
defer db.lock.Unlock()
delete(db.nodes, string(key))
return nil
}
func (db *ProofSet) DeleteRange(start, end []byte) error {
panic("not supported")
}
// Get returns a stored node
func (db *ProofSet) Get(key []byte) ([]byte, error) {
db.lock.RLock()
defer db.lock.RUnlock()
if entry, ok := db.nodes[string(key)]; ok {
return entry, nil
}
return nil, errors.New("not found")
}
// Has returns true if the node set contains the given key
func (db *ProofSet) Has(key []byte) (bool, error) {
_, err := db.Get(key)
return err == nil, nil
}View on GitHub (pinned to 6bb0588ad8)
Solutions
- Check the call site: ProofSet must only be given to proof/range-proof verification functions, never to general storage code
- Replace the ProofSet with a real memdb (e.g. ethdb.NewMemDatabase) if you genuinely need deletion support
- If you forked the verification API and now need DeleteRange, implement it instead of panicking (delete by key range from the map)
Example fix
// before set := trienode.NewProofSet() trydb.Compact(set, start, end) // panics: DeleteRange not supported // after mem := rawdb.NewMemoryDatabase() trydb.Compact(mem, start, end)
Defensive patterns
Strategy: validation
Validate before calling
// Only hand ProofSet to read-collect verification APIs
var _ ethdb.KeyValueReader = (*trienode.ProofSet)(nil) // document the intent
// before generic calls:
if _, ok := db.(interface{ DeleteRange([]byte, []byte) error }); ok && !isProofAPI(callee) {
db = rawdb.NewMemoryDatabase()
} Type guard
func isProofSet(db ethdb.Database) bool { _, ok := db.(*trienode.ProofSet); return ok } Prevention
- Never pass ProofSet/proof accumulators into compaction or generic write helpers
- Grep call sites of DeleteRange and confirm each target is a real store
- Keep proof types out of interfaces that include writer methods
When it happens
Trigger: Passing a *trienode.ProofSet as the ethdb.KeyValueWriter parameter of a function that performs range deletions (e.g. compaction helpers, trie iterator pruning, or any code path calling DeleteRange on its supplied database).
Common situations: Refactoring geth internals and accidentally routing a write-path database argument to proof verification; custom tools reusing ProofSet as a generic in-memory db; API changes where a proof callback signature gained writer methods.
Related errors
- not implemented
- duplicated flush operation
- unknown layer type: %T
- nil chainID
- error decoding contract deployer hex %s: %v
AI-assisted analysis of ethereum/go-ethereum@6bb0588ad8 (2026-08-15).
Data as JSON: /api/errors/6166cea35356f7a7.
Report an issue: GitHub.