Skip to content

Commit 7247355

Browse files
ATL-6669: Update README
This commits updates the README to focus oly on the PRISM node.
1 parent 4961d10 commit 7247355

File tree

1 file changed

+36
-72
lines changed

1 file changed

+36
-72
lines changed

README.md

+36-72
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,22 @@
1-
# Prism
1+
# PRISM Node
22

3-
Prism is a Self-Sovereign Identity (SSI), and Verifiable Credentials (VC) platform.
4-
5-
[![CircleCI](https://circleci.com/gh/input-output-hk/atala/tree/develop.svg?style=svg&circle-token=1a9dcf544cec8cb581fa377d8524d2854cfb10e9)](https://circleci.com/gh/input-output-hk/cardano-enterprise/tree/develop)
6-
7-
## Branches, deployment, and stability
8-
9-
Three main branches will be maintained:
10-
11-
* `develop`
12-
* `qa`
13-
* `master`
14-
15-
All development happens against `develop`, which contains the latest version of the code that runs all the tests (unit and some integration tests). Integration tests don't test all the integrations. Hence, any version in `develop` might have bugs when deployed for an end-to-end test.
16-
17-
The `qa` branch is where we can guarantee that code is stable end-to-end, meaning that all components can work flawlessly together when deployed. Periodically, `qa` is rebased onto `develop` and a series of tests (contained in [`atala-qa-automation`](https://github.com/input-output-hk/atala-qa-automation/)) that take all components into account are executed.
18-
19-
The `master` branch contains milestones that have been tested end-to-end and have been demonstrated to work properly. The idea is to be able to create PRISM releases out of `master` and also be able to create demo environments. We expect that milestones and, especially, releases will be represented by git tags. For instance, [vAlpha-01](https://github.com/input-output-hk/atala/tree/vAlpha-01) and [vAlpha-02](https://github.com/input-output-hk/atala/tree/vAlpha-02) are existing tags that represent milestones.
3+
This project represents a reference implementation of the PRISM Node described in the PRISM DID method specification.
4+
This code is not recommended for production environments. The project supports:
5+
- the indexing of the blockchain
6+
- The interpretation of the DID method events (Creation, updates and deactivation)
7+
- batch submission for DID PRISM operations
208

219
### Flow of commits
2210

2311
Commits land on `develop` from Pull Requests, as soon as they are approved. There is no coordination happening there.
2412

25-
Commits land on `qa` from `develop` periodically, currently once in a day. This is an automated process.
26-
27-
Commits land on `master` from `qa` manually, according to the PRISM roadmap, when we have to represent a stable milestone or cut a release.
28-
29-
### Working assumptions
30-
31-
The current situation regarding the engineering & QA flows and processes has the following characteristics:
32-
33-
* Running the QA pipeline is costly. Given the fact that our Pull Requests can evolve `develop` very frequently, it means that running the QA pipeline against `develop` can be ineffective: while in the middle of the QA pipeline, a new commit can appear in `develop` and, as a consequence, the so far QA work can be wasted.
34-
35-
* Launching deployments is costly. Our CircleCI configuration declares precisely under which circumstances a deployment is created and updated.
36-
37-
* Periodically rebasing `qa` onto `develop` almost cancels out the volatility present in the latter, so we expect QA results with less interference between changing features.
38-
39-
* _Some_ manual testing may still be needed in `qa`.
40-
41-
* Commits flow from `develop` to `qa` periodically in an automated way but we may choose to manually cherry-pick a few latest commits from `develop`, in case a hot fix is needed to stabilize `qa`. In any case, we may move to a full manual process when bringing patches from `develop` in `qa`.
4213

4314
#### Future investigations
4415

45-
As a consequence of the above, we may want to look into ways to make:
46-
47-
* Deployments lighter-weight.
48-
* The QA pipeline lighter-weight.
49-
* The QA pipeline even more automatic.
50-
51-
These could bring more QA automation into `develop`, could ease testing the Pull Requests, and probably bridge the gap between `develop` and `master`.
52-
53-
54-
5516
## How to run
5617

57-
### Front-end
58-
59-
See the instructions on how to set up all the necessary dependencies to run the frontend management console in dedicated [readme](prism-management-console-web/README.md)
18+
This implementation relays on a Postgres database, a Cardano wallet and an instance of db-sync.
19+
For development and illustration purposes, the node supports an "in memory" mode that doesn't interact with db-sync nor wallet.
6020

6121
### Database
6222

@@ -83,8 +43,8 @@ docker run \
8343

8444
This command will bind volume to `.docker-volumes/postgres/data`, so all your database date will be stored there.
8545

86-
You will also need to create another database with the name "node_db" (and optionally additional one named "management_console_db"). You can connect to the database through your favorite RDBMS, like DataGrip for example, and create it, or use command line tool `psql` if you prefer this way
87-
46+
You can connect to the database through your favorite RDBMS, like DataGrip for example, or use command line tool `psql` if you prefer this way.
47+
For psql, you can run. Note that the tables are created by the node on its first run, so be sure to first run the node (see below) in order to find data in the database.
8848

8949
```bash
9050
$ psql node_db \
@@ -93,38 +53,43 @@ $ psql node_db \
9353
-p 5432
9454
```
9555

96-
### Back-end
56+
### Running the node
9757

98-
See the instructions on how to set up all the necessary dependencies to run the backend in dedicated [readme](prism-backend/PRISM_BACKEND_README.md)
58+
In the top folder of this project just run:
9959

100-
### Envoy
60+
```
61+
$ sbt node/run
62+
```
10163

102-
You need to have envoy proxy server running to proxy the grpc-web calls to the backend services, if you don't have it set up, refer to [Install Envoy](prism-management-console-web/README.md#Install-Envoy)
64+
This will start the node server. You can interact with it using gRPC calls at port 50053.
65+
By default, the node is running on "in memory" mode, which means that any operation submitted to it will be instantly confirmed and processed.
66+
Alternatively, you can configure to run it against a Cardano network by setting values for the db-sync and Cardano wallet services.
10367

104-
### Chrome extension
68+
```bash
69+
export NODE_CARDANO_DB_SYNC_HOST="db-sync-instance.example.com"
70+
export NODE_CARDANO_DB_SYNC_DATABASE="db name"
71+
export NODE_CARDANO_DB_SYNC_USERNAME="the username"
72+
export NODE_CARDANO_DB_SYNC_PASSWORD="your password"
10573

106-
A chrome extension wallet which is necessary to log into web management console.
74+
export NODE_CARDANO_WALLET_API_HOST="cardanowallet.example.com"
75+
export NODE_CARDANO_WALLET_API_PORT="port number"
10776

108-
Compile the chrome extension
109-
```bash
110-
atala$ cd prism-web-wallet
111-
prism-web-wallet$ sbt chromeUnpackedFast
77+
export NODE_CARDANO_PAYMENT_ADDRESS="wallet address"
78+
export NODE_CARDANO_WALLET_ID="a wallet id"
79+
export NODE_CARDANO_WALLET_PASSPHRASE="wallet pathphrase"
11280
```
11381

114-
In order to install the wallet on chrome. Open chrome and go to [chrome://extensions/](chrome://extensions/)
82+
For development purposes, you may want to reduce the number of blocks to wait for confirmations. Note that this parameter is fixed for mainnet. Hence, only modify then for tests if needed.
11583

116-
Activate the developer mode (top right corner of the page) and click on `Load unpacked` (top left visible in developer
117-
mode), in the dialog opened go to `atala/prism-web-wallet/target/chrome`, select `unpacked-fast`
118-
folder and click `Open`. Now the wallet should be found in your extensions.
84+
```
85+
export NODE_CARDANO_CONFIRMATION_BLOCKS="1"
86+
export NODE_LEDGER="cardano"
87+
```
11988

120-
At this point, you have all the needed components up to run the wallet locally.
89+
For more configuration options, please refer to `node/src/main/resources/application.conf`. Note that environment values override the configuration values. You can change locally the `application.conf` instead of exporting environment variables as we did above.
12190

12291
## Working with the codebase
12392

124-
This is a monorepo and each of the `prism-XYZ` folders refers to a different part of the platform. Check the specific READMEs for more details.
125-
126-
Be sure to follow our [contributing guidelines](CONTRIBUTING.md).
127-
12893
In order to keep the code format consistent, we use scalafmt and git hooks, follow these steps to configure it accordingly (otherwise, your changes are going to be rejected by CircleCI):
12994

13095
- Install [coursier](prism-backend/README.md#Install-coursier), the `cs` command must work.
@@ -135,7 +100,6 @@ In order to keep the code format consistent, we use scalafmt and git hooks, foll
135100
```
136101
- `cp pre-commit .git/hooks/pre-commit`
137102

138-
## More docs
103+
## Known limitations
139104

140-
* Documentation about operational aspects of the team and the services we use can be found in [Confluence](https://input-output.atlassian.net/wiki/spaces/CE/pages/606371843/Code+and+Infrastructure+Setup).
141-
* The general guideline and ultimate goal is to have the [repository](prism-backend/docs/README.md) as the source of truth for all technical documentation.
105+
- This reference implementation does not support Cardano rollbacks' management

0 commit comments

Comments
 (0)