forked from evernym/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged latest code from sovrin-priv repo
- Loading branch information
1 parent
844c68a
commit 475884f
Showing
41 changed files
with
2,310 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
language: python | ||
python: | ||
- 3.5 | ||
|
||
sudo: required | ||
|
||
before_install: | ||
- sudo add-apt-repository -y ppa:chris-lea/libsodium | ||
- sudo apt-get update | ||
- sudo apt-get -y install | ||
flex bison | ||
libssl-dev | ||
libgmp-dev | ||
libsodium13 | ||
- ./ci/install-orientdb.sh | ||
- sudo /opt/orientdb/bin/server.sh & | ||
- sleep 10s | ||
|
||
install: | ||
- pip install -U -e . | ||
- pip install -U sovrin-client | ||
|
||
script: | ||
- python -m sovrin_node.test | ||
|
||
before_cache: | ||
- rm -f /opt/orientdb/log/* | ||
- rm -f /opt/orientdb/bin/orient.pid | ||
cache: | ||
timeout: 60 | ||
pip: true | ||
directories: | ||
- $HOME/pbc | ||
- /opt/orientdb | ||
|
||
notifications: | ||
email: | ||
on_success: change # default: change | ||
on_failure: always # default: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# sovrin-node | ||
Sovrin Node | ||
# Sovrin -- identity for all | ||
|
||
Sovrin Identity Network public/permissioned distributed ledger | ||
|
||
This codebase contains the code to run Sovrin validator or observer | ||
nodes. | ||
|
||
Developers should explore the [Getting Started Guide](https://github.com/sovrin-foundation/sovrin-node/blob/master/getting-started.md) to learn how Sovrin works. | ||
|
||
Have a look at [Setup Instructions](https://github.com/sovrin-foundation/sovrin-node/blob/master/setup.md) | ||
to understand how to work with the code. Note that setup instructions are | ||
still changing hour-by-hour as we identify | ||
install preconditions. | ||
|
||
To learn more about the Sovrin Identity Network and the Sovrin Foundation, see [sovrin.org](https://www.sovrin.org). | ||
|
||
---- | ||
Copyright 2016 Sovrin Foundation | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{"data":{"alias":"Node1","client_ip":"127.0.0.1","client_port":9702,"node_ip":"127.0.0.1","node_port":9701},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv","identifier":"FYmoFw55GeQH7SRFa37dkx1d2dZ3zUF8ckg7wmL7ofN4","txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62","type":"NEW_NODE"} | ||
{"data":{"alias":"Node2","client_ip":"127.0.0.1","client_port":9704,"node_ip":"127.0.0.1","node_port":9703},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb","identifier":"8QhFxKxyaFsJy4CyxeYX34dFH8oWqyBv1P4HLQCsoeLy","txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc","type":"NEW_NODE"} | ||
{"data":{"alias":"Node3","client_ip":"127.0.0.1","client_port":9706,"node_ip":"127.0.0.1","node_port":9705},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya","identifier":"2yAeV5ftuasWNgQwVYzeHeTuM7LwwNtPR3Zg9N4JiDgF","txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4","type":"NEW_NODE"} | ||
{"data":{"alias":"Node4","client_ip":"127.0.0.1","client_port":9708,"node_ip":"127.0.0.1","node_port":9707},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA","identifier":"FTE95CVthRtrBnK2PYCBbC9LghTcGwi9Zfi1Gz2dnyNx","txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008","type":"NEW_NODE"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{"data": {"alias": "Alpha", "client_ip": "127.0.0.1", "client_port": 9702, "node_ip": "127.0.0.1", "node_port": 9701}, "dest": "JpYerf4CssDrH76z7jyQPJLnZ1vwYgvKbvcp16AB5RQ", "identifier": "5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC", "txnId": "d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35", "type": "NEW_NODE"} | ||
{"data": {"alias": "Beta", "client_ip": "127.0.0.1", "client_port": 9704, "node_ip": "127.0.0.1", "node_port": 9703}, "dest": "DG5M4zFm33Shrhjj6JB7nmx9BoNJUq219UXDfvwBDPe2", "identifier": "2btLJAAb1S3x6hZYdVyAePjqtQYi2ZBSRGy4569RZu8h", "txnId": "4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce", "type": "NEW_NODE"} | ||
{"data": {"alias": "Gamma", "client_ip": "127.0.0.1", "client_port": 9706, "node_ip": "127.0.0.1", "node_port": 9705}, "dest": "AtDfpKFe1RPgcr5nnYBw1Wxkgyn8Zjyh5MzFoEUTeoV3", "identifier": "CECeGXDi6EHuhpwz19uyjjEnsRGNXodFYqCRgdLmLRkt, "txnId": "4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a", "type": "NEW_NODE"} | ||
{"data": {"alias": "Delta", "client_ip": "127.0.0.1", "client_port": 9708, "node_ip": "127.0.0.1", "node_port": 9707}, "dest": "4yC546FFzorLPgTNTc6V43DnpFrR8uHvtunBxb2Suaa2", "identifier": "3znAGhp6Tk4kmebhXnk9K3jaTMffu82PJfEG91AeRkq2", "txnId": "ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d", "type": "NEW_NODE"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{"dest":"3StSG7YV2Em2Wejf9dA1dNZ9BtZLiUUdm3yJgCS4M8eK","data":{"client_port":9722,"node_ip":"52.33.22.91","alias":"EvernymV1","client_ip":"52.33.22.91","node_port":9721},"type":"NEW_NODE","txnId":"d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","identifier":"5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC"} | ||
{"dest":"13qfUHjTDh3TdRHau93LtkLynwNJnLGoRGh9HQxHuiLs","data":{"client_port":9724,"node_ip":"52.38.24.189","alias":"EvernymV2","client_ip":"52.38.24.189","node_port":9723},"type":"NEW_NODE","txnId":"4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce","identifier":"2btLJAAb1S3x6hZYdVyAePjqtQYi2ZBSRGy4569RZu8h"} | ||
{"dest":"AZsp46qSPGjHuNYajiMUb5XcMWCRDuk2xdEv7P5MepSN","data":{"client_port":9726,"node_ip":"40.121.149.41","alias":"WSECU","client_ip":"40.121.149.41","node_port":9725},"type":"NEW_NODE","txnId":"4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a","identifier":"CECeGXDi6EHuhpwz19uyjjEnsRGNXodFYqCRgdLmLRkt"} | ||
{"dest":"3Kq8ykcbnCL3AuQJVeDvdRAX3b4jZGjAxNNnTGMvcQfw","data":{"client_port":9728,"node_ip":"52.160.103.164","alias":"BIG","client_ip":"52.160.103.164","node_port":9727},"type":"NEW_NODE","txnId":"ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d","identifier":"3znAGhp6Tk4kmebhXnk9K3jaTMffu82PJfEG91AeRkq2"} | ||
{"dest":"BkJAXQsFYsHtqgbMUYSVQ8n3okRvyPfozwWcn4gV538Z","data":{"client_port":9730,"node_ip":"54.173.9.185","alias":"RespectNetwork","client_ip":"54.173.9.185","node_port":9729},"type":"NEW_NODE","txnId":"ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39e","identifier":"4AdS22kC7xzb4bcqg9JATuCfAMNcQYcZa1u5eWzs6cSJ"} | ||
{"dest":"JgG4YoMoHJgXiBfzonVPs3MRr1ZqkzrgbUxn5dDQrow","data":{"client_port":9734,"node_ip":"69.144.146.171","alias":"FCU","client_ip":"69.144.146.171","node_port":9733},"type":"NEW_NODE","txnId":"ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe3A1","identifier":"FR5pWwinRBn35GNhg7bsvw8Q13kRept2pm561DwZCQzT"} | ||
{"data": {"alias": "BYU", "client_ip": "54.193.6.155", "client_port": 9745, "node_ip": "54.193.6.155", "node_port": 9744}, "dest": "8GzT2P1JsjYjmymAvkGRiea9bjcG5x9oMRFUw2oyoUSJ", "identifier": "6vAQkuCgTm7Jeki3vVhZm1FTAQYCeLE5mSvVRQdiwt1w", "reqId": 1, "txnId": "ea86243f6f9fb4e6154324ea85a4ff484d80215a1c6388f71c547b0ecf8cd448", "txnTime": 1475067399143.2058, "type": "NEW_NODE"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
||7e5d5f22d8c3c68c4532e0a336ba2db3276d12acf7820334bee49b5581d62277||NYM|FYmoFw55GeQH7SRFa37dkx1d2dZ3zUF8ckg7wmL7ofN4|||Steward1||||STEWARD| | ||
FYmoFw55GeQH7SRFa37dkx1d2dZ3zUF8ckg7wmL7ofN4||de75d0424859596a865ed9dab1eed1403849dc930dc591ada94d8cad09ecc9be||NYM|8QhFxKxyaFsJy4CyxeYX34dFH8oWqyBv1P4HLQCsoeLy|||Steward2||||STEWARD| | ||
FYmoFw55GeQH7SRFa37dkx1d2dZ3zUF8ckg7wmL7ofN4||bab82b59bb4368ea7c3f7e828759d65af76c04a752845135419bd55d32d9a1ee||NYM|2yAeV5ftuasWNgQwVYzeHeTuM7LwwNtPR3Zg9N4JiDgF|||Steward3||||STEWARD| | ||
FYmoFw55GeQH7SRFa37dkx1d2dZ3zUF8ckg7wmL7ofN4||29f95b62b7d162a819ec6973909f5549178d3dc8ef849ea39b440b45842fd177||NYM|FTE95CVthRtrBnK2PYCBbC9LghTcGwi9Zfi1Gz2dnyNx|||Steward4||||STEWARD| | ||
FYmoFw55GeQH7SRFa37dkx1d2dZ3zUF8ckg7wmL7ofN4||5eaeaf03d1d6b650a170a499c7c853dc81b79672f0e7513059ddd46188edb626||NYM|4SKVLyRVzCJyGidzGsWuTQzR2qzcXumcHcVFqqhRLdEt|||Client1||||| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|1|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b||NYM|5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC|||Steward1||||STEWARD| | ||
|2|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4c||NYM|3NhxuJKShrpnhxG8VYGkum6mv3HeXWUDfj7ktn5NbeymHoDX|||Steward2||||STEWARD| | ||
|3|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4d||NYM|CECeGXDi6EHuhpwz19uyjjEnsRGNXodFYqCRgdLmLRkt|||Steward3||||STEWARD| | ||
|4|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4e||NYM|3znAGhp6Tk4kmebhXnk9K3jaTMffu82PJfEG91AeRkq2|||Steward4||||STEWARD| | ||
5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC|1|e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683||NYM|4AdS22kC7xzb4bcqg9JATuCfAMNcQYcZa1u5eWzs6cSJ|||Alice||||| | ||
5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC|2|e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919684||NYM|46Kq4hASUdvUbwR7s7Pie3x8f4HRB3NLay7Z9jh9eZsB|||Jason||||| | ||
5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC|3|e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919685||NYM|3wpYnGqceZ8DzN3guiTd9rrYkWTwTHCChBSuo6cvkXTG|||John||||| | ||
5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC|4|e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919686||NYM|4Yk9HoDSfJv9QcmJbLcXdWVgS7nfvdUqiVcvbSu8VBru|||Les||||| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|1|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b||NYM|5rArie7XKukPCaEwq5XGQJnM9Fc5aZE3M9HAPVfMU2xC|||Steward1||||STEWARD| | ||
|2|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4c||NYM|2btLJAAb1S3x6hZYdVyAePjqtQYi2ZBSRGy4569RZu8h|||Steward2||||STEWARD| | ||
|3|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4d||NYM|CECeGXDi6EHuhpwz19uyjjEnsRGNXodFYqCRgdLmLRkt|||Steward3||||STEWARD| | ||
|4|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4e||NYM|3znAGhp6Tk4kmebhXnk9K3jaTMffu82PJfEG91AeRkq2|||Steward4||||STEWARD| | ||
|5|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4f||NYM|4AdS22kC7xzb4bcqg9JATuCfAMNcQYcZa1u5eWzs6cSJ|||Steward5||||STEWARD| | ||
|6|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b50||NYM|4Yk9HoDSfJv9QcmJbLcXdWVgS7nfvdUqiVcvbSu8VBru|||Steward6||||STEWARD| | ||
|7|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b51||NYM|FR5pWwinRBn35GNhg7bsvw8Q13kRept2pm561DwZCQzT|||Steward7||||STEWARD| | ||
|8|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b||NYM|EGRf6ho37aqg5ZZpAyD2mesS6XrNUeSkoVUAbpL6bmJ9|||||||STEWARD| | ||
EGRf6ho37aqg5ZZpAyD2mesS6XrNUeSkoVUAbpL6bmJ9|1|6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4c||NYM|C2AafyXuDBbcdiHJ8pdJ14PJ17X5KEBjbyfPPJWZFA4b|||||||SPONSOR| | ||
EGRf6ho37aqg5ZZpAyD2mesS6XrNUeSkoVUAbpL6bmJ9|2|50c2f66f7fda2ece684d1befc667e894b4460cb782f5387d864fa7d5f14c4066||NYM|4qU9QRZ79CbWuDKUtTvpDUnUiDnkLkwd1i8p2B3gJNU3|||||||SPONSOR| | ||
4qU9QRZ79CbWuDKUtTvpDUnUiDnkLkwd1i8p2B3gJNU3|1|77c2f66f7fda2ece684d1befc667e894b4460cb782f5387d864fa7d5f14c4066||NYM|adityastaging|||||||| | ||
4qU9QRZ79CbWuDKUtTvpDUnUiDnkLkwd1i8p2B3gJNU3|2|91c2f66f7fda2ece684d1befc667e894b4460cb782f5387d864fa7d5f14c4066||NYM|iosstaging|||||||| | ||
|9|4770beb7e45bf623bd9987af4bd6d6d8eb8b68a4d00fa2a4c6b6f3f0c1c036f8||NYM|6vAQkuCgTm7Jeki3vVhZm1FTAQYCeLE5mSvVRQdiwt1w|||Steward8||||STEWARD| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
# Sovrin – Running the Getting Started tutorial locally | ||
|
||
## Overview | ||
|
||
Currently, out of the box, the Getting started tutorial uses externally running nodes and assumes that these are all up and running. However, being test nodes, sometimes they aren’t, or sometimes you just want to see everything flowing through in a local environment. | ||
|
||
This guide describes the process of setting up a local 4 node cluster, attaching an agent to the cluster (Faber in this case), and running a client (Alice). | ||
|
||
It (currently) supports the GettingStarted tutorial up to to point of accepting Fabers claim however adding the Acme and ThriftBank agents is pretty trivial). | ||
|
||
Note - I'm still trying to get my head around the details of Sovrin so there may be a few things I'm doing wrong or haven't yet understood! However this process is working nicely so far. | ||
|
||
|
||
## Requirements | ||
|
||
I’m assuming that you have Sovrin installed (I recommend installing this in an Ubuntu Virtual Machine if possible) – If not follow the instructions at: https://github.com/sovrin-foundation/sovrin/blob/master/setup.md | ||
|
||
You will also need OrientDB installed again and again instructions for that can be found at https://github.com/sovrin-foundation/sovrin/blob/master/orientdb_installation.md | ||
|
||
|
||
## Initial setup | ||
In your home folder, create a Sovrin folder. In here we are going to put the scripts we will use to setup the environment. Then change into this folder. | ||
|
||
So first, we need to create our nodes. | ||
|
||
Create a script ```setupEnvironment.sh``` containing: | ||
|
||
``` | ||
# Remove .sovrin folder | ||
rm -rf ~/.sovrin | ||
# Create nodes and generate initial transactions | ||
generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 1 | ||
generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 2 | ||
generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 3 | ||
generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 4 | ||
echo Environment setup complete | ||
``` | ||
|
||
This first clears out the ~/.sovrin folder (if it exists), creates 4 nodes and then generates all the necessary initial transactions and Stewards. | ||
|
||
Make the script executable (chmod 744 setupEnvironment.sh). | ||
|
||
At this point you are ready to build your environment. | ||
|
||
## Start nodes | ||
|
||
So, if you run the setupEnvironent.sh script, you should see a whole lot of output of the nodes and transactions being created. | ||
|
||
At this point you are now ready to start the nodes. | ||
|
||
Open up 4 new terminal windows and in each one run one of the following commands (one in each window): | ||
``` | ||
start_sovrin_node Node1 9701 9702 | ||
start_sovrin_node Node2 9703 9704 | ||
start_sovrin_node Node3 9705 9706 | ||
start_sovrin_node Node4 9707 9708 | ||
``` | ||
|
||
This will start each node running and with luck, they will connect to each other, do their handshaking and will elect a master and backup. | ||
At this point you have a nice 4 node Sovrin cluster running. | ||
|
||
|
||
## Attach Faber agent to cluster | ||
|
||
Before we can connect the Faber agent to the cluster, we have to register (onboard) it with the cluster first. | ||
To do this, we connect to the cluster as a Steward (a trusted entity that was created earlier as part of the generate transactions process), | ||
register the Faber agents identifier (NYM) and also register the agents endpoint as an attribute against the NYM. | ||
|
||
So, first we start the Sovrin CLI using the command ```sovrin``` | ||
|
||
Then run the following commands: | ||
``` | ||
new key with seed 000000000000000000000000Steward1 | ||
connect test | ||
send NYM dest=FuN98eH2eZybECWkofW6A9BKJxxnTatBCopfUiNxo6ZB role=SPONSOR | ||
send ATTRIB dest=FuN98eH2eZybECWkofW6A9BKJxxnTatBCopfUiNxo6ZB raw={"endpoint": "127.0.0.1:5555"} | ||
``` | ||
|
||
We first add the Stewards key into the Keyring (this enables us to assume the Steward role) - Note this key is hardcoded into the test scripts at the moment so is pre-generated | ||
We then connect to the test Sovrin cluster (which is the one we are running locally) | ||
Then we registers Fabers identifier and set its role as a Sponsor (A Sponsor is a privilege which if possessed by an identifier allows that identifier to on-board other identifiers) | ||
Finally we then register an attribute containing the endpoint for the Faber identifier. | ||
|
||
At this point we can start the Faber agent. | ||
|
||
This is fairly simple, and you start it using the command: | ||
``` | ||
python ~/.virtualenvs/sovrin/lib/python3.5/site-packages/sovrin/test/agent/faber.py --port 5555 | ||
``` | ||
Note - the above assumes you set up a Python virtual environmetn called sovrin as per the installation guide). If not, this should be the path the the faber.py script. | ||
|
||
The Faber agent should then start up, connect to our test Sovrin cluster, handshake and be accepted as a Sponsor. | ||
|
||
## Run Getting Started guide | ||
|
||
At this point, you can follow the Getting Started guide at https://github.com/sovrin-foundation/sovrin/blob/master/getting-started.md up to the point of Applying for a Job. | ||
I recommend you use a seperate Sovrin CLI instance for this. | ||
|
||
If you wish to add the Acme and ThriftBank agents, follow the steps for attaching the Faber agent using the following infomation: | ||
|
||
I've included the full steps for the getting started console commands in the Getting Started Steps section | ||
### ACME Client | ||
``` | ||
send NYM dest=7YD5NKn3P4wVJLesAmA1rr7sLPqW9mR1nhFdKD518k21 role=SPONSOR | ||
send ATTRIB dest=7YD5NKn3P4wVJLesAmA1rr7sLPqW9mR1nhFdKD518k21 raw={"endpoint": "127.0.0.1:6666"} | ||
python ~/.virtualenvs/sovrin/lib/python3.5/site-packages/sovrin/test/agent/acme.py --port 6666 | ||
``` | ||
|
||
### ThriftBank Client | ||
``` | ||
send NYM dest=9jegUr9vAMqoqQQUEAiCBYNQDnUbTktQY9nNspxfasZW role=SPONSOR | ||
send ATTRIB dest=9jegUr9vAMqoqQQUEAiCBYNQDnUbTktQY9nNspxfasZW raw={"endpoint": "127.0.0.1:7777"} | ||
python ~/.virtualenvs/sovrin/lib/python3.5/site-packages/sovrin/test/agent/thrift.py --port 7777 | ||
``` | ||
|
||
|
||
# Resetting the Sovrin environment | ||
|
||
If you wish to reset your Sovrin environment and recreate it again, you can remove your ```~/.sovrin``` folder **however** you also need to clear out some tables from the OrientDB database too. | ||
|
||
So, create a new file in your Sovrin folder called resetDB.sql containiing: | ||
``` | ||
connect remote:127.0.0.1 root password | ||
drop database remote:localhost/Node1 root password | ||
drop database remote:localhost/Node2 root password | ||
drop database remote:localhost/Node3 root password | ||
drop database remote:localhost/Node4 root password | ||
exit | ||
``` | ||
|
||
This connects to your local OrientDB database and deletes the Node1, Node2, Node3, and Node4 databases | ||
|
||
And add the following to the top of the setupEnvironment.sh script: | ||
``` | ||
# reset database | ||
/opt/orientdb/bin/console.sh < resetDB.sql | ||
stty sane | ||
``` | ||
This just runs the above resetDB.sql script and the resets the terminal back to normal (for some reason on my Ubuntu machine, the terminal stops echoing out commands after running the console) | ||
|
||
Then, when you want to re-create your environment from scratch, ensure that all the nodes and agents are stopped and just run the setupEnvironment.sh script. | ||
Then you can restart the Nodes, attach the agents and away you go again. | ||
|
||
# Getting Started Steps | ||
This section just lists the commands from the Getting Started guide that should be run through. | ||
These should be run in on a new Sovrin CLI instance. | ||
|
||
``` | ||
prompt Alice | ||
connect test | ||
show sample/faber-invitation.sovrin | ||
load sample/faber-invitation.sovrin | ||
sync faber | ||
show link faber | ||
accept invitation from faber | ||
show claim Transcript | ||
request claim Transcript | ||
show claim Transcript | ||
show sample/acme-job-application.sovrin | ||
load sample/acme-job-application.sovrin | ||
sync acme | ||
accept invitation from acme | ||
show claim request Job-Application | ||
set first_name to Alice | ||
set last_name to Garcia | ||
set phone_number to 123-45-6789 | ||
show claim request Job-Application | ||
send claim Job-Application to Acme | ||
show link acme | ||
request claim Job-Certificate | ||
show claim Job-Certificate | ||
show sample/thrift-loan-application.sovrin | ||
load sample/thrift-loan-application.sovrin | ||
sync thrift | ||
accept invitation from thrift | ||
show claim request Loan-Application-Basic | ||
send claim Loan-Application-Basic to Thrift Bank | ||
show claim request Loan-Application-KYC | ||
send claim Loan-Application-KYC to Thrift Bank | ||
``` |
Oops, something went wrong.