WebOfTrust / keripy

Key Event Receipt Infrastructure - the spec and implementation of the KERI protocol
https://keripy.readthedocs.io/en/latest/
Apache License 2.0
55 stars 53 forks source link

multisig-rotation-in-third.sh error "ERR: invalid rotation, new key set unable to satisfy prior next signing threshold" unless participant keys rotated and queried #773

Closed kentbull closed 4 months ago

kentbull commented 4 months ago

Version

v1.1.13

Environment

Mac OS, Python 3.12, M1 Mac

Expected behavior

Rotating a multisig AID in the scripts/demo/basic/multisig-rotation-in-third.sh script should run and complete successfully.

Actual behavior

The kli multisig rotate calls in scripts/demo/basic/multisig-rotation-in-third.sh return errors as shown below:

ERR: invalid rotation, new key set unable to satisfy prior next signing threshold

Steps to reproduce

  1. Clone the KERIpy repository and vLEI repository: git clone https://github.com/WebOfTrust/keripy git clone https://github.com/WebOfTrust/vLEI
  2. In KERIpy source root switch to v1.1.13:
    cd keripy
    git switch v1.1.13
  3. In separate terminals in parallel:
    • In its own terminal session run the vLEI server
      cd vLEI
      vLEI-server -s ./schema/acdc -c ./samples/acdc/ -o ./samples/oobis/
    • In its own terminal session run the demo witnesses
      cd keripy/
      kli witness demo
      # should show the following output:
      Witness wan : BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha
      Witness wil : BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM
      Witness wes : BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX
      Witness wit : BM35JN8XeJSEfpxopjn5jr7tAHCE5749f0OobhMLCorE
      Witness wub : BIj15u5V11bkbtAxMA7gcNJZcax-7TgaBMLsQnMHpYHP
      Witness wyz : BF2rZTW79z4IXocYRQnjjsOuvFUQv-ptCf8Yltd7PfsM
  4. Run the scripts/demo/basic/multisig-rotation-in-third.sh script In a separate terminal session run the following:
    cd keripy/scripts/demo
    source demo-scripts.sh
    ./basic/multisig-rotation-in-third.sh
kentbull commented 4 months ago

I found that performing BOTH key rotations (kli rotate) and key state queries (kli query) for each of the participants in the multisig group allows the kli multisig rotate part of the script to succeed, yet the multisig interaction still fails.

Adding the following rotation commands and key state query commands, like in scripts/demo/basic/multisig-join.sh

# Rotate keys for each identifier
kli rotate --name multisig1 --alias multisig1
kli rotate --name multisig2 --alias multisig2
kli rotate --name multisig3 --alias multisig3

# Pull key state in from other multisig group participant identifiers
# Tell 2 about 1
kli query --name multisig2 --alias multisig2 --prefix EKYLUMmNPZeEs77Zvclf0bSN5IN-mLfLpx2ySb-HDlk4
# tell 2 about 3
kli query --name multisig2 --alias multisig2 --prefix ENkjt7khEI5edCMw5qugagbJw1QvGnQEtcewxb0FnU9U

# tell 1 about 2
kli query --name multisig1 --alias multisig1 --prefix EJccSRTfXYF6wrUVuenAIHzwcx3hJugeiJsEKmndi5q1
# tell 1 about 3
kli query --name multisig1 --alias multisig1 --prefix ENkjt7khEI5edCMw5qugagbJw1QvGnQEtcewxb0FnU9U

# tell 3 about 1
kli query --name multisig3 --alias multisig3 --prefix EKYLUMmNPZeEs77Zvclf0bSN5IN-mLfLpx2ySb-HDlk4
# tell 3 about 2
kli query --name multisig3 --alias multisig3 --prefix EJccSRTfXYF6wrUVuenAIHzwcx3hJugeiJsEKmndi5q1
2byrds commented 4 months ago

I'll add as a candidate to be considered for the top 10 https://github.com/WebOfTrust/keri/discussions/78

pfeairheller commented 4 months ago

Closed with #774

kentbull commented 4 months ago

With the latest 1.2.0-dev2 version I'm hitting a different problem with this script, that the waiting for signatures on the multisig interaction hang at the end and never finish. Is there something that multisig3 needs to do to take part in the interaction event?