Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

perf: fork trie without key hashing #4390

Draft
wants to merge 1 commit into
base: poc/transaction_simulation
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/chains/ethereum/ethereum/src/helpers/trie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand All @@ -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;
Expand Down