AnonSolutions / indy-community-demo

Demo of the django indy framework
0 stars 15 forks source link

Error in demo version #17

Open guilherme-funchal opened 4 years ago

guilherme-funchal commented 4 years ago

Hi

I need help, I tried to use the demo version, but I get the following error in the terminal :

indy-django_1 | Traceback (most recent call last): indy-django_1 | File "manage.py", line 15, in indy-django_1 | execute_from_command_line(sys.argv) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line indy-django_1 | utility.execute() indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute indy-django_1 | self.fetch_command(subcommand).run_from_argv(self.argv) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv indy-django_1 | self.execute(*args, *cmd_options) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute indy-django_1 | output = self.handle(args, *options) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/management/commands/loads_orgs.py", line 91, in handle indy-django_1 | org = org_signup(user, password, name, org_attrs=org_attrs, org_relation_attrs=relation_attrs, org_role=org_role, org_ico_url=ico_url) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/registration_utils.py", line 74, in org_signup indy-django_1 | org = org_provision(org, raw_password, org_role) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/registration_utils.py", line 59, in org_provision indy-django_1 | creddef = create_creddef(org.wallet, schema, schema.schema_name + '-' + org.wallet.wallet_name, schema.schema_template) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/agent_utils.py", line 180, in create_creddef indy-django_1 | cred_def = run_coroutine_with_args(CredentialDef.create, 'credef_uuid', creddef_name, indy_schema.ledger_schema_id, 0) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/utils.py", line 91, in run_coroutine_with_args indy-django_1 | return loop.run_until_complete(coroutine(args)) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete indy-django_1 | return future.result() indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/vcx/api/credential_def.py", line 76, in create indy-django_1 | c_params) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/vcx/api/vcx_base.py", line 47, in _create indy-django_1 | cls.create.cb) indy-django_1 | vcx.error.VcxError: (<ErrorCode.CreateCredentialDefErr: 1034>, {'backtrace': '', 'cause': 'Error: Unknown libindy error\n Caused by: Error: Pool timeout\n Caused by: Consensus is impossible\n\n', 'error': 'Call to create Credential Definition failed', 'message': 'Error: Call to create Credential Definition failed\n Caused by: Error: Unknown libindy error\n Caused by: Error: Pool timeout\n Caused by: Consensus is impossible\n\n\n'})

ianco commented 4 years ago

You're getting a "pool timeout" error, which means the demo is not able to connect to the Indy ledger. What steps are you following to run the demo?

guilherme-funchal commented 4 years ago

HI!

Thank you so much for responding quickly

Open two shells, and in each shell run:

git clone https://github.com/bcgov/von-network.git cd von-network ./manage build ./manage start ... and in the second shell:

git clone https://github.com/AnonSolutions/indy-community-demo.git

this is necessary only on 'nix since we are mounting local directories

chmod -R a+rwx indy-community-demo/indy_community_demo cd indy-community-demo/docker ./manage start

ianco commented 4 years ago
  1. Try to open a browser on http://localhost:9000/ and make sure you can see the ledger browser. This will verify the Indy network is actually running

  2. What platform are you running on? (Windows, MacOS, etc?)

guilherme-funchal commented 4 years ago

Ok 1.It's running normal, I can see all nodes in uptime

DID: Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv
Uptime: 1 hours, 20 minutes, 19 seconds
Txns: 0 config, 5 ledger, 4 pool, 0.0407/s read, 0/s write
indy-node version: 1.9.2

Node2

DID: 8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb
Uptime: 1 hours, 20 minutes, 18 seconds
Txns: 0 config, 5 ledger, 4 pool, 0.0407/s read, 0/s write
indy-node version: 1.9.2

Node3

DID: DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya
Uptime: 1 hours, 20 minutes, 18 seconds
Txns: 0 config, 5 ledger, 4 pool, 0.0386/s read, 0/s write
indy-node version: 1.9.2

Node4

