Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
066354c
refactor: remove custom debug_* logic
Wodann Dec 16, 2025
81028ca
WIP: refactor: unify tracing architecture
Wodann Feb 2, 2026
5005771
fix: outdated typing on skipped TS test
Wodann Feb 2, 2026
e737914
refactor: use new traces API of EDR
Wodann Feb 19, 2026
a9e3722
fix: always enable traces
Wodann Feb 20, 2026
429d582
build: update to latest EDR
Wodann Jul 8, 2026
3476f1c
feat: record precompile calls in Hardhat 2's call traces
Wodann Oct 5, 2026
19db76e
fix: hold the provider wrapper weakly in the subscription callback
Wodann Oct 5, 2026
fca6019
refactor: build the network config as EDR's Hardhat patch does
Wodann Oct 5, 2026
ede6229
refactor: convert hardforks through EDR's string names
Wodann Oct 5, 2026
f1d2d9a
chore: remove unused imports from convertToEdr
Wodann Oct 5, 2026
e454f5d
Revert "feat: record precompile calls in Hardhat 2's call traces"
Wodann Oct 5, 2026
c9bde95
fix: cap the default transaction gas limit under Osaka
Wodann Oct 6, 2026
58316dd
fix: let EDR derive the default transaction gas limit
Wodann Oct 18, 2026
ef544c3
docs: say that EDR derives the default transaction gas limit
Wodann Oct 18, 2026
a34ae72
refactor: drop the identity hardfork conversion
Wodann Oct 18, 2026
47c921c
docs: port the EDR upgrade changesets from Hardhat 3
Wodann Oct 18, 2026
ac31481
docs: drop the EDR version bump changeset
Wodann Oct 19, 2026
9203c7d
build: require Node.js 22 or later
Wodann Oct 19, 2026
e5cd8c5
docs: add changesets for EDR behaviour changes since 0.12.0-next.23
Wodann Oct 19, 2026
97e66a0
docs: describe the full debug trace format change
Wodann Oct 19, 2026
1aa7122
build: move the dev container to Debian Bookworm
Wodann Oct 21, 2026
3788431
fix: capture memory in debug traces by default
Wodann Oct 22, 2026
c15ce75
fix: return Hardhat 2's debug trace format
Wodann Oct 22, 2026
0eeb7e9
docs: describe the restored debug trace format
Wodann Oct 22, 2026
7de75da
deps: bump EDR to 0.25.0
Wodann Oct 28, 2026
189e45e
test: cover more debug trace conversions
Wodann Oct 28, 2026
b7d610c
test: remove debug trace tests that only check EDR behaviour
Wodann Oct 28, 2026
7b7972d
fix: reject invalid mining.interval ranges at config load
Wodann Oct 29, 2026
b8b25e1
refactor: drop the unused hardfork conversion
Wodann Oct 29, 2026
07a25a6
fix: log a failed root address lookup in debug traces
Wodann Oct 29, 2026
9fe775b
refactor: compare the created address through the shared helper
Wodann Oct 29, 2026
ce3ebcb
test: pin the storage context of each frame with disableStack
Wodann Oct 29, 2026
bc16cda
test: port the VM event bridge test from EDR
Wodann Oct 29, 2026
f0c43e4
docs: revise the changesets of the EDR upgrade
Wodann Oct 29, 2026
1a6f11a
fix: treat an empty tracer name as the default tracer
Wodann Oct 31, 2026
bc32b81
test: move the debug trace conversion suite to EDR
Wodann Nov 6, 2026
7a8c610
deps: bump EDR to 0.25.1
Wodann Nov 16, 2026
491f433
Apply suggestion from @kanej
kanej Nov 18, 2026
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
5 changes: 5 additions & 0 deletions .changeset/console-log-stack-traces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed Solidity stack traces not recognising `console.log` calls made through the Hardhat console address.
16 changes: 16 additions & 0 deletions .changeset/debug-trace-tracers-and-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"hardhat": minor
---

Updated `debug_traceTransaction` and `debug_traceCall`:

