You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
genesis: ValidatorManager schema accepts a validator public key of any length; the chain requires 32 bytes #413
scripts/genesis/ValidatorManager.ts types a validator publicKey as schemaHex — any 0x plus an even number of hex digits — while the chain only accepts 32-byte keys:
The 32-byte rule exists in the genesis tooling only as a throw new Error('Public key must be 32 bytes') inside buildValidatorManagerGenesisAllocs. genesis.ts parses the whole config with schemaGenesisConfig.parse first (line 161) and builds later (line 188), so a 31-byte key passes validation, passes the public-key uniqueness check, and only fails afterwards with an error that names no path.
The schema rejects any publicKey that is not exactly 32 bytes, with a path, the same way #359 moved the consensus-timeout and base-fee range checks into the schema. schemaBytes32 already exists in scripts/genesis/types.ts and is exactly {32} bytes.
Every key in assets/*/genesis.config.ts is already 64 hex characters, so no shipped config changes.
Related
#346, #359 (same class: genesis schema aligned with a runtime check). Does not overlap #374, which normalizes hex casing and leaves the field type alone.
I have a fix ready in #401 and would like to be assigned.
Activity