Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown on command line but rotation looks like it succeeded. #819

Open
daidoji opened this issue Jul 18, 2024 · 0 comments
Open

Error thrown on command line but rotation looks like it succeeded. #819

daidoji opened this issue Jul 18, 2024 · 0 comments
Labels
bug Something isn't working triage

Comments

@daidoji
Copy link
Contributor

daidoji commented Jul 18, 2024

Version

1.1.14

Environment

ubuntu, 3.12.2, local dev env on wsl2

Expected behavior

(keri) daidoji@LAPTOP-5KEUASIG:~/ssi/keripy$ kli incept --name foo --alias foo_alias --icount 1 --isith 1 --ncount 1 --nsith 1 --toad 0 --transferable
Prefix  ECZNKNzXY8Wel4hARpbF5qk7Ik-tdyxOmmYzDqSGsJVa                                                                                                                                                Public key 1:  DCz8w9lhFQaUrwCxhZaQ5wfjD7yPbUq7Uxk9QeJHRsXr

(keri) daidoji@LAPTOP-5KEUASIG:~/ssi/keripy$ kli rotate --name foo --alias foo_alias --next-count 0 --nsith 0 --isith 1
Prefix  ECZNKNzXY8Wel4hARpbF5qk7Ik-tdyxOmmYzDqSGsJVa
New Sequence No.  1
        Public key 1:  DCxwzouIx4fo5pXPmRa5-spl8BFr3Fobq43EPB3p7Iw5
(keri) daidoji@LAPTOP-5KEUASIG:~/ssi/keripy$ kli rotate --name foo --alias foo_alias --next-count 0 --nsith 0 --isith 1
ERR: Attempt to rotate nontransferable pre=ECZNKNzXY8Wel4hARpbF5qk7Ik-tdyxOmmYzDqSGsJVa.

This is the happy path (with expected failure on the third attempt). We create a transferable AID, rotate to no next keys, can't rotate again.

The expected behavior is that on an error in the second step we wouldn't get to step 3

Actual behavior

(keri) daidoji@LAPTOP-5KEUASIG:~/ssi/keripy$ kli incept --name foo --alias foo_alias --icount 1 --isith 1 --ncount 1 --nsith 1 --toad 0 --transferable
Prefix  EPCarWlq9tgf4zMtkKIKN1DSlJnl2i7_jxf_wQWRdH48                                                                                                                                                Public key 1:  DI1FoGk2F6nb8Fwu8DTX1lI7qLgt-kLcymRrM4SHZ-v-

(keri) daidoji@LAPTOP-5KEUASIG:~/ssi/keripy$ kli rotate --name foo --alias foo_alias --next-count 0 --nsith 0 --isith 0
ERR: Invalid sith = 0 less than 1.
(keri) daidoji@LAPTOP-5KEUASIG:~/ssi/keripy$ kli rotate --name foo --alias foo_alias --next-count 0 --nsith 0 --isith 1
ERR: Attempt to rotate nontransferable pre=EPCarWlq9tgf4zMtkKIKN1DSlJnl2i7_jxf_wQWRdH48.

The actual behavior is in step 2. We get an error that there's an invalid sith (which makes sense) but then something still appears to have changed state as we now get the error in step 3.

Steps to reproduce

Code snippets above should reproduce on command line.

@daidoji daidoji added bug Something isn't working triage labels Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant