Skip to content

rpc: verifychainlock and verifyislock reject locks signed before v19 #8148

Open

Description

@PastaPastaPasta

verifychainlock and verifyislock cannot confirm a ChainLock or InstantSend lock that was signed before v19 (the BLS legacy scheme), on any node whose tip is past v19.

Both RPCs pick the scheme for decoding the signature from the block's height (legacy before v19), but then verify it under the basic scheme:

  • verifychainlock → chainlock::VerifyChainLock → llmq::VerifyRecoveredSig, which calls sig.VerifyInsecure(quorumPublicKey, signHash) with no scheme (src/llmq/quorumsman.cpp).
  • verifyislock → VerifyRecoveredSigLatestQuorums, same call.

quorum verify with an explicit quorumHash has the same gap one step earlier: it parses the signature and verifies it with no scheme, so basic, even when the named quorum's commitment is a legacy one. There the scheme can come from the quorum itself (quorum->qc->GetBLSScheme()).

A signature made under legacy does not verify under basic, so the RPC answers false for a valid historical lock. This is from reading the code; I have not run it against a real pre-v19 ChainLock.

This is not new. Before #8145 the verify call followed the process-wide scheme flag, which is basic once the tip is past v19; #8145 makes that "basic" explicit and does not change the outcome. It came up in review there and was left out to keep that PR free of behaviour changes.

A fix would pass the block-derived scheme (BLSSchemeAfter) from the two RPCs through VerifyChainLock / VerifyRecoveredSig to the VerifyInsecure call, leaving the live network paths on basic. It needs a test built on a real pre-v19 mainnet ChainLock and its quorum, since a regtest chain no longer forms quorums before v19.

Impact is low: only historical lookups over RPC are affected. Nothing on the network verifies a pre-v19 lock today.

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