From f36538c78f0a3836052cc988a6ac12d8984ee8f2 Mon Sep 17 00:00:00 2001 From: David Murdoch <187813+davidmurdoch@users.noreply.github.com> Date: Mon, 8 May 2023 11:16:01 -0400 Subject: [PATCH] perf: fork trie without key hashing --- src/chains/ethereum/ethereum/src/helpers/trie.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/chains/ethereum/ethereum/src/helpers/trie.ts b/src/chains/ethereum/ethereum/src/helpers/trie.ts index 9c7101d2a8..efef95025b 100644 --- a/src/chains/ethereum/ethereum/src/helpers/trie.ts +++ b/src/chains/ethereum/ethereum/src/helpers/trie.ts @@ -3,10 +3,6 @@ import { Trie } from "@ethereumjs/trie"; import Blockchain from "../blockchain"; import { TrieDB } from "../trie-db"; -const keyHashingFunction = (msg: Uint8Array) => { - return keccak(Buffer.from(msg.buffer, msg.byteOffset, msg.length)); -}; - export class GanacheTrie extends Trie { public readonly blockchain: Blockchain; /** @@ -22,8 +18,7 @@ export class GanacheTrie extends Trie { db, root, useRootPersistence: true, - useKeyHashing: true, - useKeyHashingFunction: keyHashingFunction + useKeyHashing: false }); this.blockchain = blockchain; this.db = db;