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

Commit

Permalink
perf: add a disk cache for forking requests (#1339)
Browse files Browse the repository at this point in the history
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
  • Loading branch information
davidmurdoch and MicaiahReid committed Nov 11, 2021
1 parent 434d971 commit 1b02201
Show file tree
Hide file tree
Showing 52 changed files with 2,516 additions and 498 deletions.
5 changes: 3 additions & 2 deletions src/chains/ethereum/block/src/runtime-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import {
Quantity,
BUFFER_EMPTY,
BUFFER_32_ZERO,
BUFFER_8_ZERO
BUFFER_8_ZERO,
BUFFER_ZERO
} from "@ganache/utils";
import { BN, KECCAK256_RLP_ARRAY } from "ethereumjs-util";
import { EthereumRawBlockHeader, serialize } from "./serialize";
Expand Down Expand Up @@ -128,7 +129,7 @@ export class RuntimeBlock {
timestamp: new BnExtra(ts),
baseFeePerGas:
baseFeePerGas === undefined
? undefined
? new BnExtra(BUFFER_ZERO)
: new BnExtra(Quantity.from(baseFeePerGas).toBuffer())
};
}
Expand Down
69 changes: 50 additions & 19 deletions src/chains/ethereum/ethereum/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/chains/ethereum/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"docs.preview": "ws --open --port 3010 --directory ../../../../docs",
"tsc": "ttsc --build",
"test": "nyc --reporter lcov npm run mocha",
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha -s 0 -t 0 --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha -s 0 --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache/issues"
Expand Down Expand Up @@ -67,6 +67,7 @@
"abort-controller": "3.0.0",
"bip39": "3.0.4",
"emittery": "0.7.2",
"env-paths": "2.2.1",
"eth-sig-util": "2.5.3",
"ethereumjs-abi": "0.6.8",
"ethereumjs-util": "7.1.0",
Expand All @@ -83,11 +84,11 @@
"semaphore": "1.1.0",
"subleveldown": "5.0.1",
"tmp-promise": "3.0.2",
"ws": "7.5.3"
"ws": "8.2.3"
},
"devDependencies": {
"@trufflesuite/typedoc-default-themes": "0.6.1",
"@trufflesuite/uws-js-unofficial": "18.14.0-unofficial.12",
"@trufflesuite/uws-js-unofficial": "20.4.0-unofficial.2",
"@types/encoding-down": "5.0.0",
"@types/fs-extra": "9.0.2",
"@types/keccak": "3.0.1",
Expand All @@ -102,6 +103,7 @@
"abstract-leveldown": "6.3.0",
"cheerio": "1.0.0-rc.3",
"cross-env": "7.0.3",
"fast-check": "2.17.0",
"fs-extra": "9.0.1",
"local-web-server": "4.2.1",
"mocha": "8.4.0",
Expand Down
Loading

0 comments on commit 1b02201

Please sign in to comment.