Backend code for a D3 notary
D3 consists of 3 parts. Common services should be run obligatory and rest can be run optionally:
- Common services
- Ethereum subsystem
- Clone project
master
branch - Launch Iroha and Postgres in docker with
docker-compose -f deploy/docker-compose.yml -f deploy/docker-compose.dev.yml up
- Run registration service
PROFILE=mainnet ./gradlew runRegistration
- (Optional) Run exchanger service
PROFILE=mainnet ./gradlew runExchanger
Now you can register clients and launch subsystems.
- Create SMTP configuration file located at
configs/smtp.properties
(see test exampleconfigs/smtp_test.properties
). This file contains SMTP server credentials. - Create Push API configuration file located at
configs/push.properties
(see test exampleconfigs/push_test.properties
). This file contains VAPID keys. You can generate keys by yourself using webpush-libs tutorial. - Run gralde command
./gradlew runNotifications
SMTP configuration file configs/smtp.properties
must be modified in order to be able to send email notifications via AWS SES.
smtp.host=email-smtp.eu-west-1.amazonaws.com
smtp.port=25
smtp.userName=ask maintainers
smtp.password=ask maintainers
./gradlew test
for unit tests
./gradlew integrationTest
for integation tests
-
Services cannot be lauched due to the issue with protobuf. Solution for linux — use 3.5.1 version. Solution for mac — manually put old version in Cellar folder for 3.5.1 version (ask someone from the team), and link it with
brew switch protobuf 3.5.1
. -
Services cannot resolve their hostnames. Solution — add following lines to /etc/hosts file:
127.0.0.1 d3-iroha
127.0.0.1 d3-iroha-postgres
127.0.0.1 d3-notary
127.0.0.1 d3-eth-node0
127.0.0.1 d3-btc-node0
127.0.0.1 d3-rmq
127.0.0.1 d3-brvs
127.0.0.1 d3-brvs-mongodb