hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
669 stars 735 forks source link

Unable to Run How-To Examples with Von Network - CommonInvalidState() #2581

Closed Swhite215 closed 1 year ago

Swhite215 commented 1 year ago

I have spun up a von test network on my local machine following instructions here: https://github.com/bcgov/von-network.

I am attempting to run the write-did-and-query-verykey How-To example, locally, while using the VON Network. When I running the code I see this error:

CommonInvalidState() 'Error: Invalid library state\n Caused by: Ledger merkle tree is not acceptable for current tree.\n'

I didn't think I needed to adjust the genesis txn information. When vieiwng the genesis JSON at localhost:9000/genesis, the structure matches what I have in my pool.txn file after I run pool.create_pool_ledger_config().

ianco commented 1 year ago

You need to make sure von-network is configured for your computer's local IP (rather than an IP which is internal to a docker network, which is the default).

Try starting von-network as ./manage start <your local IP> --logs. You can fetch the genesis file as http://localhost:9000/genesis, and then make sure indy-sdk is pointing to this file to configure the ledger.

You can also use a local ledger as described in the README here: https://github.com/hyperledger/indy-sdk#how-to-start-local-nodes-pool-with-docker

Swhite215 commented 1 year ago

Thank you that worked.