Skip to content

nightly-deploy-hardhat fails with Revive::AccountUnmapped #94

Description

@EnderOfWorlds007

What

The nightly-deploy-hardhat cell in .github/workflows/e2e.yml fails consistently when triggered (schedule or workflow_dispatch). The nightly-deploy-multi cell — which uses the same fixture pattern (foundry-style out/) — works.

Symptom

▸ contracts…
▸ build…
✔ build
▸ storage-and-dotns…
  📱 Approve on your phone: Fund contract deploy session key (1/1)
[+0.0s]    Account: mapped
  ✖ contracts: Dry-run failed: {
    "success": false,
    "value": {
      "type": "Module",
      "value": {
        "type": "Revive",
        "value": { "type": "AccountUnmapped" }
      }
    }
  }

The preflight reports SIGNER's account (5DfhGyQdFobKM8Ns… / h160 0x35cdb23f…) as mapped, but the contract dry-run still fails with AccountUnmapped — likely because the contract phase generates a per-deploy session key that hasn't been mapped to an h160.

Why it surfaced now

Nightly cells were never actually exercised in CI before today — Phase 5b/5c/5d ran on PR push only (where the nightly matrix is gated out). The first workflow_dispatch run after Phase 6 SIGINT exposed it. The first schedule cron at 06:00 UTC will reproduce.

Hypothesis

The contract-deploy session key needs to be claim-mapped to an h160 before Revive.instantiate dry-runs. Foundry single-contract deploys don't hit this because the session key gets reused across the foundry tests OR because the out/Counter.sol/Counter.json bytecode has no constructor args that exercise the mapping path. Multi-contract works (same fixture style), so the issue is specific to the hardhat artifact's bytecode/abi shape OR the artifact-discovery path in compileHardhat.

Investigation paths

  1. Compare extractFoundryBytecode vs extractHardhatBytecode — do they produce different bytes for the same hex?
  2. Check whether compileHardhat returns artifacts in a different order or names.
  3. Look at runContractsPhase's session-key funding step — is it gated on something hardhat-specific?
  4. Run gh workflow run e2e.yml -f simulate_failure=... style debugging if needed.

Workaround

The cell can be skipped from the matrix until fixed. Currently the auto-issue path will fire on every nightly, which is signal but noisy.

Run that surfaced it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions