Skip to content
Snippets Groups Projects
Commit 94c444f0 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

Merge branch 'release' into 'master'

Release

See merge request !4
parents 32bb9591 eaf384ac
No related branches found
No related tags found
2 merge requests!30Client Session Testing,!4Release
Showing
with 577 additions and 149 deletions
......@@ -17,9 +17,9 @@ cache:
variables:
REPO_DIR: gitlab.com/elixxir
REPO_NAME: server
DOCKER_IMAGE: elixxirlabs/cuda-go:go1.13-cuda11.1
DOCKER_IMAGE: elixxirlabs/cuda-go:go1.16-cuda11.1
# See https://docs.gitlab.com/ee/api/jobs.html#download-a-single-artifact-file-from-specific-tag-or-branch
REPOS_API: https://gitlab.com/api/v4/projects/elixxir%2F
REPOS_API: https://$GITLAB_SERVER/api/v4/projects/elixxir%2F
SERVER_URL: ""
SERVER_GPU_URL: ""
GPULIB_URL: ""
......@@ -57,6 +57,7 @@ installbinaries:
- ./download_cmix_binaries.sh l d
- mkdir -p /opt/xxnetwork/lib
- cp bin/libpowmosm75.so /opt/xxnetwork/lib/
- cp bin/libpow.fatbin /opt/xxnetwork/lib/
- "chmod +x *"
- bin/server version
- bin/server-cuda version
......@@ -81,14 +82,15 @@ basice2e:
- rm -fr results
- rm -fr results-cpu
- rm -fr results-gpu
- ls -lha
- ./run.sh
- mv results results-cpu
- sleep 60
# - ls -lha
# - ./run.sh
# - mv results results-cpu
# - sleep 60
- mkdir -p /opt/xxnetwork/lib
- cp ../bin/libpowmosm75.so /opt/xxnetwork/lib/
- cp ../bin/libpow.fatbin /opt/xxnetwork/lib/
- sed -i 's/bin\/server/bin\/server-cuda/g' run.sh
- sed -i 's/useGpu\:\ false/useGpu\:\ true/g' server-[12345].yaml
- sed -i 's/useGPU\:\ false/useGPU\:\ true/g' server-[12345].yaml
- NSYSENABLED=TRUE ./run.sh
- mv results results-gpu
- cd ..
......
188.187.190.53:22840
135.181.134.215:22840
90.64.159.233:22840
63.224.248.74:22840
78.63.197.35:22840
95.217.225.220:22840
167.86.89.25:22840
134.17.158.63:22840
77.92.107.203:22840
136.50.65.29:22840
176.99.131.128:22840
109.251.8.131:22840
85.237.9.101:22840
195.93.180.119:22840
193.106.95.173:22840
193.106.95.227:22840
168.119.49.161:22840
193.106.94.75:22840
176.99.131.188:22840
180.150.125.93:22840
135.181.29.63:22840
116.202.99.94:22840
94.130.150.94:22840
93.81.246.111:22840
183.99.96.180:22101
62.171.131.155:22840
159.65.122.44:22840
45.122.123.134:22840
157.90.34.21:22840
107.182.163.106:22840
52.124.124.210:22840
170.187.225.94:22840
95.217.228.117:22840
88.99.13.205:22840
52.183.38.229:22840
77.223.99.126:22840
37.228.116.99:22840
167.99.247.6:22840
5.45.81.112:22840
193.47.33.51:22840
5.45.81.110:22840
69.197.179.42:22840
69.197.179.162:22840
94.244.64.115:22840
109.100.137.105:22840
86.57.132.29:22840
178.248.81.38:22840
213.55.169.27:22840
212.24.106.228:22840
195.181.247.171:22840
82.148.29.76:22840
81.163.28.252:22840
80.249.150.70:22840
79.98.24.202:22840
62.173.145.42:22840
77.223.98.157:22840
193.47.33.132:22840
82.148.19.245:22840
31.184.254.81:22840
195.64.234.210:22840
195.64.234.98:22840
78.26.169.79:22840
62.77.156.70:22840
77.223.97.164:22840
193.47.33.50:22840
62.173.140.126:22840
93.81.246.64:22840
149.210.192.112:22840
77.120.176.213:22840
188.138.242.248:22840
178.168.101.47:22840
37.97.220.128:22840
69.197.147.18:22840
81.240.39.28:22840
141.105.67.92:22840
213.10.138.128:22840
217.136.119.184:22840
85.201.32.4:22840
92.64.19.232:22840
89.221.20.22:22840
62.167.123.100:22800
161.230.93.70:22840
76.65.147.14:22840
86.7.108.18:22840
109.129.225.57:22840
194.158.207.84:22840
116.203.252.237:22840
217.12.210.152:22840
45.115.107.124:22840
178.128.199.183:22840
93.107.156.53:22840
82.15.128.246:22840
70.75.89.186:22840
109.87.172.237:22840
80.90.47.210:22840
90.189.180.24:22840
46.98.0.118:22840
85.221.55.10:22840
191.32.173.237:22840
80.5.16.132:22840
173.212.199.13:22840
120.88.119.219:22840
135.19.193.9:22840
134.249.187.129:22840
188.194.110.16:22840
195.38.9.10:22840
46.42.16.25:22840
31.165.163.210:22840
89.232.195.123:22840
77.122.54.99:22840
85.105.79.102:22840
163.172.149.150:22840
5.53.16.225:22840
178.124.192.61:22840
167.99.130.234:22840
95.158.15.24:22840
195.239.181.117:22840
104.158.0.184:22840
62.171.142.152:22840
77.122.89.98:22840
200.37.209.49:22840
181.43.154.26:22840
185.230.88.227:22840
91.169.185.175:62840
217.136.102.221:22840
149.210.229.230:22840
176.37.104.235:22840
37.97.224.62:22840
94.107.24.186:22840
151.252.109.180:22840
195.93.181.189:22840
195.93.181.192:22840
149.210.229.210:22840
77.122.48.168:22840
185.4.65.20:22840
37.97.224.55:22840
178.170.47.131:22840
37.97.224.32:22840
178.170.39.140:22840
135.181.139.234:22840
78.129.38.119:22840
78.181.101.251:22840
68.183.34.147:22840
5.255.173.96:22840
195.177.94.31:22840
37.57.87.184:22840
37.97.224.19:22840
209.145.53.106:22840
176.214.77.176:22840
143.178.133.206:22840
85.118.207.56:22840
88.211.82.66:22840
185.23.83.59:22840
93.75.3.51:22840
176.210.55.44:22840
83.144.175.13:22840
78.188.200.189:22840
174.114.197.104:22840
188.83.79.190:22840
66.183.0.247:22840
5.61.52.49:22840
149.210.229.197:22840
82.118.17.160:22841
31.202.122.239:22840
46.150.9.16:22840
205.250.188.151:22840
149.210.229.175:22840
77.122.91.193:22840
31.202.122.152:22840
151.95.102.130:22840
91.245.37.80:22840
199.119.86.179:22840
93.72.67.70:22840
195.134.65.165:22840
103.56.39.162:20090
178.27.238.236:22840
149.210.192.41:22840
103.56.39.183:20090
5.61.54.13:22840
78.188.51.20:22840
93.157.248.142:22840
31.172.140.126:22840
95.189.106.118:22840
86.94.128.12:22840
5.132.111.41:22840
109.129.220.59:22840
84.83.206.46:22840
136.144.240.106:22840
89.28.86.208:22840
89.28.6.19:22840
5.255.173.43:22840
77.122.29.37:22840
136.144.203.178:22840
136.144.230.186:22840
136.144.206.186:22840
61.6.46.179:22840
31.202.123.194:22840
135.125.235.32:22840
103.83.149.90:22840
66.183.0.246:22840
185.12.142.45:22840
46.37.194.90:22840
78.26.140.125:22840
89.191.125.159:22840
31.201.104.137:22840
77.92.109.45:22840
108.249.110.153:22840
196.41.195.118:22840
101.98.209.195:22840
77.92.109.43:22840
188.127.250.195:22840
76.176.192.12:22840
91.177.2.56:22840
82.193.107.60:22840
86.83.150.15:22840
134.249.121.177:22840
46.166.138.219:22840
75.156.104.27:22840
109.100.137.83:22840
174.88.128.201:22840
178.168.68.129:22840
66.183.0.245:22840
62.238.247.127:22840
65.21.151.29:22841
207.81.171.109:22840
155.93.136.90:22840
190.22.170.63:22840
136.144.230.185:22840
102.182.202.19:22840
70.52.24.55:22841
195.191.174.168:22840
88.223.114.249:22840
46.142.181.156:22840
174.94.125.212:22840
184.146.45.46:22840
136.144.236.167:22840
174.88.104.199:22840
88.223.115.74:22840
178.170.40.34:22840
91.149.187.22:22840
178.150.223.30:22840
195.138.68.0:22840
77.122.59.150:22840
91.241.178.180:22840
95.164.8.35:22840
188.138.162.9:22840
77.122.80.204:22840
46.150.9.21:22840
46.119.158.146:22840
5.34.183.246:22842
65.21.180.158:22840
188.187.188.47:22840
62.171.137.40:22840
178.151.197.49:22840
213.231.5.100:22840
194.28.172.72:22840
76.71.65.212:22840
76.71.65.96:22840
185.46.60.30:22840
185.172.34.211:22840
87.255.69.231:22840
91.222.114.19:22840
162.55.58.184:22840
91.233.171.9:22840
82.16.173.238:22840
77.169.225.166:22840
87.248.171.27:22840
81.243.65.75:22840
207.6.218.81:22840
207.6.218.110:22840
188.124.46.130:22840
159.196.176.42:22840
143.244.158.201:22840
185.224.108.251:22840
80.100.87.204:22840
185.48.197.184:22840
95.67.28.111:22840
171.25.167.187:22840
176.100.12.243:22840
185.224.108.82:22840
217.12.223.90:22852
185.224.110.37:22840
195.138.85.182:22840
176.104.49.11:22840
176.104.52.215:22840
88.204.18.134:22840
217.26.167.45:22840
185.172.34.212:22840
87.255.69.232:22840
5.165.211.128:22840
136.144.205.104:22840
178.168.57.176:22840
87.255.69.238:22840
194.233.67.188:22840
88.159.77.30:22840
195.74.67.235:22840
174.94.68.31:22840
91.5.88.185:22841
179.223.85.90:22840
139.59.245.228:22840
199.119.86.185:22840
105.228.133.62:22840
139.59.126.219:22840
91.5.83.238:22842
95.216.221.129:22840
158.140.234.119:22840
# ==================================
# Client Registrar Configuration
# ==================================
# Log message level (0 = info, 1 = debug, >1 = trace)
logLevel: 0
# Path to log file
logPath: "results/client-registrar.log"
# Public address, used in NDF it gives to client
publicAddress: "0.0.0.0:11421"
# The listening port of this server
port: 11421
# === REQUIRED FOR ENABLING TLS ===
# Path to the registration server private key file
keyPath: "../keys/cmix.rip.key"
# Path to the registration server certificate file
certPath: "../keys/cmix.rip.crt"
# Maximum number of connections per period
userRegCapacity: 1000
# How often the number of connections is reset
userRegLeakPeriod: "24h"
# Database connection information
dbUsername: "cmix"
dbPassword: ""
dbName: "cmix_server"
dbAddress: ""
# List of client codes to be added to the database (for testing)
clientRegCodes:
- "AAAA"
- "BBBB"
- "CCCC"
Sent: Hello from Jake100 to myself, without E2E Encryption
Message received: Hello from Jake100 to myself, without E2E Encryption
Received 1
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100 to myself, without E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Message received: Hello from Niamh101, with E2E Encryption
Received 20
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Sent: Hello from Jake100, with E2E Encryption
Received 0
WARNING: unsafe channel creation enabled
Adding
Received 0
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Sent: Hello from Niamh101, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Received 20
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Message received: Hello from Jake100, with E2E Encryption
Received 20
Failed to register user josh13: rpc error: code = Unknown desc = Username josh13 is already taken. Please try again
WARNING: unsafe channel creation enabled
Adding
Received 0
Received 0
Sent: Hello from Josh13, with E2E Encryption
Sent: Hello from Josh13, with E2E Encryption
Sent: Hello from Josh13, with E2E Encryption
......@@ -13,3 +12,4 @@ Message received: Hello from Josh31, with E2E Encryption
Message received: Hello from Josh31, with E2E Encryption
Message received: Hello from Josh31, with E2E Encryption
Received 5
Removed user from discovery: josh13
WARNING: unsafe channel creation enabled
Adding
Sent: Hi 18->9, with E2E Encryption
Sent: Hi 18->9, with E2E Encryption
Sent: Hi 18->9, with E2E Encryption
......
Sent: Hi 19->19, with E2E Encryption
Sent: Hi 19->19, with E2E Encryption
Message received: Hi 19->19, with E2E Encryption
Message received: Hi 19->19, with E2E Encryption
Received 2
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Received 5
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Received 5
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Received 5
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Received 5
......@@ -25,3 +25,4 @@ Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Received 5
Received 0
WARNING: unsafe channel creation enabled
Adding
Received 0
Received 0
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
......
Created new group with name "Group Name" and message "80 inviting 81 and 82 to new group"
Got group with name "Group Name" and message "80 inviting 81 and 82 to new group"
Printed list of 1 groups.
Received group message: "Hello 2 from 82"
Received group message: "Hello from 81"
Received group message: "Hello from 82"
Sent message "Hello 2 from 80" to group.
Sent message "Hello from 80" to group.
Waiting for 1 group message(s) to be received.
Waiting for 2 group message(s) to be received.
Got group with name "Group Name" and message "80 inviting 81 and 82 to new group"
Joined group with name "Group Name" and message "80 inviting 81 and 82 to new group"
Left group.
Printed list of 1 groups.
Received group message: "Hello from 80"
Received group message: "Hello from 82"
Sent message "Hello from 81" to group.
Timed out waiting for 1 group message(s).
Waiting for 1 group message(s) to be received.
Waiting for 2 group message(s) to be received.
Waiting for group request to be received.
Got group with name "Group Name" and message "80 inviting 81 and 82 to new group"
Joined group with name "Group Name" and message "80 inviting 81 and 82 to new group"
Printed list of 1 groups.
Received group message: "Hello 2 from 80"
Received group message: "Hello from 80"
Received group message: "Hello from 81"
Sent message "Hello 2 from 82" to group.
Sent message "Hello from 82" to group.
Waiting for 1 group message(s) to be received.
Waiting for 2 group message(s) to be received.
Waiting for group request to be received.
WARNING: unsafe channel creation enabled
Adding
Sent: Hi 9->9, with E2E Encryption
Sent: Hi 9->9, with E2E Encryption
Message received: Hi 9->9, with E2E Encryption
......@@ -10,8 +8,6 @@ Sent: Hi 9->9, with E2E Encryption
Message received: Hi 9->9, with E2E Encryption
Message received: Hi 9->9, with E2E Encryption
Received 2
WARNING: unsafe channel creation enabled
Adding
Sent: Hi 9->18, with E2E Encryption
Sent: Hi 9->18, with E2E Encryption
Sent: Hi 9->18, with E2E Encryption
......
34.219.228.165:11420
54.203.24.52:11420
34.222.85.101:11420
34.219.242.38:11420
35.167.60.76:11420
52.89.133.230:11420
#!/usr/bin/env python3
# This script is used for building reports on message sending for E2E integration tests
import re
import glob
import os
import logging as log
import datetime
import statistics
resultsDir = "./results/clients"
def err(s):
"""
Helper for printing errors and exiting
:param s: Error string to print
"""
log.error(s)
exit(1)
def find_files():
"""Obtains list of files to search."""
if not os.path.isdir(resultsDir):
err("Directory {} does not exist!".format(resultsDir))
return glob.glob('{}/client*.log'.format(resultsDir))
def main():
log.basicConfig(format='[%(levelname)s] %(asctime)s: %(message)s',
level=log.INFO, datefmt='%d-%b-%y %H:%M:%S')
log_files = find_files()
messages_sent = dict()
messages_received = dict()
rounds_sent = dict()
# Scan each log file
for path in log_files:
log.info("Scanning {}".format(path))
with open(path, 'r') as file:
while True:
line = file.readline()
if not line:
break
else:
if "Successfully sent to EphID" in line:
# Capture message sending
sent_message = re.findall('msgDigest: (.{20})\)', line)[0]
log.debug("Located sent message: {}".format(sent_message))
messages_sent[sent_message] = {"sender": os.path.basename(path)}
# Capture message timestamp
sent_timestamp_str = re.findall('INFO (.{19}\.{0,1}\d{0,6})', line)[0]
try:
sent_timestamp = datetime.datetime.strptime(sent_timestamp_str, '%Y/%m/%d %H:%M:%S.%f')
except ValueError:
sent_timestamp = datetime.datetime.strptime(sent_timestamp_str, '%Y/%m/%d %H:%M:%S')
log.debug("Located sent timestamp: {}".format(sent_timestamp))
messages_sent[sent_message]["sent"] = sent_timestamp
# Capture rounds messages were sent in
sent_round = re.findall('\) in round ([0-9]+)', line)[0]
log.debug("Located sent round: {}".format(sent_round))
messages_sent[sent_message]["round"] = sent_round
if sent_round not in rounds_sent:
rounds_sent[sent_round] = False
elif "Received message of type" in line or "Received AuthRequest from" in line or "Received AuthConfirm from" in line:
# Capture message receiving
received_message = re.findall(' msgDigest: (.{20})', line)[0]
log.debug("Located received message: {}".format(received_message))
messages_received[received_message] = {"receiver": os.path.basename(path)}
# Capture message timestamp
received_timestamp_str = re.findall('INFO (.{19}\.{0,1}\d{0,6})', line)[0]
try:
received_timestamp = datetime.datetime.strptime(received_timestamp_str,
'%Y/%m/%d %H:%M:%S.%f')
except ValueError:
received_timestamp = datetime.datetime.strptime(received_timestamp_str, '%Y/%m/%d %H:%M:%S')
log.debug("Located received timestamp: {}".format(received_timestamp))
messages_received[received_message]["received"] = received_timestamp
elif "Round(s)" in line:
# Capture round success
successful_rounds = re.findall('Round\(s\) ([0-9]+) successful', line)
for successful_round in successful_rounds:
log.debug("Located successful round: {}".format(successful_round))
rounds_sent[successful_round] = True
# Print results
num_successful = 0 # Keep track of how many messages were received successfully
total_latency = datetime.timedelta() # Keep track of the total message latencies to calculate a mean
latencies = [] # Keep track of each message's latency in order to calculate a median
for msgDigest, senderDict in messages_sent.items():
if msgDigest in messages_received:
num_successful += 1
time_sent = messages_sent[msgDigest]["sent"]
time_received = messages_received[msgDigest]["received"]
message_latency = time_received - time_sent
latencies.append(message_latency)
total_latency += message_latency
log.info("Message {} sent by {} on round {} was received after {}".format(msgDigest,
senderDict["sender"],
senderDict["round"],
message_latency))
log.info("\tSent: {}, Received: {}".format(time_sent, time_received))
else:
log.error("Message {} sent by {} on round {} was NOT received".format(msgDigest,
senderDict["sender"],
senderDict["round"]))
for round_id, was_successful in rounds_sent.items():
if was_successful:
log.debug("Round {} was successful".format(round_id))
else:
log.warning("Round {} was NOT confirmed successful, messages may have been dropped".format(round_id))
log.info("{}/{} messages received successfully!".format(num_successful, len(messages_sent)))
log.info("\tMean: {}, Median: {}".format(total_latency / num_successful, statistics.median(latencies)))
if __name__ == "__main__":
main()
# INFO 2021/05/07 15:25:14 Received message of type None from ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED, msgDigest: inDu2/zmGD+vtCMVHXdg
# INFO 2021/05/19 15:29:09 Received 2 messages in Round 65253 for -7 (AAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD)
# INFO 2021/05/07 15:25:03 Sending to EphID -15 (ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED) on round 797, (msgDigest: YTuZd9p8759GBMNz8Dw7, ecrMsgDigest: JshXEJ4WTBsbRFWQDBYq) via gateway sAtfNaRd1jePhfRrcDgZgHHAAmhZ/F0jDbD4JgAfkMsB
# INFO 2021/05/07 15:25:04 Successfully sent to EphID -15 (source: ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED) in round 797 (msgDigest: YTuZd9p8759GBMNz8Dw7)
# INFO 2021/05/07 15:25:04 Result of sending message "Hello from Rick42, with E2E Encryption" to "ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED":
# INFO 2021/05/07 15:25:04 Round(s) 795 successful
......@@ -12,7 +12,7 @@ log: "results/gateways/gateway-1.log"
logLevel: 1
# The public IP address and port of the node associated with this gateway
nodeAddress: "127.0.0.1:50000"
cmixAddress: "127.0.0.1:50000"
# Port for Gateway to listen on. Gateway must be the only listener on this port.
# Required field.
......@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
# Path to the certificate file
certPath: "../keys/cmix.rip.crt"
# Path to the permissioning certificate
permissioningCertPath: "../keys/cmix.rip.crt"
schedulingCertPath: "../keys/cmix.rip.crt"
# Path to the certificate file
serverCertPath: "../keys/cmix.rip.crt"
cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment