Skip to content

Share the signing-capable key type rule between the node, the signer and wallet preflights #6402

Backlog

Description

@Claudius-Maginificent

TL;DR: Which identity key types can sign a state transition is written down in three places: the node's validator, the signing code, and the new wallet preflight. They agree today. If a future change updates only one of them, a wallet could create an identity whose keys the node will not accept, or refuse keys the node accepts.

User story

As a maintainer of Dash Platform, I want one owner for the "key type can sign state transitions" rule, so the wallet, the signer and the node cannot drift apart when key types change.

Scenario

Base flow

A wallet checks that a new identity's required keys can sign before it funds the identity. The node checks the same thing when it validates an identity-signed state transition, and StateTransition::sign refuses the other key types.

Actual behavior

These are three independent lists with the same members (ECDSA_SECP256K1, BLS12_381, ECDSA_HASH160).

Expected behavior

  • The node validator and the signer use the DPP predicate (or one versioned DPP rule), so a change to signing key types is made once.
  • The node keeps its current results for every shipped protocol version.

Detailed discussion

  • The node side is consensus code. Switching it to the shared predicate must give identical results for every shipped protocol version: a new validator generation selected only by an unreleased protocol version, or an in-place change proven not to alter consensus, per the coding conventions.
  • If signing support ever differs by protocol version, the predicate needs a platform_version parameter.
  • Tests: a table test that the predicate, the signer and the node validator agree for every KeyType.

Prior work

Attribution

🤖 Co-authored by Claudius the Magnificent AI Agent

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions