test(evm/devnet): pin E2E devnet to solc 0.8.24+cancun (fix V10-UI-Tests)#1403
test(evm/devnet): pin E2E devnet to solc 0.8.24+cancun (fix V10-UI-Tests)#1403Bojan131 wants to merge 6 commits into
Conversation
…sts) The node-ui Playwright suite boots a throwaway devnet via scripts/devnet.sh, whose `hardhat deploy` compile failed HH600 "stack too deep by 1 slot" at KnowledgeAssetsLifecycle.sol:1626. Root cause: @openzeppelin/contracts is lockfile-pinned to 5.4.0 (utils/Bytes.sol uses mcopy/EIP-5656, pragma ^0.8.24), forcing a >=0.8.24 solc on Cancun -- and solc 0.8.26-0.8.28 hit an IR-codegen stack regression at that site. solc 0.8.24 satisfies OZ's ^0.8.24 + mcopy AND compiles cleanly (bisect: 0.8.24 ok, 0.8.26/0.8.27/0.8.28 fail). Adds a devnet-only hardhat.devnet.config.ts (solc 0.8.24 + cancun + cancun hardfork) and points devnet.sh's hardhat node/deploy at it. Production config (hardhat.node.config.ts, solc 0.8.20/london) is untouched, so deployed bytecode is unchanged. Version-controls what was previously an ephemeral Jenkins sed-patch. Test-infra only -- no contract or application source changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ompile smoke check, single config path Addresses all 3 otReviewAgent findings on #1403: 1. Compose, don't mutate: hardhat.devnet.config.ts no longer reaches into the imported hardhat.node.config singleton and mutates nested objects through casts. It now exports a COMPOSED config built from clones (spread the base, clone compilers[0] with version 0.8.24 + evmVersion cancun, clone networks.hardhat with hardfork cancun), and asserts its two base-shape expectations at load time — if the base ever moves to multiple compilers, an overrides-only solidity shape, or drops networks.hardhat, this file THROWS with instructions instead of silently retargeting whatever happens to sit at compilers[0]. 2. Direct validation: scripts/devnet.sh now runs a focused `hardhat compile --config "$HARDHAT_CONFIG"` smoke check BEFORE booting the node, so a config typo / shape drift / solc-cancun regression fails immediately with the compiler's own message (logged to $DEVNET_DIR/hardhat/compile.log) instead of surfacing minutes later as an opaque UI-e2e boot failure. Hardhat caches compilation, so re-runs cost ~1s. 3. Single config path: the filename is defined once as HARDHAT_CONFIG next to the other devnet constants and reused by both the node and deploy commands, making the must-stay-on-the-same-config coupling explicit. Verified: `hardhat compile --config hardhat.devnet.config.ts` with the new composed config compiles all 101 Solidity files successfully (evm target: cancun); bash -n clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
otReviewAgent
left a comment
There was a problem hiding this comment.
Review Agent completed this review and found no issues.
|
Adversarial review summary (config / CI / devnet artifacts) I reviewed the PR patch against the current CI/devnet flow. The core devnet wiring looks sound: Findings:
No other blocker found in the core fix. |
…tReviewAgent #1403 P2/P3) P2 — CI warmed the wrong config. The "Compile EVM contracts (for the devnet boot)" step ran `hardhat compile` with the DEFAULT config (solc 0.8.20/london), but this PR made devnet.sh compile + boot with `--config hardhat.devnet.config.ts` (solc 0.8.24/cancun). So the dedicated warm-up validated bytecode the Playwright devnet never uses, and a devnet-config regression would surface inside the webServer boot instead of the localized step. The step (and its stale comment) now compile with `--config hardhat.devnet.config.ts`. P3 — devnet artifacts no longer pollute production ones. hardhat.devnet.config.ts inherited the base `paths`, so its 0.8.24/cancun compile wrote build-info + artifacts into the shared `./cache` / `./artifacts`; a later non-devnet hardhat task in the same checkout could then pick up foreign bytecode. The devnet config now redirects only cache/artifacts to `./cache-devnet` / `./artifacts-devnet` (sources/tests/deploy roots unchanged), and .gitignore covers the new dirs. Verified: `hardhat compile --config hardhat.devnet.config.ts` compiles all 101 files (evm target: cancun) and writes to the isolated devnet dirs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks — both valid, both fixed in ✅ P2 — CI warmed the wrong config (fixed)Confirmed: the "Compile EVM contracts (for the devnet boot)" step ran ✅ P3 — devnet artifacts no longer pollute production ones (fixed)Right — the devnet config inherited the base |
The `Kosava: node-ui e2e (Playwright real-node devnet)` lane was red on a
racy assertion in `wm-swm-vm-ui-cycle.devnet.spec.ts` (UI-driven WM→SWM
migration on the SHARED seeded devnet CG) that timed out even after 2
retries, and the whole lane ran ~11m. Per the ask: keep the basics, drop
the heavy/flaky, ship green + faster.
Removed the 4 heavy, async, on-chain / soak specs (the flakiness + runtime
source):
- wm-swm-vm-ui-cycle — flaky UI migration on a shared CG; its
coverage is redundant with the API sibling,
and its publish step was already `fixme`.
- wm-swm-vm-lifecycle — on-chain KA mint (slow; 207-partial prone).
- conviction-publishing — destructive CG-wide `clearAfter` + on-chain.
- messaging-ownership-extended — 30s inter-node "soak" window.
Kept the fast, deterministic API/UI smoke (the basics):
- mcp-tools — status / identity / CG list / SPARQL / manifest.
- publishing-lifecycle — UI loads real CGs, operations view, WM create.
- cg-variants — nodes expose CGs, WM create, roles, UI listing.
- messaging-ownership — node reachable, peers, sessions, participants.
Basic messaging is still covered by messaging-ownership; the API-driven
publish surfaces remain exercised by the cli/publisher unit + integration
suites. Net: no more shared-CG async races in this lane, and a shorter run.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # packages/node-ui/e2e/specs/devnet/conviction-publishing.devnet.spec.ts # packages/node-ui/e2e/specs/devnet/wm-swm-vm-lifecycle.devnet.spec.ts
# Conflicts: # packages/node-ui/e2e/specs/devnet/conviction-publishing.devnet.spec.ts
What
Fixes the V10-UI-Tests pipeline (UNSTABLE on #66/#67/#68). The node-ui Playwright suite boots a throwaway devnet via
scripts/devnet.sh, and itshardhat deploycompile was failing — so the devnet never booted and every UI test failed.Root cause
scripts/devnet.sh → hardhat deploy(see.devnet/hardhat/deploy.log).@openzeppelin/contractsis lockfile-pinned to 5.4.0, whoseutils/Bytes.solemits themcopyopcode (EIP-5656) and declarespragma ^0.8.24→ needs a ≥0.8.24 solc on the Cancun EVM.KnowledgeAssetsLifecycle.sol:1626hitsHH600: stack too deep by 1 slot— a solc 0.8.26 IR-codegen regression. Compiler bisect: 0.8.24 ✅ · 0.8.26 ❌ · 0.8.27 ❌ · 0.8.28 ❌.Fix — test-infra only, no source/contract changes
packages/evm-module/hardhat.devnet.config.ts: extends the existing config, overriding solc →0.8.24, evmVersion →cancun, hardfork →cancun, for the disposable E2E devnet only.scripts/devnet.sh: pass--config hardhat.devnet.config.tsto the devnet'shardhat node+hardhat deploy.hardhat.node.config.ts(solc 0.8.20 / london) is unchanged → deployed bytecode unaffected.No
.solfiles and no application/daemon source are touched.Verification
hardhat compile --config hardhat.devnet.config.ts→ ✅ 101 files (cancun).hardhat compile --config hardhat.node.config.ts→ ✅ 101 files (london) — production compile unchanged.This version-controls a fix that was previously a live Jenkins pipeline sed-patch; that ephemeral patch can be dropped once this merges.
🤖 Generated with Claude Code