DID: 4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA
Uptime: 1 hours, 20 minutes, 18 seconds
Txns: 0 config, 5 ledger, 4 pool, 0.0361/s read, 0/s write
indy-node version: 1.9.2
  1. I'm use Linux Ubuntu 18.04
ianco commented 4 years ago

Hmmm it's a strange error. I haven't tested the scrips on Ubuntu (or run this repo recently). I'll give it a try but likely won't have time today, I'll report back on the weekend.

It looks like a schema was created (you should be able to see the transaction through the ledger browser - click on the "Domain" link below the list of nodes) but not the credential definition. Weird.

guilherme-funchal commented 4 years ago

For me looks its OK

1 | Transaction Type: NYM Nym: V4SGRU86Z58d6TV7PBUe6f Role: TRUSTEE Verkey: ~CoRER63DVYnWZtK8uAzNbx Raw Data { "auditPath": [ "3XtSyZ8CQPJUYbc5mFKvUendLZSt4ybG2Y4zRtJEewSL", "96irBGYpWrTvrVATexGGvktPrT3WicixwT8BtoZTtkYX", "Hf2vXibDGJUFB2sMyhEPZZNKEPEiY4iLFxaxckeXwgKx" ], "ledgerSize": 5, "reqSignature": {}, "rootHash": "DJLzEifT7n9DbiCHqQ5KWrWUPFBiZt349popapDfzo5p", "txn": { "data": { "dest": "V4SGRU86Z58d6TV7PBUe6f", "role": "0", "verkey": "~CoRER63DVYnWZtK8uAzNbx" }, "metadata": {}, "type": "1" }, "txnMetadata": { "seqNo": 1 }, "ver": "1" }

-- | --

2 | Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Transaction Type: NYM Nym: Th7MpTaRZVRYnPiabds81Y Role: STEWARD Verkey: ~7TYfekw4GUagBnBVCqPjiC Raw Data { "auditPath": [ "JBMXqyYxQrtkq9AJjHueEiAtpGiNzVYXkgWqHkZo5zUi", "96irBGYpWrTvrVATexGGvktPrT3WicixwT8BtoZTtkYX", "Hf2vXibDGJUFB2sMyhEPZZNKEPEiY4iLFxaxckeXwgKx" ], "ledgerSize": 5, "reqSignature": {}, "rootHash": "DJLzEifT7n9DbiCHqQ5KWrWUPFBiZt349popapDfzo5p", "txn": { "data": { "dest": "Th7MpTaRZVRYnPiabds81Y", "role": "2", "verkey": "~7TYfekw4GUagBnBVCqPjiC" }, "metadata": { "from": "V4SGRU86Z58d6TV7PBUe6f" }, "type": "1" }, "txnMetadata": { "seqNo": 2 }, "ver": "1" }

3 | Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Transaction Type: NYM Nym: EbP4aYNeTHL6q385GuVpRV Role: STEWARD Verkey: ~RHGNtfvkgPEUQzQNtNxLNu Raw Data { "auditPath": [ "3CXeV5MsdAEeU4GLqwGhqvBFuSGAUVqn1xr77rfhWR4e", "D47RQhSxcBgWB1oBZwFeKom3Fvi343NTfpAdKb6uNLuw", "Hf2vXibDGJUFB2sMyhEPZZNKEPEiY4iLFxaxckeXwgKx" ], "ledgerSize": 5, "reqSignature": {}, "rootHash": "DJLzEifT7n9DbiCHqQ5KWrWUPFBiZt349popapDfzo5p", "txn": { "data": { "dest": "EbP4aYNeTHL6q385GuVpRV", "role": "2", "verkey": "~RHGNtfvkgPEUQzQNtNxLNu" }, "metadata": { "from": "V4SGRU86Z58d6TV7PBUe6f" }, "type": "1" }, "txnMetadata": { "seqNo": 3 }, "ver": "1" }

