Running getting started locally


I’m trying to run the Getting started tutorial fully locally (just so I can see how things flow and also hopefully so I can experiment with setting up agents and other things).

I’ve got four local nodes setup and running and can connect to them from the Sovrin client.

However, next step is running the Faber agent (then the Acme agent). I’ve started the client which seems to connect to my node cluster but I’m getting the following output which I’m assuming is because I haven’t done something.

2016-10-28 10:54:40,496 | DEBUG    |            (258) | handleOneNodeMsg | Client CU3BlS got msg from node Node2C: {'op': 'REQNACK', 'reqId': 1477648480291954, 'reason': "client request invalid: UnknownIdentifier('FuN98eH2eZybECWkofW6A9BKJxxnTatBCopfUiNxo6ZB',)"}

So, It would be good to have some basic instructions on how to do this or at least say what I’ve not yet done.

What I’ve done so far is:

  1. Install Sovrin and dependancies including OrientDB in a Ubuntu VM
  2. Created four nodes (Node1, Node2, Node3, and Node4) using the following script:
s1=`echo $(head -c32 /dev/urandom | hexdump '-e"%x"')`
s2=`echo $(head -c32 /dev/urandom | hexdump '-e"%x"')`
echo "Arg - ${nodeNr}"
init_sovrin_raet_keep --name Node${nodeNr} --seed $s1 --seed $s2
  1. Started nodes
start_sovrin_node Node1 9701 9702
start_sovrin_node Node2 9703 9704
start_sovrin_node Node3 9705 9706
start_sovrin_node Node4 9707 9708
  1. Run from test/agent

  2. Started sovrin and connected to test cluster
    Run through gettingStarted guide but when I try to accept the invite I get:

Invitation not yet verified.
Link not yet synchronized.
Attempting to sync...

    Link Faber College synced
Remote endpoint not found, can not connect to Faber College

Stuck here now.


Hi Andy - I’ll ask one of the tech team to help out.



Hi Andy,

The error you are getting UnknownIdentifier('FuN98eH2eZybECWkofW6A9BKJxxnTatBCopfUiNxo6ZB' means that the identifier FuN98eH2eZybECWkofW6A9BKJxxnTatBCopfUiNxo6ZB (which in this case is Faber’s) has not been on-boarded on Sovrin. To onboard Faber (and Acme) a Steward has to make a transaction on Sovrin. The steps to setup up Sovrin and agents locally are here In this doc you can see that in Pool cli section a cli is used to run 4 nodes and in Steward cli section a keys for an already existing steward are initialized (using the seed) and in next sections identifiers and location of all 3 agents Faber, Acme and Thrift are added to Sovrin by making transactions using the CLI


Hi Lovesh,

Thanks for that - Got 4 nodes talking, Faber connected and Alice talking to Faber!

I’ll write up some more friendly instructions on how this works (may help someone).

Next thing, once I quit Alice’s Sovrin session, then all that info is lost (even if I first set : “new keychain alice”).

Is it possible to restart the Sovrin session and effectively continue from where I was? (e.g. if I’d just accepted the claim from Faber, I could restart and view the claim again)?

Also, would I be right that removing the .sovrin folder, required resetting the database also? - If I don’t then once I’ve re-initialised everything, started the nodes and attempt to join Faber then all nodes just crash!



@AndyQ: I believe restarting a session is not supported in the version of the CLI that’s currently released. It might be an excellent feature for a pull request… Lovesh can comment about whether that feature would be easy, has already been implemented, etc. As far as the question about the .sovrin folder: yes, I believe you are correct. i think this is an artifact of the test sandbox having some hard-coded genesis transactions, and the agents having some of their nonces disabled in this test sandbox mode, I think. I would like @lovesh to confirm.


@AndyQ The reason sessions are not persistent is because our wallet is currently in-memory, so no persistence. We are exploring options for persisting wallet in encrypted format, one is sqlcipher, a SQLite extension but have not concluded it yet. Regarding .sovrin it stores information related to our transport mechanism RAET and there is a data directory that stores ledgers for each node in .sovrin/data/nodes/<nodeName> and data for each of the client’s requests in .sovrin/data/clients/<clientName>, clientName wont be Alice though. But the database also maintains the data stored in ledgers in a queryable format, so when you delete .sovrin, the ledgers become empty but the database still has data so Node gets confused and crashes. We plan to resolve this by nodes always treating ledger as source of truth and bringing the database consistent with the ledger on starting up if it finds them to be inconsistent. But here is a script you can use to delete data from database as well as .sovrin. It only clears .sovrin/data and not the RAET directories like .sovrin/Alpha, etc.


Thanks Daniel & Lovesh, I’ve got a set of scripts that will clean the database, setup the nodes and create the transactions ready to launch. I’ve also written up the process for setting up and running everything locally.

Would they be of any use (at least for testing).

Just trying to get my head around how the agent works now!


@AndyQ Thanks for doing that. Yes they would be very useful for anybody evaluating Sovrin in his own environment. If you can share it with us or better contribute to the github repo, it would be great.


OK, I’ve submitted a pull request to guthub containing the first version of my Running Locally guide.

It contains details of the scripts required to setup the environment (repeatedly) from scratch. If you want I can also add these scripts to somewhere in the repo (let me know where they should go and I’ll do another pull request (maybe somewhere like examples/running_locally?)



@AndyQ Thanks for doing that. I have reviewed you PR. You can update that PR with actual scripts for running locally and it would be great.


Thanks - I’ve uupdated to doc and added the scripts to the examples/running_locally folder


@AndyQ Requested one minor change.


No problem - all done


Thanks. Merged to master.