- Added support for geth's built-in tracers, such as `callTracer` and `prestateTracer`, which return geth's output unchanged.
- Fixed an empty `tracer` to select the default tracer, as the Ethereum execution API spec requires.
- Added the `enableMemory` and `enableReturnData` options to the default tracer. `enableMemory` takes precedence over `disableMemory`, and `enableReturnData` adds `returnData` to each step.
- Changed the default tracer output in a few places:
- A step that halts now has an `error` message that comes from EDR, so do not match on its exact text.
- An unknown opcode is now named `Unknown`.
- A `STOP` at the first step is no longer dropped, so traces can have one more step.
- Storage no longer shows slots of another contract after a warm `SLOAD`.
- When `disableStack` is set, storage values can be stale until the next `SLOAD` or `SSTORE`.
- With the default tracer and storage enabled, `debug_traceTransaction` now reads the traced transaction to find its recipient. That costs one remote request when the transaction is on a forked chain.
5 changes: 5 additions & 0 deletions .changeset/default-gas-limit-osaka-cap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed `eth_call` and `eth_estimateGas` requests without a `gas` field failing under the Osaka transaction gas cap. Hardhat no longer passes a default transaction gas limit to EDR. EDR derives it from the hardfork and gas limit of the block that runs the request.
5 changes: 5 additions & 0 deletions .changeset/edr-call-trace-memory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Improved the performance of the Hardhat Network provider by reducing the memory used to record the call traces of transactions and calls.
5 changes: 5 additions & 0 deletions .changeset/edr-glibc-2-34.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": minor
---

Raised the minimum glibc version of the prebuilt Linux gnu binaries of EDR from 2.29 to 2.34.
5 changes: 5 additions & 0 deletions .changeset/edr-install-size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": minor
---

Reduced Hardhat's install size because EDR now installs only the native build for the current platform through `optionalDependencies`.
5 changes: 5 additions & 0 deletions .changeset/estimate-gas-osaka-cap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed `eth_estimateGas` failing from the Osaka hardfork when its search probed gas values above the EIP-7825 transaction gas cap.
5 changes: 5 additions & 0 deletions .changeset/fork-loopback-proxy-bypass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed forking requests to loopback URLs being sent through `HTTP_PROXY` or `HTTPS_PROXY`. Requests to `localhost`, `*.localhost`, `127.0.0.0/8`, `0.0.0.0` and `::1` now bypass the proxy.
5 changes: 5 additions & 0 deletions .changeset/fork-oldest-hardfork-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed forking from a block that precedes the oldest supported hardfork being silently accepted. It now fails with an error that names the oldest supported hardfork.
5 changes: 5 additions & 0 deletions .changeset/fork-retry-error-message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Changed the error of a forking request that fails on every retry. It now reads `Request failed after 9 retries` and no longer names the host or the cause, such as a DNS error.
5 changes: 5 additions & 0 deletions .changeset/fork-rpc-cache-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Changed the location of the forking RPC cache to an `rpc_cache/v2` subdirectory. Data cached by previous Hardhat versions is not reused. Everything else in the `rpc_cache` directory is ignored and can be deleted.
5 changes: 5 additions & 0 deletions .changeset/genesis-system-account-nonce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": minor
---

Fixed the EIP-4788 and EIP-2935 system accounts to have nonce `1` in the genesis state, matching their on-chain deployments. The genesis block hash of local Cancun or later networks therefore differs from previous Hardhat versions. The hashes of all later blocks change as well.
5 changes: 5 additions & 0 deletions .changeset/interval-mining-logging-deadlock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed a deadlock that hung the process when a Hardhat Network provider with interval mining and logging enabled was destroyed.
8 changes: 8 additions & 0 deletions .changeset/interval-mining-range-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"hardhat": minor
---

Fixed interval mining accepting a `mining.interval` range that it could not honour:

- A range must now satisfy `1 <= min <= max`. An invalid range is rejected when the config is loaded, when the provider is created and when `evm_setIntervalMining` is called. The config error names `networks.hardhat.mining.interval` and the offending range.
- BREAKING CHANGE: `[0, 0]` and `[0, N]` ranges are no longer accepted. Use a range with a minimum of at least `1`, such as `[1, N]`, instead. Set `mining.interval` to `0` to disable interval mining.
5 changes: 5 additions & 0 deletions .changeset/log-block-timestamp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": minor
---

Added the `blockTimestamp` field to logs. Logs returned by `eth_getLogs`, `eth_getFilterLogs`, `eth_getFilterChanges` and `eth_subscribe("logs")` carry it, as do the logs in transaction receipts. When forking, the field is passed through from the remote node and is absent if the node does not serve it.
5 changes: 5 additions & 0 deletions .changeset/node-log-value-formatting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed the transaction `Value` in the `hardhat node` logs dropping leading zeros of the fractional part, which logged `0.01 ETH` as `0.1 ETH`. Whole amounts no longer end with a trailing dot.
5 changes: 5 additions & 0 deletions .changeset/precompile-stack-traces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed Solidity stack traces after a precompile call. A failing precompile call is now reported as a precompile error, and later calls in the same function point at the right line.
5 changes: 5 additions & 0 deletions .changeset/proxy-call-logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed calls through proxy contracts being logged as `<unrecognized-selector>`. A selector that is missing from the called contract is now resolved against the implementation behind the proxy. The call is labeled with the full delegation chain, such as `Proxy>Implementation#setValue`.
7 changes: 7 additions & 0 deletions .changeset/require-node-22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"hardhat": minor
---

Updated the minimal supported version of Node to v22, because EDR declares `engines.node >= 22`. Node 20 reached end of life on 2026-04-30.

On Node 20, Hardhat prints its unsupported-version warning and keeps running. Hardhat's own `package.json` declares no `engines`, so installing it is not blocked. Package managers warn that `@nomicfoundation/edr` requires Node 22, and those that enforce `engines`, such as Yarn 1, refuse the install. EDR's loader has no Node version check, so EDR itself still loads on Node 20, but that combination is untested.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Hardhat",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "20"
"version": "22"
}
},
"postCreateCommand": "scripts/setup.sh",
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
2 changes: 1 addition & 1 deletion packages/hardhat-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"dependencies": {
"@ethereumjs/util": "^9.1.0",
"@ethersproject/abi": "^5.1.2",
"@nomicfoundation/edr": "0.12.0-next.23",
"@nomicfoundation/edr": "0.25.1",
"@nomicfoundation/solidity-analyzer": "^0.1.0",
"@sentry/node": "^5.18.1",
"adm-zip": "^0.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-core/src/internal/cli/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SUPPORTED_NODE_VERSIONS = ["^20.0.0", "^22.0.0", "^24.0.0"];
export const SUPPORTED_NODE_VERSIONS = ["^22.0.0", "^24.0.0"];
2 changes: 1 addition & 1 deletion packages/hardhat-core/src/internal/cli/project-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const TYPESCRIPT_DEPENDENCIES: Dependencies = {
const TYPESCRIPT_PEER_DEPENDENCIES: Dependencies = {
"@types/chai": "^4.2.0",
"@types/mocha": ">=9.1.0",
"@types/node": ">=20.0.0",
"@types/node": ">=22.0.0",
"ts-node": ">=8.0.0",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,36 @@ function getErrorMessage(path: string, value: any, expectedType: string) {
)} for ${path} - Expected a value of type ${expectedType}.`;
}

/**
* The smallest minimum of a `mining.interval` range, in milliseconds, that
* EDR accepts.
*/
const MIN_MINING_INTERVAL_RANGE_START = 1;

function validateMiningIntervalRange(
interval: unknown,
network: string,
errors: string[]
) {
if (
!Array.isArray(interval) ||
interval.length !== 2 ||
typeof interval[0] !== "number" ||
typeof interval[1] !== "number"
) {
return;
}

const [min, max] = interval;
if (min < MIN_MINING_INTERVAL_RANGE_START || min > max) {
errors.push(
`Invalid value ${stringify(
interval
)} for HardhatConfig.networks.${network}.mining.interval - Expected a range [min, max] with ${MIN_MINING_INTERVAL_RANGE_START} <= min <= max.`
);
}
}

function getPrivateKeyError(index: number, network: string, message: string) {
return `Invalid account: #${index} for network: ${network} - ${message}`;
}
Expand Down Expand Up @@ -460,6 +490,12 @@ export function getValidationErrors(config: any): string[] {
);
}

validateMiningIntervalRange(
hardhatNetwork.mining?.interval,
HARDHAT_NETWORK_NAME,
errors
);

const hardfork =
hardhatNetwork.hardfork ?? defaultHardhatNetworkParams.hardfork;
if (hardforkGte(hardfork, HardforkName.LONDON)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export interface RpcStructLog {
storage?: Record<string, string>;
memSize?: number;
error?: object;
returnData?: string;
}

export interface RpcDebugTraceOutput {
Expand Down
Loading
Loading