4 | Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Transaction Type: NYM Nym: 4cU41vWW82ArfxJxHkzXPG Role: STEWARD Verkey: ~EMoPA6HrpiExVihsVfxD3H Raw Data { "auditPath": [ "51ENLADqdvbecXzFQGM5YDk6F9S995TyZfdwFnefKdEb", "D47RQhSxcBgWB1oBZwFeKom3Fvi343NTfpAdKb6uNLuw", "Hf2vXibDGJUFB2sMyhEPZZNKEPEiY4iLFxaxckeXwgKx" ], "ledgerSize": 5, "reqSignature": {}, "rootHash": "DJLzEifT7n9DbiCHqQ5KWrWUPFBiZt349popapDfzo5p", "txn": { "data": { "dest": "4cU41vWW82ArfxJxHkzXPG", "role": "2", "verkey": "~EMoPA6HrpiExVihsVfxD3H" }, "metadata": { "from": "V4SGRU86Z58d6TV7PBUe6f" }, "type": "1" }, "txnMetadata": { "seqNo": 4 }, "ver": "1" }

5 | Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Transaction Type: NYM Nym: TWwCRQRZ2ZHMJFn9TzLp7W Role: STEWARD Verkey: ~UhP7K35SAXbix1kCQV4Upx Raw Data { "auditPath": [ "D52hsZf4iH4Kp4x4eEp18FicbPNdirG9TL2cvat1eKvL" ], "ledgerSize": 5, "reqSignature": {}, "rootHash": "DJLzEifT7n9DbiCHqQ5KWrWUPFBiZt349popapDfzo5p", "txn": { "data": { "dest": "TWwCRQRZ2ZHMJFn9TzLp7W", "role": "2", "verkey": "~UhP7K35SAXbix1kCQV4Upx" }, "metadata": { "from": "V4SGRU86Z58d6TV7PBUe6f" }, "type": "1" }, "txnMetadata": { "seqNo": 5 }, "ver": "1" }

6 | Message Wrapper Transaction ID: a3d72328d9865e29aa7f761330459b5304964882ac64a9e3415ad83a4e9feb7c Transaction time: 03/01/2020 15:02:43 (1578070963) Signed by: V4SGRU86Z58d6TV7PBUe6f Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Request ID: 1578070963868047400 Digest: 83ddf573618cd1020d5860f52a5124bd502cdfea1fd1076dcef2618f54bc08d6 Transaction Type: NYM Alias: o_anon_solutions_inc Nym: JGm22KSeapYEa8syXsE41a Role: ENDORSER Verkey: AQzaKVrbLVzJgfqtKXxzioE8VwuhFGNRGnJ6ddkVWH5c Raw Data { "auditPath": [ "Hf2vXibDGJUFB2sMyhEPZZNKEPEiY4iLFxaxckeXwgKx", "8Xfb7S6eMNqCe3mSoH5y8SALCEoDs1npstacT5KLrFph", "D52hsZf4iH4Kp4x4eEp18FicbPNdirG9TL2cvat1eKvL", "CXq83ySaj3rqSf41BA7umk3yQz198UenpFm9oPhDjutC" ], "ledgerSize": 10, "multi_signature": { "participants": [ "Node2", "Node4", "Node1" ], "signature": "RKn1rE8ivK1ZbQW3Q48Xwo6UAdvf5faC4oADPiSxdtfwPf8QcTbkXfW2bJBhbNAAAf7wbW4US9euLSmf8LjoUWTJWVZ8xMeTrxAhSX7S9i4HmQcTzBXX3QqnNadup8FjD9DxTa4ficQCqMKb5ncErFPERv3JeSxB57rmTt9BvQtqrX", "value": { "ledger_id": 1, "pool_state_root_hash": "6Jp8i3tid6NsFNJoVmLP2waaruUSVFC95DJcFj3doJ8L", "state_root_hash": "2qaS5BHYJqwyv4SVWwNwE6ZRiK9MKqtNN9ur7HRtWyXV", "timestamp": 1578070988, "txn_root_hash": "21ip32bVzTcstpWhwcJy3ysxuJUh24xisEPHHX1XeJyK" } }, "reqSignature": { "type": "ED25519", "values": [ { "from": "V4SGRU86Z58d6TV7PBUe6f", "value": "2MHdoG4MmuR61Rqvp8jFh22shYavcmB2eFDJjNLrDFgNwH1JutfuVZ7rvD7KC697hWAeQqG6epXqy4Hx3UfMws8u" } ] }, "rootHash": "21ip32bVzTcstpWhwcJy3ysxuJUh24xisEPHHX1XeJyK", "txn": { "data": { "alias": "o_anon_solutions_inc", "dest": "JGm22KSeapYEa8syXsE41a", "role": "101", "verkey": "AQzaKVrbLVzJgfqtKXxzioE8VwuhFGNRGnJ6ddkVWH5c" }, "metadata": { "digest": "83ddf573618cd1020d5860f52a5124bd502cdfea1fd1076dcef2618f54bc08d6", "from": "V4SGRU86Z58d6TV7PBUe6f", "payloadDigest": "c85093109514fcecd56ab83cf7fa0926f88c422f780da07843a7dd3dc4d8a872", "reqId": 1578070963868047400 }, "protocolVersion": 2, "type": "1" }, "txnMetadata": { "seqNo": 6, "txnId": "a3d72328d9865e29aa7f761330459b5304964882ac64a9e3415ad83a4e9feb7c", "txnTime": 1578070963 }, "ver": "1" }

