Skip to content
Snippets Groups Projects
Commit 6d42b7ab authored by Jono Wenger's avatar Jono Wenger Committed by Richard T. Carback III
Browse files

XX-4050 / sendE2e Test For WASM

parent ad290395
No related branches found
No related tags found
2 merge requests!68Master merge,!33XX-4050 / sendE2e Test For WASM
Showing
with 969 additions and 2 deletions
......@@ -86,13 +86,14 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
GPULIB_URL=${GPULIB_URL:="${REPOS_API}server/$BRANCH_URL/libpowmosm75.so?job=build"}
GPULIB2_URL=${GPULIB2_URL:="${REPOS_API}server/$BRANCH_URL/libpow.fatbin?job=build"}
CLIENT_REG_URL=${CLIENT_REG_URL:="${REPOS_API}client-registrar/$BRANCH_URL/registration$BIN"}
XXDK_WASM_URL=${XXDK_WASM_URL:="${REPOS_API}xxdk-wasm/$BRANCH_URL/xxdk.wasm?job=build"}
else
UDB_URL=${UDB_URL:="${REPOS_API}/$BRANCH/udb$BIN"}
SERVER_URL=${SERVER_URL:="${REPOS_API}/$BRANCH/server$BIN"}
GW_URL=${GW_URL:="${REPOS_API}/$BRANCH/gateway$BIN"}
PERMISSIONING_URL=${PERMISSIONING_URL:="${REPOS_API}/$BRANCH/registration.stateless$BIN"}
CLIENT_URL=${CLIENT_URL:="${REPOS_API}/$BRANCH/client$BIN"}
CLIENT_REG_URL=${CLIENT_REG_URL:="${REPOS_API}client-registrar/$BRANCH_URL/registration$BIN"}
XXDK_WASM_URL=${XXDK_WASM_URL:="${REPOS_API}/$BRANCH/xxdk.wasm?job=build"}
fi
set -x
......@@ -127,6 +128,11 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client-registrar" ${CLIENT_REG_URL}
fi
# Silently download the client registrar binary to the provisioning directory
if [ ! -f $download_path/xxdk.wasm ] && [[ "$XXDK_WASM_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/xxdk.wasm" ${XXDK_WASM_URL}
fi
if [[ $2 == "d" ]]; then
# Silently download the Server binary to the provisioning directory
if [ ! -f $download_path/server-cuda ] && [[ "$SERVER_GPU_URL" != *"forcedbranch"* ]]; then
......@@ -161,6 +167,7 @@ fi
unset GPULIB_URL
unset GPULIB2_URL
unset CLIENT_REG_URL
unset XXDK_WASM_URL
done
# Make binaries executable
......
# Running WASM Tests
To run WASM tests, servers and gateways are run like normal, but the client is
served by an HTTP server in the browser.
The `testServer` directory contains a basic HTTP server (`clientServer.go`) and
various directories each containing a different example. Each example contains
one or more cMix clients running in javascript. The `assets` directory contains
files used by all the examples.
To run the server, first ensure the compiled bindings are in the `bin`
directory. Then run the server
```shell
$ GOOS=js GOARCH=wasm go build -o examples/xxdk.wasm
$ cd testServer/
$ go run clientServer.go
```
Navigate to http://localhost:9090 to see a list of files in the server and
navigate to a `.html` file in any of the examples to open a client.
To start the network, run `run.sh` in the console.
## `wasm_exec.js`
`wasm_exec.js` is provided by Go and is used to import the WebAssembly module in
the browser. It can be retrieved from Go using the following command.
```shell
$ cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" test/assets/
```
Note that this repository makes edits to `wasm_exec.js` and you must either use
the one in this repository or add the following lines in the `go` `importObject`
on `global.Go`.
```javascript
global.Go = class {
constructor() {
// ...
this.importObject = {
go: {
// ...
// func Throw(exception string, message string)
'gitlab.com/elixxir/xxdk-wasm/utils.throw': (sp) => {
const exception = loadString(sp + 8)
const message = loadString(sp + 24)
throw globalThis[exception](message)
},
}
}
}
}
```
# ==================================
# 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: "localhost: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"
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# Output log file
log: "results/gateways/gateway-1.log"
# Log message level
logLevel: 1
# The public IP address and port of the node associated with this gateway
cmixAddress: "127.0.0.1:50000"
# Port for Gateway to listen on. Gateway must be the only listener on this port.
# Required field.
port: 8440
# The public IPv4 address of the Gateway, as reported to the network, to use
# instead of dynamically looking up Gateway's own IP address. If a port is not
# included, then the port flag is used instead.
overridePublicIP: "localhost"
# The number of seconds a message should remain in the globals before being
# deleted from the user's message queue
messageTimeout: "1800s"
# Path to where the IDF is saved. This is used by the wrapper management script.
idfPath: "results/gateways/gateway-1-idf.json"
# === REQUIRED FOR ENABLING TLS ===
# Path to the private key file
keyPath: "../keys/cmix.rip.key"
# Path to the certificate file
certPath: "../keys/cmix.rip.crt"
# Path to the permissioning certificate
schedulingCertPath: "../keys/cmix.rip.crt"
# Path to the certificate file
cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# Output log file
log: "results/gateways/gateway-2.log"
# Log message level
logLevel: 1
# The public IP address and port of the node associated with this gateway
cmixAddress: "127.0.0.1:50001"
# Port for Gateway to listen on. Gateway must be the only listener on this port.
# Required field.
port: 8441
# The public IPv4 address of the Gateway, as reported to the network, to use
# instead of dynamically looking up Gateway's own IP address. If a port is not
# included, then the port flag is used instead.
overridePublicIP: "localhost"
# The number of seconds a message should remain in the globals before being
# deleted from the user's message queue
messageTimeout: "1800s"
# Path to where the IDF is saved. This is used by the wrapper management script.
idfPath: "results/gateways/gateway-2-idf.json"
# === REQUIRED FOR ENABLING TLS ===
# Path to the private key file
keyPath: "../keys/cmix.rip.key"
# Path to the certificate file
certPath: "../keys/cmix.rip.crt"
# Path to the permissioning certificate
schedulingCertPath: "../keys/cmix.rip.crt"
# Path to the certificate file
cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# Output log file
log: "results/gateways/gateway-3.log"
# Log message level
logLevel: 1
# The public IP address and port of the node associated with this gateway
cmixAddress: "127.0.0.1:50002"
# Port for Gateway to listen on. Gateway must be the only listener on this port.
# Required field.
port: 8442
# The public IPv4 address of the Gateway, as reported to the network, to use
# instead of dynamically looking up Gateway's own IP address. If a port is not
# included, then the port flag is used instead.
overridePublicIP: "localhost"
# The number of seconds a message should remain in the globals before being
# deleted from the user's message queue
messageTimeout: "1800s"
# Path to where the IDF is saved. This is used by the wrapper management script.
idfPath: "results/gateways/gateway-3-idf.json"
# === REQUIRED FOR ENABLING TLS ===
# Path to the private key file
keyPath: "../keys/cmix.rip.key"
# Path to the certificate file
certPath: "../keys/cmix.rip.crt"
# Path to the permissioning certificate
schedulingCertPath: "../keys/cmix.rip.crt"
# Path to the certificate file
cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# Output log file
log: "results/gateways/gateway-4.log"
# Log message level
logLevel: 1
# The public IP address and port of the node associated with this gateway
cmixAddress: "127.0.0.1:50003"
# Port for Gateway to listen on. Gateway must be the only listener on this port.
# Required field.
port: 8443
# The public IPv4 address of the Gateway, as reported to the network, to use
# instead of dynamically looking up Gateway's own IP address. If a port is not
# included, then the port flag is used instead.
overridePublicIP: "localhost"
# The number of seconds a message should remain in the globals before being
# deleted from the user's message queue
messageTimeout: "1800s"
# Path to where the IDF is saved. This is used by the wrapper management script.
idfPath: "results/gateways/gateway-4-idf.json"
# === REQUIRED FOR ENABLING TLS ===
# Path to the private key file
keyPath: "../keys/cmix.rip.key"
# Path to the certificate file
certPath: "../keys/cmix.rip.crt"
# Path to the permissioning certificate
schedulingCertPath: "../keys/cmix.rip.crt"
# Path to the certificate file
cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# Output log file
log: "results/gateways/gateway-5.log"
# Log message level
logLevel: 1
# The public IP address and port of the node associated with this gateway
cmixAddress: "127.0.0.1:50004"
# Port for Gateway to listen on. Gateway must be the only listener on this port.
# Required field.
port: 8444
# The public IPv4 address of the Gateway, as reported to the network, to use
# instead of dynamically looking up Gateway's own IP address. If a port is not
# included, then the port flag is used instead.
overridePublicIP: "localhost"
# The number of seconds a message should remain in the globals before being
# deleted from the user's message queue
messageTimeout: "1800s"
# Path to where the IDF is saved. This is used by the wrapper management script.
idfPath: "results/gateways/gateway-5-idf.json"
# === REQUIRED FOR ENABLING TLS ===
# Path to the private key file
keyPath: "../keys/cmix.rip.key"
# Path to the certificate file
certPath: "../keys/cmix.rip.crt"
# Path to the permissioning certificate
schedulingCertPath: "../keys/cmix.rip.crt"
# Path to the certificate file
cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
# === END YAML
# This script is used to start a basic 5 node network for running clients on. It is meant to be `source`'d into a script
# which will run clients on the network, such as `client-session-tests.sh` or the main `run.sh`.
#
# You **must** source it, because otherwise the `trap finish EXIT` instruction will cause the network to stop when
# network.sh returns to your script or shell. Sourcing it will "import" the commands into your script instead, causing
# the trap instruction to stop the network when your script/shell exits.
echo "STARTING SERVERS..."
# Copy udbContact into place when running locally.
cp udbContact.bin results/udbContact.bin
PERMCMD="../bin/permissioning --logLevel $DEBUGLEVEL -c permissioning.yaml "
$PERMCMD > results/permissioning-console.txt 2>&1 &
PIDVAL=$!
echo "$PERMCMD -- $PIDVAL"
# Run Client Registrar
CLIENT_REG_CMD="../bin/client-registrar \
-l 2 -c client-registrar.yaml"
$CLIENT_REG_CMD > results/client-registrat-console.txt 2>&1 &
PIDVAL=$!
echo "$CLIENT_REG_CMD -- $PIDVAL"
for SERVERID in $(seq 5 -1 1)
do
IDX=$(($SERVERID - 1))
SERVERCMD="../bin/server --logLevel $DEBUGLEVEL --config server-$SERVERID.yaml"
if [ $SERVERID -eq 5 ] && [ -n "$NSYSENABLED" ]
then
SERVERCMD="nsys profile --session-new=gputest --trace=cuda -o server-$SERVERID $SERVERCMD"
fi
$SERVERCMD > $SERVERLOGS/server-$SERVERID-console.txt 2>&1 &
PIDVAL=$!
echo "$SERVERCMD -- $PIDVAL"
done
# Start gateways
for GWID in $(seq 5 -1 1)
do
IDX=$(($GWID - 1))
GATEWAYCMD="../bin/gateway --logLevel $DEBUGLEVEL --config gateway-$GWID.yaml"
$GATEWAYCMD > $GATEWAYLOGS/gateway-$GWID-console.txt 2>&1 &
PIDVAL=$!
echo "$GATEWAYCMD -- $PIDVAL"
done
jobs -p > results/serverpids
finish() {
echo "STOPPING SERVERS AND GATEWAYS..."
if [ -n "$NSYSENABLED" ]
then
nsys stop --session=gputest
fi
# NOTE: jobs -p doesn't work in a signal handler
for job in $(cat results/serverpids)
do
echo "KILLING $job"
kill $job || true
done
sleep 5
for job in $(cat results/serverpids)
do
echo "KILL -9 $job"
kill -9 $job || true
done
#tail $SERVERLOGS/*
#tail $CLIENTCLEAN/*
#diff -aruN clients.goldoutput $CLIENTCLEAN
}
trap finish EXIT
trap finish INT
# Sleeps can die in a fire on the sun, we wait for the servers to start running
# rounds
rm rid.txt || true
touch rid.txt
cnt=0
echo -n "Waiting for a round to run"
while [ ! -s rid.txt ] && [ $cnt -lt 120 ]; do
sleep 1
grep -a "RID 1 ReceiveFinishRealtime END" results/servers/server-* > rid.txt || true
cnt=$(($cnt + 1))
echo -n "."
done
# Start a user discovery bot server
echo "STARTING UDB..."
UDBCMD="../bin/udb --logLevel $DEBUGLEVEL --skipVerification --protoUserPath udbProto.json --config udb.yaml -l 1"
$UDBCMD >> $UDBOUT 2>&1 &
PIDVAL=$!
echo $PIDVAL >> results/serverpids
echo "$UDBCMD -- $PIDVAL"
rm rid.txt || true
while [ ! -s rid.txt ] && [ $cnt -lt 30 ]; do
sleep 1
grep -a "Sending Poll message" results/udb-console.txt > rid.txt || true
cnt=$(($cnt + 1))
echo -n "."
done
echo "localhost:8440" > results/startgwserver.txt
echo "DONE LETS DO STUFF"
\ No newline at end of file
# ==================================
# Permissioning Server Configuration
# ==================================
# Log message level
logLevel: 1
# Path to log file
logPath: "results/permissioning.log"
# The listening pofrt of this server
port: 18000
# Database connection information
dbUsername: ""
dbPassword: ""
dbName: ""
dbAddress: "0.0.0.0:6969"
minimumNodes: 5
minGatewayVersion: "3.0.0"
minServerVersion: "3.0.0"
minClientVersion: "4.0.0"
nodeMetricInterval: 3
# For testing, use the sequence as the country code. Do not use the geobinning database
disableGeoBinning: true
# For testing, do not exclude node or gateway IPs which are local to the machine
allowLocalIPs: true
# Disable pruning of NDF for offline nodes
# if set to false, network will sleep for five minutes on start
disableNDFPruning: true
permissiveIPChecking: true
# How long rounds will be tracked by gateways. Rounds (and messages as an extension)
# prior to this period are not guaranteed to be delivered to clients.
# Expects duration in"h". (Defaults to 1 weeks (168 hours)
messageRetentionLimit: "168h"
# Path to the file containing the round ID
roundIdPath: "results/roundId.txt"
# Path to the file containing the update ID
updateIdPath: "results/updateId.txt"
# Public address used in NDF to give to client
registrationAddress: "localhost:11421"
# Path to whitelisted IPs for client ratelimiting
whitelistedIpAddressesPath: "whitelist.txt"
# === 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"
fullNdfOutputPath: "results/permissions-ndfoutput.json"
# === REQUIRED FOR ENABLING TLS ===
# Path to the UDB certificate file
udbCertPath: "../keys/cmix.rip.crt"
# "Location of the user discovery contact file.
udContactPath: "results/udbContact.bin"
udbAddress: "127.0.0.1:18001"
# Time interval (in minutes) in which the database is
# checked for banned nodes
BanTrackerInterval: "3"
groups:
cmix:
prime: "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF"
generator: "2"
e2e:
prime: "E2EE983D031DC1DB6F1A7A67DF0E9A8E5561DB8E8D49413394C049B7A8ACCEDC298708F121951D9CF920EC5D146727AA4AE535B0922C688B55B3DD2AEDF6C01C94764DAB937935AA83BE36E67760713AB44A6337C20E7861575E745D31F8B9E9AD8412118C62A3E2E29DF46B0864D0C951C394A5CBBDC6ADC718DD2A3E041023DBB5AB23EBB4742DE9C1687B5B34FA48C3521632C4A530E8FFB1BC51DADDF453B0B2717C2BC6669ED76B4BDD5C9FF558E88F26E5785302BEDBCA23EAC5ACE92096EE8A60642FB61E8F3D24990B8CB12EE448EEF78E184C7242DD161C7738F32BF29A841698978825B4111B4BC3E1E198455095958333D776D8B2BEEED3A1A1A221A6E37E664A64B83981C46FFDDC1A45E3D5211AAF8BFBC072768C4F50D7D7803D2D4F278DE8014A47323631D7E064DE81C0C6BFA43EF0E6998860F1390B5D3FEACAF1696015CB79C3F9C2D93D961120CD0E5F12CBB687EAB045241F96789C38E89D796138E6319BE62E35D87B1048CA28BE389B575E994DCA755471584A09EC723742DC35873847AEF49F66E43873"
generator: "2"
# Path to file with config for scheduling algorithm within the user directory
schedulingConfigPath: "registration.json"
# Path to JSON file with list of Node registration codes (in order of network
# placement)
RegCodesFilePath: "regCodes.json"
# Set address space size for ephemeral IDs
addressSpace: 32
[{"RegCode": "qpol", "Order": "CR"},{"RegCode": "yiiq", "Order": "GB"},{"RegCode": "vydz", "Order": "SK"},{"RegCode": "gwxs", "Order": "HR"},{"RegCode": "nahv", "Order": "IQ"}, {"RegCode": "doko", "Order": "RU"}]
{
"TeamSize": 5,
"PrecomputationTimeout": 30000,
"RealtimeTimeout": 15000,
"DebugTrackRounds": true,
"BatchSize": 32,
"MinimumDelay": 1000,
"RealtimeDelay": 2000,
"Threshold": 0.3,
"NodeCleanUpInterval": 180000,
"ResourceQueueTimeout": 300000
}
#!/bin/bash
set -e
# --- Define variables to use for the test & local network ---
DEBUGLEVEL=${DEBUGLEVEL-1}
SERVERLOGS=results/servers
GATEWAYLOGS=results/gateways
UDBOUT=results/udb-console.txt
# --- Setup a local network ---
rm -rf results.bak || true
mv results results.bak || rm -rf results || true
rm -rf client*.log blob* rick*.bin ben*.bin
mkdir results
mkdir -p $SERVERLOGS
mkdir -p $GATEWAYLOGS
# Start the network
source network.sh
# This remains commented out while using HTTP
#echo "DOWNLOADING TLS Cert..."
#CMD="openssl s_client -showcerts -connect $(tr -d '[:space:]' <results/startgwserver.txt)"
#echo "$CMD"
#eval "$CMD" </dev/null 2>&1 >"results/startgwcert.bin"
#CMD="cat results/startgwcert.bin | openssl x509 -outform PEM"
#echo "$CMD"
#eval "$CMD" >"results/startgwcert.pem"
#head "results/startgwcert.pem"
#
#echo "DOWNLOADING NDF..."
#CLIENTCMD="../bin/client getndf -v $DEBUGLEVEL --gwhost $(tr -d '[:space:]' <results/startgwserver.txt) --cert results/startgwcert.pem"
#eval "$CLIENTCMD" >>results/ndf.json 2>&1 &
#echo "$CLIENTCMD -- $PIDVAL"
#wait $PIDVAL
while :; do
sleep 10
done
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# registration code used for first time registration. Unique. Provided by xx network
registrationCode: "qpol"
useGPU: false
devMode: true
rawPermAddr: true
logLevel: 1
cmix:
paths:
idf: "results/servers/nodeID-1.json"
cert: "../keys/cmix.rip.crt"
key: "../keys/cmix.rip.key"
log: "results/servers/server-1.log"
errOutput: "results/servers/server-1.err"
ipListOutput: "results/servers/iplist-1.txt"
port: 50000
overridePublicIP: "127.0.0.1"
database:
name: "node1"
username: "cmix_server"
password: ""
address: ""
gateway:
paths:
cert: "../keys/cmix.rip.crt"
scheduling:
paths:
cert: "../keys/cmix.rip.crt"
address: "127.0.0.1:18000"
metrics:
# location of stored metrics data. Modification to set to permissioning
# server instead of saving will be made at a later date
log: "results/servers/server-1-metrics.log"
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# registration code used for first time registration. Unique. Provided by xx network
registrationCode: "yiiq"
useGPU: false
devMode: true
rawPermAddr: true
logLevel: 1
cmix:
paths:
idf: "results/servers/nodeID-2.json"
cert: "../keys/cmix.rip.crt"
key: "../keys/cmix.rip.key"
log: "results/servers/server-2.log"
errOutput: "results/servers/server-2.err"
ipListOutput: "results/servers/iplist-2.txt"
port: 50001
overridePublicIP: "127.0.0.1"
database:
name: "node2"
username: "cmix_server"
password: ""
address: ""
gateway:
paths:
cert: "../keys/cmix.rip.crt"
scheduling:
paths:
cert: "../keys/cmix.rip.crt"
address: "127.0.0.1:18000"
metrics:
# location of stored metrics data. Modification to set to permissioning
# server instead of saving will be made at a later date
log: "results/servers/server-2-metrics.log"
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# registration code used for first time registration. Unique. Provided by xx network
registrationCode: "vydz"
useGPU: false
devMode: true
rawPermAddr: true
logLevel: 1
cmix:
paths:
idf: "results/servers/nodeID-3.json"
cert: "../keys/cmix.rip.crt"
key: "../keys/cmix.rip.key"
log: "results/servers/server-3.log"
errOutput: "results/servers/server-3.err"
ipListOutput: "results/servers/iplist-3.txt"
port: 50002
overridePublicIP: "127.0.0.1"
database:
name: "node3"
username: "cmix_server"
password: ""
address: ""
gateway:
paths:
cert: "../keys/cmix.rip.crt"
scheduling:
paths:
cert: "../keys/cmix.rip.crt"
address: "127.0.0.1:18000"
metrics:
# location of stored metrics data. Modification to set to permissioning
# server instead of saving will be made at a later date
log: "results/servers/server-3-metrics.log"
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# registration code used for first time registration. Unique. Provided by xx network
registrationCode: "gwxs"
useGPU: false
devMode: true
rawPermAddr: true
logLevel: 1
cmix:
paths:
idf: "results/servers/nodeID-4.json"
cert: "../keys/cmix.rip.crt"
key: "../keys/cmix.rip.key"
log: "results/servers/server-4.log"
errOutput: "results/servers/server-4.err"
ipListOutput: "results/servers/iplist-4.txt"
port: 50003
overridePublicIP: "127.0.0.1"
database:
name: "node4"
username: "cmix_server"
password: ""
address: ""
gateway:
paths:
cert: "../keys/cmix.rip.crt"
scheduling:
paths:
cert: "../keys/cmix.rip.crt"
address: "127.0.0.1:18000"
metrics:
# location of stored metrics data. Modification to set to permissioning
# server instead of saving will be made at a later date
log: "results/servers/server-4-metrics.log"
# === END YAML
# START YAML ===
################################################################################
## Copyright © 2019 Privategrity Corporation #
## #
## All rights reserved. #
################################################################################
# registration code used for first time registration. Unique. Provided by xx network
registrationCode: "nahv"
useGPU: false
devMode: true
rawPermAddr: true
logLevel: 1
cmix:
paths:
idf: "results/servers/nodeID-5.json"
cert: "../keys/cmix.rip.crt"
key: "../keys/cmix.rip.key"
log: "results/servers/server-5.log"
errOutput: "results/servers/server-5.err"
ipListOutput: "results/servers/iplist-5.txt"
port: 50004
overridePublicIP: "127.0.0.1"
database:
name: "node5"
username: "cmix_server"
password: ""
address: ""
gateway:
paths:
cert: "../keys/cmix.rip.crt"
scheduling:
paths:
cert: "../keys/cmix.rip.crt"
address: "127.0.0.1:18000"
metrics:
# location of stored metrics data. Modification to set to permissioning
# server instead of saving will be made at a later date
log: "results/servers/server-5-metrics.log"
# === END YAML
/******************************************************************************
* Copyright © 2022 xx foundation *
* *
* Use of this source code is governed by a license that can be found in the *
* LICENSE file. *
******************************************************************************/
/******************************************************************************
* CSS Reset (meyerweb reset, v2.0 | 20110126) *
******************************************************************************/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/******************************************************************************
* Global Styles *
******************************************************************************/
body {
font-family: "Roboto", "Franklin Gothic Medium", Tahoma, sans-serif;
padding:25px;
}
form {
}
form div {
margin:1em 0;
}
samp, var, code {
border-radius:.385em;
font-family:Consolas, monaco, monospace;
white-space:pre;
background:#e5e5e5;
color:#000;
font-size:1em;
padding:.125em .25em;
}
div.toolbar {
float:right;
display: flex;
}
div.toolbar input {
margin:2px;
}
/*========================================
Headers
========================================*/
h1, h2, h3, h4, h5, h6 {
color:#000;
font-weight:700;
line-height:1em;
}
h1 {
font-size:3em;
margin:0.5em 0;
}
/*========================================
HTML Console
========================================*/
div#logOutput {
font-family: "Roboto Mono", monaco, Consolas, "Lucida Console", monospace;
display: block;
font-size: 1em;
line-height: 1.5em;
border-radius:9px;
background:#f5f5f5;
border:1px solid #6ce26c;
border-left:3px solid #6ce26c;
margin:25px 0;
max-height:60vh;
padding:15px;
white-space:pre-wrap;
width:auto;
overflow-y: scroll;
}
div#logOutput p{
padding:0.1em 0;
}
div#logOutput p.error{
color: #ff0000;
font-weight: bold;
}
\ No newline at end of file
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2022 xx foundation //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file. //
////////////////////////////////////////////////////////////////////////////////
// Function to download data to a file.
function download(filename, data) {
const file = new Blob([data], {type: 'text/plain'});
let a = document.createElement("a"),
url = URL.createObjectURL(file);
a.href = url;
a.download = filename;
document.body.appendChild(a);
a.click();
setTimeout(function() {
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 0);
}
// sleepUntil waits until the condition f is met or until the timeout is
// reached.
async function sleepUntil(f, timeoutMs) {
return new Promise((resolve, reject) => {
const timeWas = new Date();
const wait = setInterval(function() {
if (f()) {
console.log("resolved after", new Date() - timeWas, "ms");
clearInterval(wait);
resolve();
} else if (new Date() - timeWas > timeoutMs) { // Timeout
console.log("rejected after", new Date() - timeWas, "ms");
clearInterval(wait);
reject();
}
}, 20);
});
}
// newHtmlConsole returns an object that allows for printing log messages or
// error messages to an element.
function newHtmlConsole(elem) {
return {
log: function (message) {
console.log(message)
elem.innerHTML += "<p>" + message + "</p>"
},
error: function (message) {
console.error(message)
elem.innerHTML += "<p class='error'>" + message + "</p>"
}
};
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment