verifiablesoftware / vsw

Core project of VerifiableSoftware
Apache License 2.0
1 stars 0 forks source link

Setting DID as an ENDORSER #81

Closed wenjing closed 3 years ago

wenjing commented 3 years ago

Ubuntu bionic container vsw version 0.0.4

Run the very first vsw setp: root@f6fdf91d9796:/# vsw setup -n wallet1 -p

It prints out DID and Verkey.

Problems (1) It prints out 2 ERROR message. These should be INFO and should go to vsw log file 2021-04-14 17:32:57 vsw.commands.setup ERROR /usr/local/lib/python3.6/dist-packages/vsw/commands/setup.py Error during provisioning 2021-04-14 17:32:57 vsw.commands.setup ERROR /usr/local/lib/python3.6/dist-packages/vsw/commands/setup.py please check if your public DID and verkey is registered in the ledger!

(2) Then the user is to get around by setting itself as an ENDORSER. (Although this is not the final solution, we will rely on this workaround for now).

I did it this way: root@f6fdf91d9796:/# curl --header "Content-Type: application/json" --request POST --data '{"network":"buildernet","did":"5QPk5moBBWiqvGaGe4QYfr","verkey":"3QCT15zwe1AuXtekGCBqLWWcmqZqRrxvq6urk7bCAs4R","paymentaddr":""}' https://selfserve.sovrin.org/nym {"statusCode": 200, "headers": {"Access-Control-Allow-Origin": "*"}, "body": "{\"statusCode\": 200, \"5QPk5moBBWiqvGaGe4QYfr\": {\"status\": \"Success\", \"statusCode\": 200, \"reason\": \"Successfully wrote NYM identified by 5QPk5moBBWiqvGaGe4QYfr to the ledger with role ENDORSER\"}}"}root@f6fdf91d9796:/#

We should make this look nicer by making this an explicit setup step, e.g.

% vsw setup --endorser --did 5QPk5moBBWiqvGaGe4QYfr --verkey 3QCT15zwe1AuXtekGCBqLWWcmqZqRrxvq6urk7bCAs4R

wenjing commented 3 years ago

This is part of #82 so I'm closing this.