7 | Message Wrapper Transaction ID: f7edaed4578e86522f692dd4e27b186ddf4ee1f414b38a3bfd9b3a5a7106b3b4 Transaction time: 03/01/2020 15:02:52 (1578070972) Signed by: V4SGRU86Z58d6TV7PBUe6f Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Request ID: 1578070972782640000 Digest: 45759f6d3caa5bfa114c2a362956e1cbad752e269d57b9c4c13a55542673e58d Transaction Type: NYM Alias: o_faber_college Nym: U4mQRtGc7nURTidnkGGZTG Role: ENDORSER Verkey: FkaPKMeYnCRPPce9orVrDSKDAKmoD4TDtun2JkcvWQox Raw Data { "auditPath": [ "AuRYUJojZjcaWWWkMbPqPULizus2Tzm68gFq8JZt6hMy", "CSCiKTBDgsN496xpZyhFwYVU3rxQ9dbBaUNZEFuAADxY", "D52hsZf4iH4Kp4x4eEp18FicbPNdirG9TL2cvat1eKvL", "CXq83ySaj3rqSf41BA7umk3yQz198UenpFm9oPhDjutC" ], "ledgerSize": 10, "multi_signature": { "participants": [ "Node2", "Node4", "Node1" ], "signature": "RKn1rE8ivK1ZbQW3Q48Xwo6UAdvf5faC4oADPiSxdtfwPf8QcTbkXfW2bJBhbNAAAf7wbW4US9euLSmf8LjoUWTJWVZ8xMeTrxAhSX7S9i4HmQcTzBXX3QqnNadup8FjD9DxTa4ficQCqMKb5ncErFPERv3JeSxB57rmTt9BvQtqrX", "value": { "ledger_id": 1, "pool_state_root_hash": "6Jp8i3tid6NsFNJoVmLP2waaruUSVFC95DJcFj3doJ8L", "state_root_hash": "2qaS5BHYJqwyv4SVWwNwE6ZRiK9MKqtNN9ur7HRtWyXV", "timestamp": 1578070988, "txn_root_hash": "21ip32bVzTcstpWhwcJy3ysxuJUh24xisEPHHX1XeJyK" } }, "reqSignature": { "type": "ED25519", "values": [ { "from": "V4SGRU86Z58d6TV7PBUe6f", "value": "3JwxiWahVzNmQegoB2hydoKXdCCzv3Wcn8vzovDvj4oMk6xL1JNC9d4SUBGJxqZ9jiwT2rEME1mvg6yu68v56pW" } ] }, "rootHash": "21ip32bVzTcstpWhwcJy3ysxuJUh24xisEPHHX1XeJyK", "txn": { "data": { "alias": "o_faber_college", "dest": "U4mQRtGc7nURTidnkGGZTG", "role": "101", "verkey": "FkaPKMeYnCRPPce9orVrDSKDAKmoD4TDtun2JkcvWQox" }, "metadata": { "digest": "45759f6d3caa5bfa114c2a362956e1cbad752e269d57b9c4c13a55542673e58d", "from": "V4SGRU86Z58d6TV7PBUe6f", "payloadDigest": "2c0195a4ce117979b8757eef0da818e2ed1b08dab836839265b38eb048ba7e8f", "reqId": 1578070972782640000 }, "protocolVersion": 2, "type": "1" }, "txnMetadata": { "seqNo": 7, "txnId": "f7edaed4578e86522f692dd4e27b186ddf4ee1f414b38a3bfd9b3a5a7106b3b4", "txnTime": 1578070972 }, "ver": "1" }

8 | Message Wrapper Transaction ID: 4f319e4a8b05d10e29a0a6cd0f2d271ada96235e4a1786a149061dcc3fa18e49 Transaction time: 03/01/2020 15:02:58 (1578070978) Signed by: V4SGRU86Z58d6TV7PBUe6f Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Request ID: 1578070978123516200 Digest: 26d26c6e2339550ebec21c7058a801dcf69092cb9b9606c47af8dba06ea11c95 Transaction Type: NYM Alias: o_acme_inc Nym: AhDeQ2udDSAzQzejYoFvc7 Role: ENDORSER Verkey: 6HRpYeeecCRgsG9uUrQPxFQUzRcKWSgAnSut3HHd8rEN Raw Data

9 | Message Wrapper Transaction ID: bbf2aad3860b4fdb2449b2834c2f64ea1dbc31027f89b40cd82ec6727f017d80 Transaction time: 03/01/2020 15:03:03 (1578070983) Signed by: V4SGRU86Z58d6TV7PBUe6f Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Request ID: 1578070983374049000 Digest: fb083158dfcb18ce4b463a9a6eb280e4cbab9167e0b85d644a49c13ff30f7c35 Transaction Type: NYM Alias: o_thrift_bank Nym: S88wA4cvCF8qPBtNndWaes Role: ENDORSER Verkey: EhBy4BKGdBzgbdL2mKUK9NRdmSFiz9BzkA8y4ovDVw7U Raw Data

