Skip to content

genesis: testnet/devnet config.json no longer satisfy the ValidatorManager/ProtocolConfig schema — hardhat genesis throws #410

Description

@osr21

Flagging as an external, unaffiliated contributor — advisory only, no write access to this repo. Verified locally against a fresh clone; no code changes proposed here per the new contribution policy in discussion #405.


assets/testnet/config.json and assets/devnet/config.json no longer satisfy schemaGenesisConfig, so genesis regeneration for both networks throws instead of producing output. assets/mainnet/config.json is unaffected.

Repro (no RPC/mnemonic needed — the parse happens before either is used):

git clone --recurse-submodules https://github.com/circlefin/arc-node
cd arc-node && npm ci
foundryup -i $(cat .foundry-version) && npx hardhat compile
npx hardhat genesis --network testnet   # or --network devnet

Both throw a ZodError with the same six issues:

ProtocolConfig: Unrecognized key(s) in object: 'beneficiary'
ValidatorManager.validators.0.controllers: Required
ValidatorManager.validators.1.controllers: Required
ValidatorManager.validators.2.controllers: Required
ValidatorManager.PermissionedValidatorManager.pauser: Required
ValidatorManager.PermissionedValidatorManager: Unrecognized key(s) in object: 'controllers'

(Separately, the Hardhat CLI's own error handler crashes with an unrelated TypeError: Cannot read properties of undefined (reading 'value') while trying to print this ZodError, from node:internal/util/inspect — that's a cosmetic issue in the CLI's error formatting, not part of this bug. Calling the network's genesis.config.ts build() directly surfaces the real ZodError above.)

Root cause: both committed config files predate two schema changes that have since landed in the public repo:

  • 46324c4 (2026-05-05) dropped ProtocolConfig.beneficiary.
  • 205c9f2 (2026-05-21) restructured ValidatorManager: PermissionedValidatorManager.controllers: address[] became a required pauser: address field, and each entry in validators[] gained a required controllers: {address, votingPowerLimit}[] array (replacing the flat top-level controller list).

assets/testnet/config.json and assets/devnet/config.json were last written by d3ed5c7 (2026-04-22) — before either change — and have not been regenerated since. assets/mainnet/config.json was authored later in the new shape, which is why only mainnet still parses. The two most recent schema commits (#346, #359, both 2026-09-08) are unrelated to this — they only add stricter numeric bounds that testnet/devnet's existing values already satisfy.

Impact: CI doesn't invoke genesis for testnet/devnet (only localdev and mainnet are exercised anywhere in .github/workflows/), so this is silent rather than a build break. It surfaces whenever someone tries to actually regenerate testnet/devnet genesis locally, or treats these committed configs as a source of truth for the current validator/pauser/controller wiring on those networks — the "controllers" they list are stale under the current schema's semantics.

On a fix: this isn't a schema bug to patch — the config files need to be brought up to the new shape with real values (which pauser address, which per-validator controller(s) at which voting-power limits) that only the team can supply for testnet/devnet, the way assets/mainnet/genesis.config.ts already hardcodes real addresses for mainnet. Happy to take this if it gets assigned; per the new policy I won't open a PR without that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions