docs: Heima EVM level is Cancun, not London (correct the rationale; keep the foundry pin)#168
Open
Kailai-Wang wants to merge 1 commit into
Open
docs: Heima EVM level is Cancun, not London (correct the rationale; keep the foundry pin)#168Kailai-Wang wants to merge 1 commit into
Kailai-Wang wants to merge 1 commit into
Conversation
…don foundry pin, fix the rationale) The "Heima is London EVM level" claim was derived from block-header introspection (baseFeePerGas present; mixHash/withdrawalsRoot/blobGasUsed absent). That reflects the Substrate/Aura consensus header FORMAT, not the EVM opcode-execution level — which Frontier sets independently via pallet_evm::config(). Verified on a local heima-node --dev chain (2026-06-01): - Frontier stable2412 config() returns &CANCUN_CONFIG. - PUSH0 (Shanghai): a Shanghai-compiled set(42) executed; x() == 42. - TSTORE/TLOAD (EIP-1153, Cancun-only): rt(99) == 99. So Heima does NOT reject PUSH0 / post-London opcodes (the old note was wrong). The evm_version = "london" pin in foundry.toml is RETAINED, but its reason is corrected: it is a 'forge script' simulator header-validation workaround (forge script validates the prevrandao-less Heima header against the target revision and rejects paris+), NOT an EVM-capability ceiling. Verified: DeployAgentKeysV1.s.sol with FOUNDRY_EVM_VERSION=cancun reproduces "header validation error: prevrandao not set"; london deploys. (forge create --broadcast with cancun does NOT hit this.) Updates the canonical CLAUDE.md section + foundry.toml comment + 5 docs that repeated the "Heima is London" framing.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Our docs assert "Heima is London EVM level" and pin
evm_version = \"london\"incrates/agentkeys-chain/foundry.tomlon that basis. The EVM-level claim is wrong, and the reason for the pin is mis-stated. This PR corrects the rationale across the canonicalCLAUDE.mdsection +foundry.tomlcomment + 5 docs that repeated it. Thelondonpin itself is unchanged — it's still needed, just for a different reason.Root cause of the error
The "London" conclusion came from block-header introspection (
baseFeePerGaspresent;mixHash/withdrawalsRoot/blobGasUsedabsent → inferred< Shanghai). But Heima is a Substrate/Aura parachain via Frontier — those missing fields are Ethereum PoS-consensus header fields, not opcode-capability signals. The EVM's opcode level is set independently by Frontier'spallet_evm::config().Verified on-chain (local
heima-node --dev, 2026-06-01)set(42)(Shanghai-compiled)PUSH0(0x5f)x()== 42rt(99)TSTORE/TLOAD(EIP-1153)99Source confirms it: Frontier
stable2412frame/evm/src/lib.rsconfig()returns&CANCUN_CONFIG(the// Londondoc-comment one line up is stale upstream).➡️ Heima's EVM execution level is Cancun. It does not reject
PUSH0or other ≤Cancun opcodes — the oldfoundry.tomlnote ("london avoids PUSH0 which Heima would reject") was false.Why the
londonpin still stays (the real reason)forge script ... --broadcastruns a local simulation that validates the fetched block header against the target EVM revision before broadcasting. Heima's header has noprevrandao, so aparis+ target errors:Verified: running the real
DeployAgentKeysV1.s.solagainst the dev chain withFOUNDRY_EVM_VERSION=cancunreproduces this; withlondonit deploys. (Note:forge create --broadcastwithcancundoes not hit this — it's specific toforge script's simulator, which is our deploy path. So the pin stays.)So: opcode level = Cancun; the
londonpin = aforge scriptheader-validation workaround, not an EVM-capability ceiling. These are two independent facts the docs had conflated.Files changed (docs/config only — no code, no pin value change)
CLAUDE.md— rewrote "Heima EVM compatibility level" to separate the two facts + note that header-introspection is the wrong way to read opcode level.crates/agentkeys-chain/foundry.toml— corrected the comment aboveevm_version = \"london\"(value unchanged).docs/chain-setup.md,docs/v2-stage2-heima-deploy-and-test.md,docs/wiki/heima-setup-faq.md,docs/spec/deployed-contracts.md,docs/research/ai-hardware-companion-office-hours.md— corrected the repeated "Heima is London" framing.Note
The P-256 precompile absence mentioned in stage-2 docs is true and unaffected — Heima has no RIP-7212
0x100precompile regardless of EVM version; that's why we ship the pure-SolidityP256Verifier. This PR just stops tying that fact to a wrong "London" claim. (Broader P-256/4337 feasibility findings are in the comment on #163.)How to re-verify