verifiablesoftware / vsw

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

vsw client sometimes timeout #123

Open wenjing opened 3 years ago

wenjing commented 3 years ago

This happens intermittently. version=0.0.23.

(1) reopen an existing wallet (I backed up an old wallet and re-entered it) (2) test if it is still working properly - I tested it with a verify, and it worked. (3) some time later ...... in my case, overnight (4) test if it is still working with the same verify -- vsw timed out (5) check the repo's log, it shows the repo received and replied with proof presentation (6) I exited the wallet: "vsw exit", and then reopened it. (7) try the same verify again - it worked again.

So something is wrong in the vsw client side that is time dependent and causes it to fail in completing a transaction with the repo. The above is true for other commands as well - i also tested it with "publish". I think the two aca-py agents are performing correctly as I can observe the correct logs that agents print. It is something local inside the vsw client. Note also that the client's logs are not very useful and do not show clear relevant state information. I was only able to read the repo's log.

Repo side: {"message":"/webhooks/topic handler present_proof","level":"info","timestamp":"2021-06-16T17:39:53.647Z"} {"message":"webhook - /topic handler - present_proof - request_received","level":"info","timestamp":"2021-06-16T17:39:53.652Z"} {"message":"/webhooks/topic handler present_proof","level":"info","timestamp":"2021-06-16T17:39:55.071Z"} {"message":"webhook - /topic handler - present_proof - presentation_sent","level":"info","timestamp":"2021-06-16T17:39:55.072Z"} {"message":"/repologs","level":"info","timestamp":"2021-06-16T17:40:31.317Z"}

Client side: root@0e0928ea7cde:/workspace# root@0e0928ea7cde:/workspace# vsw list -c { "results": [ { "accept": "auto", "alias": "vsw-agent", "connection_id": "321d45de-dfee-48b1-970b-4088133e27b4", "created_at": "2021-06-15 19:21:05.238552Z", "initiator": "external", "invitation_key": "Gyd7HJRoYtyCNh542GDGR28XRjvFCVb2BtpQ6STwnxfu", "invitation_mode": "once", "my_did": "GDfrmngyhiET8JtLZNMWW6", "request_id": "fdbb2421-e314-4190-9be4-088217f3e67a", "routing_state": "none", "state": "active", "their_did": "9gxGu75sUrDGt9Traambtx", "their_label": "Repo.Agent", "updated_at": "2021-06-15 19:21:06.251575Z" } ] } root@0e0928ea7cde:/workspace# vsw verify -p ./V1.json

Request timeout, Verified error! root@0e0928ea7cde:/workspace# root@0e0928ea7cde:/workspace# vsw exit root@0e0928ea7cde:/workspace# root@0e0928ea7cde:/workspace# root@0e0928ea7cde:/workspace# vsw setup wallet wallet1 -k 12345 success root@0e0928ea7cde:/workspace# vsw verify -p ./V1.json ======presentation_request======== { "name": "Proof of Test Certificate", "nonce": "817818160416396052203310", "requested_attributes": { "0_software_certificate_uuid": { "names": [ "softwarename", "softwareversion", "developerdid", "softwaredid", "softwarehash", "softwareurl", "mediatype", "sourcedid", "sourceurl", "sourcehash", "buildertooldidlist", "dependencydidlist", "buildlog", "builderdid" ], "non_revoked": { "from": 0, "to": 1623865415 }, "restrictions": [ { "attr::softwarename::value": "vsw", "attr::softwareversion::value": "0.0.11", "issuer_did": "SYzPAV7MYqVcj9NGd81TeM", "schema_id": "UyDtaEFuTySAV9VZDykHkh:2:softwareCertificate:0.3" } ] } }, "requested_predicates": {}, "version": "1.0" } ======requested_proof======== { "predicates": {}, "revealed_attr_groups": { "0_software_certificate_uuid": { "sub_proof_index": 0, "values": { "builderdid": { "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549", "raw": "" }, "buildertooldidlist": { "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549", "raw": "" }, "buildlog": { "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549", "raw": "" }, "dependencydidlist": { "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549", "raw": "" }, "developerdid": { "encoded": "115641294278365933025139977976897817697273740335537958149839077844043347368607", "raw": "SYzPAV7MYqVcj9NGd81TeM" }, "mediatype": { "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549", "raw": "" }, "softwaredid": { "encoded": "25632158873935895475929299665289329229782998630191614198369896518794518156903", "raw": "8gaKPGRxukBaFcqey1n218" }, "softwarehash": { "encoded": "12780441039413763077642702532216248602998773634090724917978692605609708690275", "raw": "z2d9pM8uz5CPu3tZ7xmyyNPVVWyMLzNLdXSRuHfhd5EiVB1VVey2hR3UaGQ9PhAx1Wh4yuMPc6zsE1LiJDNVdxSy5N" }, "softwarename": { "encoded": "27794724627924760946003145822168634251007853441043319696617228984540219434388", "raw": "vsw" }, "softwareurl": { "encoded": "53230171557720878823425978075631286588242450595207158701464928539381187189366", "raw": "https://files.pythonhosted.org/packages/af/a2/269b2d19a6b9fd6dc2b504f91c7562fe9878b6edfecdc4a23407b0e9f872/vsw-0.0.11-py3-none-any.whl" }, "softwareversion": { "encoded": "49513725895899689054064142250869158943483354144004310839609766134835162879760", "raw": "0.0.11" }, "sourcedid": { "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549", "raw": "" }, "sourcehash": { "encoded": "12780441039413763077642702532216248602998773634090724917978692605609708690275", "raw": "z2d9pM8uz5CPu3tZ7xmyyNPVVWyMLzNLdXSRuHfhd5EiVB1VVey2hR3UaGQ9PhAx1Wh4yuMPc6zsE1LiJDNVdxSy5N" }, "sourceurl": { "encoded": "94264147059808493236756018673486502755283721132118570832757932210166881055505", "raw": "https://files.pythonhosted.org/packages/7e/27/300a61d019fec87cc9104da199262bd01d15298dc8c21c79b0cb5ffddd5a/vsw-0.0.11.tar.gz" } } } }, "revealed_attrs": {}, "self_attested_attrs": {}, "unrevealed_attrs": {} } Verified error, Verified result from indy is False

felixchen1023 commented 3 years ago

can you attach aca-py logger content in the client side?

wenjing commented 3 years ago

This is likely due to imperfection in the localtunnel utility we rely on. Will observe but not fix for now.