Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion solidity/ecdsa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"eslint": "^7.32.0",
"ethers": "^5.5.3",
"fs-extra": "^11.2.0",
"hardhat": "2.19.5",
"hardhat": "2.29.0",
"hardhat-contract-sizer": "^2.3.0",
"hardhat-dependency-compiler": "^1.1.2",
"hardhat-deploy": "^0.11.11",
Expand Down
4 changes: 3 additions & 1 deletion solidity/ecdsa/test/WalletRegistry.CustomErrors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ describe("WalletRegistry - Custom Errors", () => {
// The error will be triggered by the inline gas check at the end of challengeDkgResult
await expect(
walletRegistry.connect(unauthorized).challengeDkgResult(dkgResult, {
gasLimit: 100000, // Intentionally low gas
// Above EIP-7623's intrinsic calldata floor, which hardhat 2.29
// enforces before execution, and far below what the call needs.
gasLimit: 170000,
})
).to.be.reverted // May revert with out-of-gas or NotEnoughExtraGasLeft
})
Expand Down
7 changes: 6 additions & 1 deletion solidity/ecdsa/test/WalletRegistry.WalletCreation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3015,10 +3015,15 @@ describe("WalletRegistry - Wallet Creation", async () => {
context("with insufficient gas provided", async () => {
it("should revert when gas check fails", async () => {
// This test verifies the gas check works correctly
// Above EIP-7623's intrinsic calldata floor, which hardhat
// 2.29 enforces before execution -- below it the node rejects
// the transaction outright and the contract's own gas check
// never runs, which is what this asserts on. Still far short of
// what `challengeDkgResult` needs to complete.
await expect(
walletRegistry
.connect(thirdParty)
.challengeDkgResult(dkgResult, { gasLimit: 200000 })
.challengeDkgResult(dkgResult, { gasLimit: 220000 })
Comment on lines +3018 to +3026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate file =="
fd -a 'WalletRegistry.WalletCreation.test.ts' . || true

echo "== relevant lines =="
FILE="$(fd 'WalletRegistry.WalletCreation.test.ts' . | head -n 1)"
if [ -n "${FILE:-}" ]; then
  wc -l "$FILE"
  sed -n '2980,3055p' "$FILE" | cat -n | sed 's/^/  /'
fi

echo "== nearby expect assertions =="
rg -n "challengeDkgResult|gasLimit: 220000|EIP-7623|intrinsic calldata floor|below it|contract's own gas check" "$FILE" || true

echo "== repo version/config hints =="
for f in package.json pnpm-lock.yaml yarn.lock package-lock.json hardhat.config.* tsconfig.json; do
  [ -f "$f" ] && printf '\n-- %s --\n' "$f" && sed -n '1,220p' "$f" | rg -n '"hardhat"|"hardhat-ethers"|2\.29|hardhat-ethers|hardhat-verify|gasReporter|gasLimit' -C 2 || true
done

Repository: threshold-network/keep-core

Length of output: 6585


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== hardhat deps across tracked files =="
rg -n '"hardhat"|"hardhat-ethers"|hardhat-version|gasLimit' --glob '!node_modules' --glob '!dist' --glob '!build' . | head -n 200 || true

echo "== package manifests =="
git ls-files '*package.json' | while read -r f; do
  echo "-- $f --"
  sed -n '1,240p' "$f" | jq -r '
    ["dependencies","devDependencies","peerDependencies"][] // empty
    as $section
    | ("[" + $section + "]: " + (.[$section] | tostring))
  ' 2>/dev/null | rg "hardhat|hardhat-ethers" || true
done

echo "== hardhat config gas settings =="
git ls-files 'hardhat.config.*' | while read -r f; do
  echo "-- $f --"
  sed -n '1,260p' "$f" | rg -n "gasLimit|hardhat|evmVersion|fork|mempool|gasMultiplier|gasPrice|maxFee|gas" -C 3 || true
done

Repository: threshold-network/keep-core

Length of output: 50384


🌐 Web query:

Hardhat 2.29 EIP-7623 intrinsic calldata floor gasMinimum documentation

💡 Result:

As of July 27, 2026, Hardhat v2.29.0 does not contain specific implementation logic or documentation regarding the intrinsic calldata floor gas requirement introduced by EIP-7623 [1][2]. The v2.29.0 release was a minor update focused on Mocha compatibility and TypeScript initialization [1]. EIP-7623: Increase calldata cost is an Ethereum standard that mandates a change in how transaction gas is calculated, specifically by introducing a minimum gas floor for data-heavy transactions [3][4]. Under this EIP, transactions that do not exceed a certain threshold of gas spent on EVM operations relative to gas spent on calldata are subject to an increased calldata cost (10/40 gas per byte) [3][4]. This ensures that data-heavy transactions contribute more appropriately to the network's gas usage, effectively reducing the maximum block size [3][4]. While node software and core development libraries (such as Geth) have moved to implement this logic [5], Hardhat's core package (v2.29.0) does not explicitly detail support for this intrinsic gas floor in its release notes or documentation [1][6][7]. Users relying on Hardhat for testing environments that require EIP-7623 compliance should monitor ongoing updates to Hardhat's Ethereum Development Runtime (EDR) or subsequent Hardhat versions, as EIP support in Hardhat is typically rolled out through these components [6][7][8].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== tracked package manifests =="
git ls-files '*package.json' | sed -n '1,120p'

echo "== hardhat dependency lines in tracked manifests only =="
git ls-files '*package.json' \
  | xargs -r rg -n '"hardhat"|"hardhat-ethers"|`@nomicfoundation/hardhat-network`'| head -n 200 || true

echo "== package-manager/config lock summary =="
for f in package-lock.json pnpm-lock.yaml yarn.lock bun.lockb bun.lock README.md; do
  [ -e "$f" ] && printf '\n-- %s --\n' "$f" && sed -n '1,180p' "$f" | rg -n 'hardhat|hardhat-ethers|`@nomicfoundation/hardhat-network`|lockfileVersion|packageManager' -C 2 || true
done

echo "== test gas-limit comments context nearby =="
sed -n '3008,3032p' solidity/ecdsa/test/WalletRegistry.WalletCreation.test.ts | cat -n

Repository: threshold-network/keep-core

Length of output: 1909


Clarify which gas-failure path this test covers.

gasLimit: 220000 clears the pre-execution gas minimum, so this test is meant to exercise the contract-level challengeDkgResult gas check, not the Hardhat rejection for transactions below that minimum. Update the comment to avoid describing the below-floor rejection as the behavior under test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@solidity/ecdsa/test/WalletRegistry.WalletCreation.test.ts` around lines 3018
- 3026, Update the comment above the challengeDkgResult call in the gas-limit
test to state that gasLimit 220000 clears Hardhat’s pre-execution calldata floor
and exercises the contract-level gas check; remove language implying the test
asserts rejection below that floor.

).to.be.reverted
})
})
Expand Down
Loading
Loading