Skip to content

fix(genesis): normalize genesis identity comparisons - #374

Open
pawansatoshi wants to merge 9 commits into
circlefin:mainfrom
pawansatoshi:fix/genesis-identity-validation
Open

fix(genesis): normalize genesis identity comparisons#374
pawansatoshi wants to merge 9 commits into
circlefin:mainfrom
pawansatoshi:fix/genesis-identity-validation

Conversation

@pawansatoshi

Copy link
Copy Markdown

Summary

Normalize hexadecimal identities at comparison boundaries during genesis validation.

schemaAddress and schemaHex accept mixed-case hexadecimal values, but several genesis validation checks previously compared raw strings. Because hexadecimal casing does not change the represented bytes, equivalent identities with different casing could bypass uniqueness or role-separation checks.

What changed

  • Normalize validator public keys before uniqueness checks.
  • Normalize validator registerer addresses before uniqueness checks.
  • Normalize controller addresses before cross-validator uniqueness checks.
  • Normalize operator/proxy-admin comparisons.
  • Normalize the hard-coded ValidatorRegistry proxy-address comparison.
  • Preserve the original input representation for serialization and error messages.

Regression coverage

Added tests covering:

  • Duplicate public keys with different hexadecimal casing.
  • Duplicate controllers with different casing.
  • Duplicate validator registerers with different casing.
  • Operator colliding with the proxy admin using different casing.
  • Controller colliding with the PVM proxy admin using different casing.

Security impact

This is a genesis/configuration integrity issue rather than a standalone permissionless exploit.

Without normalization, a malformed genesis configuration could represent the same underlying address/key bytes multiple times while bypassing string-based uniqueness or role-separation checks. This could result in unintended duplicate identities or role assignments during genesis construction.

The fix makes comparisons operate on the represented hexadecimal identity rather than its textual casing.

Validation

The regression tests are included in:

tests/unit/validator-manager-genesis-validation.test.ts

The full Arc toolchain was not executed in this environment. Before merging, run the repository's normal validation commands, including:

  • make test-unit-hardhat
  • make lint

and attach/verify the resulting CI checks.

Scope

This PR is intentionally limited to genesis identity normalization and its regression coverage. EIP-7702 transaction-pool research was kept separate from this PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant