Summary
A clean checkout cannot load the host-chain Hardhat configuration when KEY, KEY2, and AGGREGATOR_KEY are unset. This blocks local/offline commands such as compile, test, and even hardhat --help, although those commands do not use the configured live networks.
Affected file
contracts/internal/host-chain/hardhat.config.ts
Reproduction
Audited revision: a114e87b24ae336431c52e5177ce4a51a1dcc18d
From contracts/internal/host-chain after pnpm install --frozen-lockfile:
env -u KEY -u KEY2 -u AGGREGATOR_KEY pnpm compile
Observed result:
Error HH8: There's one or more errors in your config file:
Invalid account: #0 for network: ethLocal - Expected string, received undefined
...
Hardhat reports 12 invalid account entries and exits with status 1.
Control: providing placeholder values for those three variables allows the same checkout to compile 56 Solidity files and run all 142 host-chain tests successfully. The repository CI currently supplies dummy keys with a comment that they are required by the Hardhat network config but are not used by tests.
Expected behavior
Local/offline Hardhat commands should load without credentials for unrelated configured networks. Missing account variables should only fail when a command actually selects a network that requires them.
Why this matters
Contributors and clean CI environments currently need to invent private-key-shaped placeholder values merely to compile or test the contracts. This is a development-tooling/configuration issue; no live network or contract-runtime impact was tested.
Suggested direction
Construct each network's accounts list only from defined values, or omit the field when no accounts are configured. Keep an explicit, network-specific validation error for commands that select a network requiring credentials.
Regression test
Add a smoke test that unsets all three account variables and verifies that the Hardhat config loads and an offline compile/test command starts successfully.
Duplicate check
I searched open and closed issues/PRs, issue comments, review comments, commit messages, the changelog, and current open PR file overlaps using HH8, Invalid account, accounts undefined, and the three environment-variable names. I found no report or proposed fix for this behavior. PR #123 is adjacent because it touches the same config, but it intentionally leaves the other network account arrays unchanged.
Summary
A clean checkout cannot load the host-chain Hardhat configuration when
KEY,KEY2, andAGGREGATOR_KEYare unset. This blocks local/offline commands such ascompile,test, and evenhardhat --help, although those commands do not use the configured live networks.Affected file
contracts/internal/host-chain/hardhat.config.tsReproduction
Audited revision:
a114e87b24ae336431c52e5177ce4a51a1dcc18dFrom
contracts/internal/host-chainafterpnpm install --frozen-lockfile:Observed result:
Hardhat reports 12 invalid account entries and exits with status 1.
Control: providing placeholder values for those three variables allows the same checkout to compile 56 Solidity files and run all 142 host-chain tests successfully. The repository CI currently supplies dummy keys with a comment that they are required by the Hardhat network config but are not used by tests.
Expected behavior
Local/offline Hardhat commands should load without credentials for unrelated configured networks. Missing account variables should only fail when a command actually selects a network that requires them.
Why this matters
Contributors and clean CI environments currently need to invent private-key-shaped placeholder values merely to compile or test the contracts. This is a development-tooling/configuration issue; no live network or contract-runtime impact was tested.
Suggested direction
Construct each network's
accountslist only from defined values, or omit the field when no accounts are configured. Keep an explicit, network-specific validation error for commands that select a network requiring credentials.Regression test
Add a smoke test that unsets all three account variables and verifies that the Hardhat config loads and an offline compile/test command starts successfully.
Duplicate check
I searched open and closed issues/PRs, issue comments, review comments, commit messages, the changelog, and current open PR file overlaps using
HH8,Invalid account,accounts undefined, and the three environment-variable names. I found no report or proposed fix for this behavior. PR #123 is adjacent because it touches the same config, but it intentionally leaves the other network account arrays unchanged.