@ethereumjs/mpt / MPTOpts
Defined in: packages/mpt/src/types.ts:47
optionalcacheSize:number
Defined in: packages/mpt/src/types.ts:106
LRU cache for trie nodes to allow for faster node retrieval.
Default: 0 (deactivated)
optionalcommon:CommonInterface
Defined in: packages/mpt/src/types.ts:111
@ethereumjs/common Common instance (an alternative to passing in a customHashingFunction)
optionaldb:DB<string,string|Uint8Array<ArrayBufferLike>>
Defined in: packages/mpt/src/types.ts:51
A database instance.
optionalkeyPrefix:Uint8Array<ArrayBufferLike>
Defined in: packages/mpt/src/types.ts:83
Add a prefix to the trie node keys
(potential performance benefits if multiple tries are stored within the same DB, e.g. all storage tries being stored in the outer account state DB)
optionalroot:Uint8Array<ArrayBufferLike>
Defined in: packages/mpt/src/types.ts:56
A Uint8Array for the root of a previously stored trie
optionaluseKeyHashing:boolean
Defined in: packages/mpt/src/types.ts:70
Create as a secure MerklePatriciaTrie where the keys are automatically hashed using the
keccak_256 hash function or alternatively the custom hash function provided.
Default: false
This is the flavor of the MerklePatriciaTrie which is used in production Ethereum networks like Ethereum Mainnet.
Note: This functionality has been refactored along the v5 release and was before
provided as a separate inherited class SecureTrie. Just replace with Trie
instantiation with useKeyHashing set to true.
optionaluseKeyHashingFunction:HashKeysFunction
Defined in: packages/mpt/src/types.ts:75
Hash function used for hashing trie node and securing key.
optionaluseNodePruning:boolean
Defined in: packages/mpt/src/types.ts:99
Flag to prune the trie. When set to true, each time a value is overridden,
unreachable nodes will be pruned (deleted) from the trie
optionaluseRootPersistence:boolean
Defined in: packages/mpt/src/types.ts:93
Store the root inside the database after every write operation
optionalvalueEncoding:ValueEncoding
Defined in: packages/mpt/src/types.ts:88
ValueEncoding of the database (the values which are put/get in the db are of this type). Defaults to string