Skip to content

fix(dpp): malformed hash-type key data surfaces as an internal error instead of a consensus error #5441

Closed

Description

@shumkov

A hash-type identity public key (ECDSA_HASH160, BIP13_SCRIPT_HASH, EDDSA_25519_HASH160) whose data is not 20 bytes passes key-structure validation and then fails in key.hash() / public_key_hash(). In check_tx this surfaces as an internal error response (logged at ERROR); in a block, state validation returns InternalError for that transition. This affects IdentityCreate, IdentityCreateFromAddresses, IdentityUpdate (added keys) and the shielded identity create.

It is handled safely today (check_tx refuses it, an honest proposer drops it, validators reject a block holding it), but a user mistake should be a consensus error, not an internal error. To do: validate key data (length per key type, and point validity for ECDSA/BLS keys) in the shared key-structure check, as a new version selected by the next protocol version.

Activity

  1. added this to the v5.1.0 milestone on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions