openwallet-foundation / bifold-wallet

Aries Mobile Agent React Native - Part of the Aries Bifold effort to provide SSI capabilities in a production ready app.
Apache License 2.0
144 stars 135 forks source link

Testing with a locally deployed Von based Indy Network #155

Closed ripulbd closed 2 years ago

ripulbd commented 2 years ago

Hi,

I am trying to test with a locally deployed Von based Indy Network. For that I have set up the genesis URL as GENESIS_URL=http://localhost:9000/genesis. But it seems that it cannot interact with the Indy Network. Is the current version only configured with Sovrin Staging and Indicio Network? If I would like to change that so that it can be configured to work with the local setup, what needs to be done? Any pointer will be highlight appreciated.

Thanks in advance.

Regards, Sadek

ianco commented 2 years ago

Hi, you need a network that is publicly accessible, or else your mobile app can't connect to it. When you run von-network it defaults to use a docker IP (inly available in the internal docker network), or you can run as ./manage start <your ip> which will run on a local IP address - neither of these options will work for a mobile app. You can deploy von-network in a public cloud (as is done with the BCovrin networks, e.g. here: http://test.bcovrin.vonx.io/) but then you need to deal with exposing the node IP's publicly.

amanji commented 2 years ago

A couple things you need to do. As @ianco mentioned, you'll need to make the network publicly accessible. You could ~use ngrok to do this or~ deploy the network to a public cloud. The second piece is configuring the mobile agent to use the ledger. You will need to add an entry to the configs/ledgers/indy module. Take a look at indicio-test-net or sovrin-staging-net for examples.

The main part will be exporting the new config in configs/ledgers/indy.index.js, like:

import IndicioTestNet from './indicio-test-net/pool-config'
import SovrinStagingNet from './sovrin-staging-net/pool-config'

export default [IndicioTestNet, SovrinStagingNet]

Once this is done, and the mobile wallet is rebuilt, it will automatically use the new ledger. Order will matter for how each of the configured ledgers are used, so if you want yours to have priority, it should be a the beginning of the list.

ianco commented 2 years ago

you'll need to make the network publicly accessible. You could use ngrok to do this or deploy the network to a public cloud

Unfortunately ngrok won't work to expose the nodes publicly. The IP address for the nodes needs to be publicly accessible (ngrok just exposes a public url). You can run von-network using ./manage start <your ip> with pretty much any IP address, but the IP address needs to be the one you can use to connect to the nodes.

amanji commented 2 years ago

Noted. The genesis file would need to have the publicly accessible IP. Updated my comment to reflect that ngrok won't work.

ripulbd commented 2 years ago

Thanks a lot @ianco and @amanji for the comments. I was able to sort this issue following your suggestions and using the bcovrin test deployment. I think it will be useful to add this suggestion in the readme file for someone who would like to utilise the same setup.

One more thing: when the Mobile agent receives a proof request, it does not do anything. I was expecting a notification in the home screen similar to when it receives a credential. Has the proof presentation feature been added in the mobile agent?

Thank you both for all your helps.

amanji commented 2 years ago

Is it a connection-less proof request because if so there's a PR in review that will add support for that? It should be merged anytime soon.

See: https://github.com/hyperledger/aries-mobile-agent-react-native/pull/149

ripulbd commented 2 years ago

Is it a connection-less proof request because if so there's a PR in review that will add support for that? It should be merged anytime soon.

See: #149

I have been exploring with the proof presentation after the connection has been established. For example, I am trying to reiterating the Faber College and Alice (now in the mobile agent) use-case. For this, I am using the aca-py for emulating Faber.

jleach commented 2 years ago

As per todays Bifold WG call we're closing stale our otherwise dormant issues. Please re-open if its still relevant.

darapich92 commented 1 year ago

Hi @ianco and @amanji , it seems that aries mobile agent is updated a lot. based on the code, genesis url in .env is not being read instead by reading file ledger.json. it is unlike ACA-Py that can direct access to genesis URL and get up-to-date of tx of ledger in von-network.

jleach commented 1 year ago

Yes, you can add your genesis tx to that file in the correct format.

darapich92 commented 1 year ago

Hi, @jleach so, how can the aries-mobile agent can get the up-to-date of tx in von-network? for example: when connecting with a new agent, i want an agent in mobile phone to verify the public DID of the new agent. but the agent in mobile phone cannot get the information of public DID of the new agent because mobile agent stores the genesis file not direct linking to ledger.

jleach commented 1 year ago

hi @darapich92 I don't think I understand what you're doing.

darapich92 commented 1 year ago

Hi @jleach, I am sorry to reply to you late. I would like to clarify with you because I am not clear about the connecting aries-mobile-agent to Von-network. to connect aries mobile agent to von-network, I need to do:

  1. public the genesis URL of von-network. then, put Genesis_URL in the .env file.
  2. then, I need to modify sth in config/ledgers/indy (I am not sure what I am going to modify).

are they the process of connecting Aries mobile agent to my von-network ledger?

thank you very much, i tried to config it for long time but no result.