This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from HelixNetwork/dev
1.0.1
- Loading branch information
Showing
16 changed files
with
242 additions
and
16 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
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
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 |
---|---|---|
|
@@ -5,11 +5,33 @@ | |
# Pendulum | ||
|
||
Pendulum is a quorum based [Tangle](https://github.com/iotaledger/iri/) implementation designed towards reliable timekeeping and high-throughput messaging. | ||
- **Latest release:** 1.0.0 release | ||
- **Latest release:** 1.0.1 release | ||
- **License:** GPLv3 | ||
|
||
Special thanks to all of the [IOTA Contributors](https://github.com/iotaledger/iri/graphs/contributors)! | ||
|
||
## Hardware requirements | ||
|
||
**Minimal** (~t2.small AWS instance) | ||
- 2GB RAM | ||
- 1 GHz CPU | ||
- 10 GB storage | ||
- 10Mbit/s WAN, static IP | ||
|
||
**Optimal** (~t2.medium AWS instance) | ||
- 4GB RAM or more | ||
- 2 or more 2GHz CPU cores (~ t2.medium AWS instance) | ||
- 50GB SSD | ||
- 1Gbit/s WAN, static IP | ||
|
||
**Enterprise-grade** | ||
- Four or more instances with Optimal specs | ||
- two or more instances with `--remote` API enabled | ||
- two or more "relayer" instances connected to multiple peers | ||
- For validators: additional dedicated instance with Optimal specification for the validator node | ||
- HA loadbalancer proxing API instances. Can be hardware or software based (e.g. [Nginx cluster sample config](#nginx-cluster-sample-config) below) | ||
|
||
|
||
## Developers | ||
|
||
- Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us. | ||
|
@@ -36,9 +58,9 @@ Build an executable jar at the `target` directory using maven. | |
|
||
### Launch Validator node | ||
Launching a node as a validator first requires to generate a 64 character hex string, that is used as a seed for key generation. You will find the public key in the last line of the `validator.key` file contained in the resources directory. If you wish to act as a validator, please send a request to [email protected] containing your public key. | ||
|
||
java -jar target/pendulum-<VERSION>.jar -p 8085 --validator <pathToValidatorSeed> | ||
|
||
|
||
### Nginx cluster sample config | ||
|
||
|
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,74 @@ | ||
version: "3.1" | ||
|
||
networks: | ||
helix_network: | ||
|
||
secrets: | ||
seed: | ||
file: ./backend/seed.txt | ||
|
||
services: | ||
relayer: | ||
container_name: relayer_stmpe_ml | ||
image: dzlzv/pendulum:0.6.9 | ||
hostname: relayer | ||
restart: on-failure | ||
volumes: | ||
- /docker-volumes/relayer/data:/pendulum/data | ||
- ./relayer/hlx-0.1.0.ini:/pendulum/conf/conf.ini:ro | ||
environment: | ||
- DOCKER_PLM_REMOTE_LIMIT_API="interruptAttachToTangle" | ||
- JAVA_MAX_MEMORY=1500m | ||
- JAVA_MIN_MEMORY=256m | ||
- DOCKER_PLM_LOGGING_LEVEL=debug | ||
ports: | ||
- "6550:6550" | ||
expose: | ||
- "4100" | ||
- "8085" | ||
command: ["-p","8085","-n", "udp://backend:4100 udp://relayer1.helixmain.net:4100 udp://nginx:4100"] | ||
networks: | ||
helix_network: | ||
|
||
backend: | ||
container_name: backend_stmpe_ml | ||
image: dzlzv/pendulum:0.6.9 | ||
hostname: backend | ||
restart: on-failure | ||
volumes: | ||
- /docker-volumes/backend/data:/pendulum/data | ||
- ./backend/seed.txt:/pendulum/conf/seed.txt:ro | ||
- ./backend/hlx-0.1.0.ini:/pendulum/conf/conf.ini:ro | ||
environment: | ||
- DOCKER_PLM_REMOTE_LIMIT_API="interruptAttachToTangle" | ||
- JAVA_MAX_MEMORY=1024m | ||
- JAVA_MIN_MEMORY=256m | ||
- DOCKER_PLM_LOGGING_LEVEL=debug | ||
ports: | ||
- "6551:6550" | ||
expose: | ||
- "4100" | ||
- "8085" | ||
secrets: | ||
- seed | ||
command: ["-p","8085","-n", "udp://relayer:4100"] | ||
networks: | ||
helix_network: | ||
|
||
nginx: | ||
container_name: 'production-nginx' | ||
image: nginx:1.17.3 | ||
restart: on-failure | ||
ports: | ||
- "4100:4100/udp" | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
- ./production.conf:/etc/nginx/conf.d/default.conf | ||
- ./dh-param/dhparam-2048.pem:/etc/ssl/certs/dhparam-2048.pem | ||
- /docker-volumes/etc/letsencrypt/live/stmpe.ml/fullchain.pem:/etc/ssl/certs/fullchain.pem | ||
- /docker-volumes/etc/letsencrypt/live/stmpe.ml/privkey.pem:/etc/ssl/certs/privkey.pem | ||
- /docker-volumes/data/letsencrypt:/data/letsencrypt | ||
networks: | ||
helix_network: |
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,19 @@ | ||
events { worker_connections 4096; } | ||
|
||
stream { | ||
|
||
## uncomment for reverse-proxying to multiple relayers | ||
# upstream pendulum_udp { | ||
# server relayer1:4100; | ||
# server relayer2:4100; | ||
# } | ||
|
||
server { | ||
listen 4100 udp; | ||
proxy_pass relayer:4100; | ||
} | ||
} | ||
|
||
http { | ||
include /etc/nginx/conf.d/*.conf; | ||
} |
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,77 @@ | ||
upstream pendulum { | ||
ip_hash; | ||
server relayer:8085 max_fails=3 fail_timeout=30s; | ||
server backend:8085; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name ### your.server.name ###; | ||
|
||
## Uncomment if let's encrypt free certificate is used | ||
#location ~ /.well-known/acme-challenge { | ||
# allow all; | ||
# root /data/letsencrypt; | ||
#} | ||
|
||
location / { | ||
rewrite ^ https://$host$request_uri? permanent; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
server_name ### your.server.name ###; | ||
|
||
server_tokens off; | ||
|
||
## put your ssl certs there | ||
ssl_certificate /etc/ssl/certs/fullchain.pem; | ||
ssl_certificate_key /etc/ssl/certs/privkey.pem; | ||
|
||
ssl_session_timeout 5m; | ||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | ||
ssl_prefer_server_ciphers on; | ||
|
||
ssl_ecdh_curve secp384r1; | ||
ssl_session_tickets off; | ||
|
||
# OCSP stapling | ||
ssl_stapling on; | ||
ssl_stapling_verify on; | ||
resolver 8.8.8.8; | ||
|
||
ssl_session_cache shared:SSL:10m; | ||
ssl_buffer_size 8k; | ||
|
||
# It's recommended to generate dhparam-2048.pem | ||
#ssl_dhparam /etc/ssl/certs/dhparam-2048.pem; | ||
|
||
location / { | ||
proxy_hide_header Access-Control-Allow-Origin; | ||
add_header 'Access-Control-Allow-Origin' '*' always; | ||
add_header 'Access-Control-Allow-Credentials' 'true'; | ||
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-HELIX-API-Version,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; | ||
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; | ||
|
||
if ($request_method = 'OPTIONS') { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Credentials' 'true'; | ||
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-HELIX-API-Version,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; | ||
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; | ||
add_header 'Access-Control-Max-Age' 1728000; | ||
add_header 'Content-Type' 'text/plain charset=UTF-8'; | ||
add_header 'Content-Length' 0; | ||
return 204; | ||
} | ||
|
||
proxy_redirect off; | ||
proxy_set_header host $host; | ||
proxy_set_header X-real-ip $remote_addr; | ||
proxy_set_header X-forward-for $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://pendulum; | ||
} | ||
} |
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
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
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
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
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
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
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
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
Oops, something went wrong.