10 | Message Wrapper Transaction ID: 615422b9ce255255fcba481ba46c8577336d09ace016cb1c3a28a800d88aae8a Transaction time: 03/01/2020 15:03:08 (1578070988) Signed by: V4SGRU86Z58d6TV7PBUe6f Metadata From nym: V4SGRU86Z58d6TV7PBUe6f Request ID: 1578070988615882000 Digest: 0bbeded128352a21a3e6b2c29d368d9cadd3ab9bae04f7f74e4e90686c58fe54 Transaction Type: NYM Alias: o_province_of_bc Nym: KtCGSAfKGES32W9wAeLUDA Role: ENDORSER Verkey: BHvFStrtRVvScHfQQZtfqDsk2WoaSKBZva32J54PcxRY Raw Data { "auditPath": [ "8dZf7SM1wFzCzfaw76pkHgVpRBcX4e85n65QU3iwH3rV", "9m9q7KHKhCaKXZGqoev9qDTixbxhGeTcPsMPr3VuDVdU" ], "ledgerSize": 10, "multi_signature": { "participants": [ "Node4", "Node1", "Node3" ], "signature": "QtVm22gzXuDQVTPDT8SY3DRtG8sG5hSWucfBQoy3Zuh5gqKi7aPjnsuK4dwxncYGqLJYSftxxh4f8bJB9wByJkEp7DKMRS1qfHzwovTQ197BRorEAgqiDYMMNVvVzLcXFm7usT4qMD2dmvBxMCtfWiJL1V6qdUKzSs6gEf8xcJh7pK", "value": { "ledger_id": 1, "pool_state_root_hash": "6Jp8i3tid6NsFNJoVmLP2waaruUSVFC95DJcFj3doJ8L", "state_root_hash": "2qaS5BHYJqwyv4SVWwNwE6ZRiK9MKqtNN9ur7HRtWyXV", "timestamp": 1578070988, "txn_root_hash": "21ip32bVzTcstpWhwcJy3ysxuJUh24xisEPHHX1XeJyK" } }, "reqSignature": { "type": "ED25519", "values": [ { "from": "V4SGRU86Z58d6TV7PBUe6f", "value": "63c4zT2h39eXSERHUUT6Fpp3YY749QS2n8E7PwM6NNAK4DMn6GCHWbCxphJBSH6p9BDuxuWqxoShV4N58Xs1h6XE" } ] }, "rootHash": "21ip32bVzTcstpWhwcJy3ysxuJUh24xisEPHHX1XeJyK", "txn": { "data": { "alias": "o_province_of_bc", "dest": "KtCGSAfKGES32W9wAeLUDA", "role": "101", "verkey": "BHvFStrtRVvScHfQQZtfqDsk2WoaSKBZva32J54PcxRY" }, "metadata": { "digest": "0bbeded128352a21a3e6b2c29d368d9cadd3ab9bae04f7f74e4e90686c58fe54", "from": "V4SGRU86Z58d6TV7PBUe6f", "payloadDigest": "e4ee8612f18a58c35fdf848277d85f7f25e3d7b8cba174353dfc7ee184de8ebd", "reqId": 1578070988615882000 }, "protocolVersion": 2, "type": "1" }, "txnMetadata": { "seqNo": 10, "txnId": "615422b9ce255255fcba481ba46c8577336d09ace016cb1c3a28a800d88aae8a", "txnTime": 1578070988 }, "ver": "1" }

guilherme-funchal commented 4 years ago

I can see the need to change in yaml.load function for yaml.safe_load in the loads_schemas.py and loads_orgs.py files.

I hope I helped you

guilherme-funchal commented 4 years ago

Hello

Whem I run base-image file, I can see this error :

