docs: public ECDSASignature sign(byte[] messageHash) {
          ECDSASignature sig = doSign(messageHash);
          // Now we have to work backwards to figure out the recId needed to recover the
          // signature.
          int recId = -1;
          byte[] thisKey = this.pub.getEncoded(/* compressed */ false);
          for (int i = 0; i < 4; i++) {
              byte[] k = ECKey.recoverPubBytesFromSignature(i, sig, messageHash);
              if (k != null && Arrays.equals(k, thisKey)) {
                  recId = i;
                  break;
              }
          }
          if (recId == -1)
              throw new RuntimeException("Could not construct a recoverable key. This should never happen.");
          sig.v = (byte) (recId + 27);
          return sig;
      }