You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
20
8
21
9
### Flow of commits
22
10
23
11
Commits land on `develop` from Pull Requests, as soon as they are approved. There is no coordination happening there.
24
12
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`.
42
13
43
14
#### Future investigations
44
15
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
-
55
16
## How to run
56
17
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.
60
20
61
21
### Database
62
22
@@ -83,8 +43,8 @@ docker run \
83
43
84
44
This command will bind volume to `.docker-volumes/postgres/data`, so all your database date will be stored there.
85
45
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.
88
48
89
49
```bash
90
50
$ psql node_db \
@@ -93,38 +53,43 @@ $ psql node_db \
93
53
-p 5432
94
54
```
95
55
96
-
### Back-end
56
+
### Running the node
97
57
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:
99
59
100
-
### Envoy
60
+
```
61
+
$ sbt node/run
62
+
```
101
63
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.
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.
115
83
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
+
```
119
88
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.
121
90
122
91
## Working with the codebase
123
92
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
-
128
93
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):
129
94
130
95
- 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
135
100
```
136
101
-`cp pre-commit .git/hooks/pre-commit`
137
102
138
-
## More docs
103
+
## Known limitations
139
104
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