error[E0119]: conflicting implementations of trait std::convert::From<&_> for type types::to_sql::ToSqlOutput<'_>: --> /home/indy/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.13.0/src/types/to_sql.rs:26:1 18 / impl<'a, T: ?Sized> From<&'a T> for ToSqlOutput<'a> 19 where &'a T: Into<ValueRef<'a>> 20 { 21 fn from(t: &'a T) -> Self { 22 ToSqlOutput::Borrowed(t.into()) 23 } 24 } _- first implementation here 25 26 impl<'a, T: Into> From for ToSqlOutput<'a> { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for types::to_sql::ToSqlOutput<'_>

= note: downstream crates may implement trait std::convert::From<&_> for type types::value::Value

error: aborting due to previous error

For more information about this error, try rustc --explain E0119. error: could not compile rusqlite. warning: build failed, waiting for other jobs to finish... error: build failed

ianco commented 4 years ago

There's been some Indy SDK re-factoring, so it looks like the script is picking up incompatible versions of something. Depending on what you're trying to accomplish, there may be some more up-to-date frameworks that you can work with. Have you looked at Aries Cloud Agent? (https://github.com/hyperledger/aries-cloudagent-python) There is some demo Python code and a recent PR with some sample application code that uses this agent (https://github.com/hyperledger/aries-cloudagent-python/pull/318). Let me know what you're trying to do and I can give you some pointers.

guilherme-funchal commented 4 years ago

I tried to test django-indy-community example in my job. I am working on a project that will use Hyperledger, and I am trying to get an idea of ​​the difficulties of using Django for this.

I tried to test : git clone https://github.com/AnonSolutions/django-indy-community.git

chmod -R a+rwx django-indy-community/indy_community_demo cd django-indy-community/docker ./base-image ./manage start

ianco commented 4 years ago

Django itself is pretty easy to use with Hyperledger. The problem is with the dependencies (Indy SDK, VCX, etc) which are constantly changing. One thing you can try is to use the published docker image (i.e. skip the "./base-image" step and it should download a docker image rather than build one). Eventually (when I have time) this library is going to me migrated to use the newer agent code (i.e. aries cloud agent rather than VCX), so I am currently recommending to people to look at Aries. The Aries cloud agent provides a REST API so it is very easy to use and integrate into pretty much any framework.

guilherme-funchal commented 4 years ago

I tried to use :

git clone https://github.com/AnonSolutions/django-indy-community.git

chmod -R a+rwx django-indy-community/indy_community_demo cd django-indy-community/docker ./manage start

Error : wallet-db_1 | 2020-01-06 16:21:28.553 UTC [45] STATEMENT: CREATE DATABASE o_faber_college indy-django_1 | Traceback (most recent call last): indy-django_1 | File "manage.py", line 15, in indy-django_1 | execute_from_command_line(sys.argv) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line indy-django_1 | utility.execute() indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute indy-django_1 | self.fetch_command(subcommand).run_from_argv(self.argv) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv indy-django_1 | self.execute(*args, *cmd_options) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute indy-django_1 | output = self.handle(args, *options) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/management/commands/loads_orgs.py", line 91, in handle indy-django_1 | org = org_signup(user, password, name, org_attrs=org_attrs, org_relation_attrs=relation_attrs, org_role=org_role, org_ico_url=ico_url) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/registration_utils.py", line 74, in org_signup indy-django_1 | org = org_provision(org, raw_password, org_role) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/registration_utils.py", line 47, in org_provision indy-django_1 | config = initialize_and_provision_vcx(wallet_name, raw_password, org.org_name, did_seed=did_seed, org_role=org_role, institution_logo_url=org.ico_url) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/agent_utils.py", line 78, in initialize_and_provision_vcx indy-django_1 | config = run_coroutine_with_args(vcx_agent_provision, provisionConfig_json) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/utils.py", line 91, in run_coroutine_with_args indy-django_1 | return loop.run_until_complete(coroutine(args)) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete indy-django_1 | return future.result() indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/vcx/api/utils.py", line 37, in vcx_agent_provision indy-django_1 | vcx_agent_provision.cb) indy-django_1 | vcx.error.VcxError: (<ErrorCode.DidAlreadyExistsInWallet: 1083>, {'backtrace': '', 'cause': 'Error: DID already exists\n Caused by: U4mQRtGc7nURTidnkGGZTG\n', 'error': 'Attempted to add a DID to wallet when that DID already exists in wallet', 'message': 'Error: Attempted to add a DID to wallet when that DID already exists in wallet\n Caused by: Error: DID already exists\n Caused by: U4mQRtGc7nURTidnkGGZTG\n\n'})

ianco commented 4 years ago

You will need to reset your environment. First stop all your docker containers by running "./manage stop", and then run "./manage rm" to delete any persistent volumes. (You can "-C" in the shell running the dockers to get a command prompts first) Then run "./manage start" again

guilherme-funchal commented 4 years ago

I tried...but same bug occurs

guilherme-funchal commented 4 years ago

What do I need to change to use Aries?

ianco commented 4 years ago

There is some documentation in the Aries repo, I suggest looking at the demo first.

ianco commented 4 years ago

I've made some changes to the README file in the django-indy-community project (and added some comments to the issue you logged in that repo).

Please see the updated README and those comments and let me know if you have any questions. This should fix a lot of the issues you have been having running these demo's. (Caused mainly by incompatible Indy versions in this code vs. the latest von-network).