diff --git a/basice2e/clients.goldoutput/client18.out b/basice2e/clients.goldoutput/client18.out new file mode 100644 index 0000000000000000000000000000000000000000..026463950b15ddd1841943e4fc71c741ab1918f9 --- /dev/null +++ b/basice2e/clients.goldoutput/client18.out @@ -0,0 +1 @@ +UDB search successful. Returned user [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9] diff --git a/basice2e/clients.goldoutput/client9.out b/basice2e/clients.goldoutput/client9.out index 63dab81384c54a073675d1b6710356ed717199e0..ce992b4c016272ac345e5e2bf9e6cf1ffd192038 100644 --- a/basice2e/clients.goldoutput/client9.out +++ b/basice2e/clients.goldoutput/client9.out @@ -1,2 +1 @@ -UDB registration successful. -UDB search successful. Returned user [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9], public key "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00this is not a real public key" +UDB search successful. Returned user [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18] diff --git a/basice2e/gateway-1.yaml b/basice2e/gateway-1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f11f062cdb3a3972305533ab5ecd5c2a1b034a21 --- /dev/null +++ b/basice2e/gateway-1.yaml @@ -0,0 +1,38 @@ +################################################################################ +## Copyright © 2018 Privategrity Corporation # +## # +## All rights reserved. # +################################################################################ + +# Output log file +log: "results/gateways/gateway-1.log" + +verbose: "true" + +# The cMix nodes in the network +cMixNodes: + - "localhost:50000" + - "localhost:50001" + - "localhost:50002" + - "localhost:50003" + - "localhost:50004" +# The index to which this Gateway is attached in the cMixNodes list +GatewayNodeIndex: 0 + +# The listening address of this gateway +GatewayAddress: "localhost:8440" + +# The number of seconds a message should remain in the globals before being +# deleted from the user's message queue +MessageTimeout: 1800 + +keyPath: "../keys/gateway.cmix.rip.key" +certPath: "../keys/gateway.cmix.rip.crt" +serverCertPath: "../keys/cmix.rip.crt" + +### Anything below this line is to be deprecated ### + +# Number of nodes in the cMix Network + +# Batch size of the cMix Network (to be deprecated) +batchSize: 4 diff --git a/basice2e/gateway-2.yaml b/basice2e/gateway-2.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b556c4868d1cd5fbccd334998a24296fc72a2cba --- /dev/null +++ b/basice2e/gateway-2.yaml @@ -0,0 +1,38 @@ +################################################################################ +## Copyright © 2018 Privategrity Corporation # +## # +## All rights reserved. # +################################################################################ + +# Output log file +log: "results/gateways/gateway-2.log" + +verbose: "true" + +# The cMix nodes in the network +cMixNodes: + - "localhost:50000" + - "localhost:50001" + - "localhost:50002" + - "localhost:50003" + - "localhost:50004" +# The index to which this Gateway is attached in the cMixNodes list +GatewayNodeIndex: 1 + +# The listening address of this gateway +GatewayAddress: "localhost:8441" + +# The number of seconds a message should remain in the globals before being +# deleted from the user's message queue +MessageTimeout: 1800 + +keyPath: "../keys/gateway.cmix.rip.key" +certPath: "../keys/gateway.cmix.rip.crt" +serverCertPath: "../keys/cmix.rip.crt" + +### Anything below this line is to be deprecated ### + +# Number of nodes in the cMix Network + +# Batch size of the cMix Network (to be deprecated) +batchSize: 4 diff --git a/basice2e/gateway-3.yaml b/basice2e/gateway-3.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cc775fd974f21563e400ce4f13ae549d07b2dcee --- /dev/null +++ b/basice2e/gateway-3.yaml @@ -0,0 +1,38 @@ +################################################################################ +## Copyright © 2018 Privategrity Corporation # +## # +## All rights reserved. # +################################################################################ + +# Output log file +log: "results/gateways/gateway-3.log" + +verbose: "true" + +# The cMix nodes in the network +cMixNodes: + - "localhost:50000" + - "localhost:50001" + - "localhost:50002" + - "localhost:50003" + - "localhost:50004" +# The index to which this Gateway is attached in the cMixNodes list +GatewayNodeIndex: 2 + +# The listening address of this gateway +GatewayAddress: "localhost:8442" + +# The number of seconds a message should remain in the globals before being +# deleted from the user's message queue +MessageTimeout: 1800 + +keyPath: "../keys/gateway.cmix.rip.key" +certPath: "../keys/gateway.cmix.rip.crt" +serverCertPath: "../keys/cmix.rip.crt" + +### Anything below this line is to be deprecated ### + +# Number of nodes in the cMix Network + +# Batch size of the cMix Network (to be deprecated) +batchSize: 4 diff --git a/basice2e/gateway.yaml b/basice2e/gateway-4.yaml similarity index 95% rename from basice2e/gateway.yaml rename to basice2e/gateway-4.yaml index 7b7fc4cacd2b9a8682518d65943e3015fc17daf9..01a4c87d6587e1ff62d7e06d1ee053c2c1755cb1 100644 --- a/basice2e/gateway.yaml +++ b/basice2e/gateway-4.yaml @@ -5,7 +5,7 @@ ################################################################################ # Output log file -log: "results/gateway.log" +log: "results/gateways/gateway-4.log" verbose: "true" @@ -17,7 +17,7 @@ cMixNodes: - "localhost:50003" - "localhost:50004" # The index to which this Gateway is attached in the cMixNodes list -GatewayNodeIndex: 4 +GatewayNodeIndex: 3 # The listening address of this gateway GatewayAddress: "localhost:8443" diff --git a/basice2e/gateway-5.yaml b/basice2e/gateway-5.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bddcb768b29c2f79eebf80ffdf7c6efabdd8d26f --- /dev/null +++ b/basice2e/gateway-5.yaml @@ -0,0 +1,38 @@ +################################################################################ +## Copyright © 2018 Privategrity Corporation # +## # +## All rights reserved. # +################################################################################ + +# Output log file +log: "results/gateways/gateway-5.log" + +verbose: "true" + +# The cMix nodes in the network +cMixNodes: + - "localhost:50000" + - "localhost:50001" + - "localhost:50002" + - "localhost:50003" + - "localhost:50004" +# The index to which this Gateway is attached in the cMixNodes list +GatewayNodeIndex: 4 + +# The listening address of this gateway +GatewayAddress: "localhost:8444" + +# The number of seconds a message should remain in the globals before being +# deleted from the user's message queue +MessageTimeout: 1800 + +keyPath: "../keys/gateway.cmix.rip.key" +certPath: "../keys/gateway.cmix.rip.crt" +serverCertPath: "../keys/cmix.rip.crt" + +### Anything below this line is to be deprecated ### + +# Number of nodes in the cMix Network + +# Batch size of the cMix Network (to be deprecated) +batchSize: 4 diff --git a/basice2e/run.sh b/basice2e/run.sh index 157ef4a4af6bbd81dc17b39c65ec8d91c1dc8bde..a0f50b7da5b4c07539f07499504645e7501bded5 100755 --- a/basice2e/run.sh +++ b/basice2e/run.sh @@ -8,13 +8,14 @@ rm -fr results || true rm blob* || true SERVERLOGS=results/servers +GATEWAYLOGS=results/gateways CLIENTOUT=results/clients CHANNELOUT=results/channelbot.console DUMMYOUT=results/dummy.console UDBOUT=results/udb.console -GATEWAYOUT=results/gateway.console mkdir -p $SERVERLOGS +mkdir -p $GATEWAYLOGS mkdir -p $CLIENTOUT echo "STARTING SERVERS..." @@ -52,7 +53,7 @@ trap finish INT sleep 45 # FIXME: We should not need this, but the servers don't respond quickly # enough on boot right now. -export GATEWAY=localhost:8443 +export GATEWAY="localhost:8444,localhost:8443,localhost:8442,localhost:8441,localhost:8440" runclients() { echo "Starting clients..." CTR=0 @@ -69,7 +70,7 @@ runclients() { nid=$(((($cid + 1) % 4) + 4)) eval NICK=\${NICK${cid}} # Send a regular message - CLIENTCMD="timeout 80s ../bin/client -f blob$cid --numnodes 5 -g $GATEWAY -i $cid -d $nid -m \"Hello, $nid\"" + CLIENTCMD="timeout 80s ../bin/client -f blob$cid -g $GATEWAY -c ../keys/gateway.cmix.rip.crt -i $cid -d $nid -m \"Hello, $nid\"" eval $CLIENTCMD >> $CLIENTOUT/client$cid$nid.out 2>&1 & PIDVAL=$! eval CLIENTS${CTR}=$PIDVAL @@ -87,7 +88,7 @@ runclients() { } # Start a channelbot server -CHANNELCMD="../bin/channelbot -v -i 31 --numnodes 5 --certpath ..//keys/gateway.cmix.rip.crt -g $GATEWAY -f blobchannel" +CHANNELCMD="../bin/channelbot -v -i 31 -c ..//keys/gateway.cmix.rip.crt -g $GATEWAY -f blobchannel" $CHANNELCMD >> $CHANNELOUT 2>&1 & PIDVAL=$! echo $PIDVAL >> results/serverpids @@ -101,31 +102,43 @@ echo $PIDVAL >> results/serverpids echo "$UDBCMD -- $PIDVAL" # Start a dummy client -DUMMYCMD="../bin/client -i 35 -d 35 -g $GATEWAY --numnodes 5 -m \"dummy\" --dummyfrequency 2 --certpath ../keys/gateway.cmix.rip.crt -f blobdummy" +DUMMYCMD="../bin/client -i 35 -d 35 -g $GATEWAY -m \"dummy\" --dummyfrequency 2 -c ../keys/gateway.cmix.rip.crt -f blobdummy" $DUMMYCMD >> $DUMMYOUT 2>&1 & PIDVAL=$! echo $PIDVAL >> results/serverpids echo "$DUMMYCMD -- $PIDVAL" -# Start a gateway -GATEWAYCMD="../bin/gateway -v --config gateway.yaml" -$GATEWAYCMD >> $GATEWAYOUT 2>&1 & -PIDVAL=$! -echo $PIDVAL >> results/serverpids -echo "$GATEWAYCMD -- $PIDVAL" - -# Send a registration command -cat registration-commands.txt | while read LINE +# Start gateways +for GWID in $(seq 5 -1 1) do - CLIENTCMD="timeout 90s ../bin/client -f blob9 --numnodes 5 -g $GATEWAY -i 9 -d 3 --certpath ../keys/gateway.cmix.rip.crt -m \"$LINE\"" - eval $CLIENTCMD >> $CLIENTOUT/client9.out 2>&1 & + GATEWAYCMD="../bin/gateway -v --config gateway-$GWID.yaml" + $GATEWAYCMD > $GATEWAYLOGS/gateway-$GWID.console 2>&1 & PIDVAL=$! - echo "$CLIENTCMD -- $PIDVAL" - wait $PIDVAL + echo $PIDVAL >> results/serverpids + echo "$GATEWAYCMD -- $PIDVAL" done +# Register two users and then do UDB search on each other +CLIENTCMD="timeout 90s ../bin/client -f blob9 -g $GATEWAY -E "jake@elixxir.io" -i 9 -d 3 -c ../keys/gateway.cmix.rip.crt" +eval $CLIENTCMD >> $CLIENTOUT/client9.out 2>&1 & +PIDVAL=$! +echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL + +CLIENTCMD="timeout 90s ../bin/client -f blob18 -g $GATEWAY -E "bernardo@elixxir.io" -i 18 -d 3 -c ../keys/gateway.cmix.rip.crt -m \"SEARCH EMAIL jake@elixxir.io\"" +eval $CLIENTCMD >> $CLIENTOUT/client18.out 2>&1 & +PIDVAL=$! +echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL + +CLIENTCMD="timeout 90s ../bin/client -f blob9 -g $GATEWAY -i 9 -d 3 -c ../keys/gateway.cmix.rip.crt -m \"SEARCH EMAIL bernardo@elixxir.io\"" +eval $CLIENTCMD >> $CLIENTOUT/client9.out 2>&1 & +PIDVAL=$! +echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL + # Send a channel message that all clients will receive -CLIENTCMD="timeout 60s ../bin/client -f blob8 --numnodes 5 --certpath ../keys/gateway.cmix.rip.crt -g $GATEWAY -i 8 -d 31 -m \"Channel, Hello\"" +CLIENTCMD="timeout 60s ../bin/client -f blob8 -c ../keys/gateway.cmix.rip.crt -g $GATEWAY -i 8 -d 31 -m \"Channel, Hello\"" eval $CLIENTCMD >> $CLIENTOUT/client8.out 2>&1 & PIDVAL=$! echo "$CLIENTCMD -- $PIDVAL" @@ -148,8 +161,9 @@ diff -ruN results/channel-errors.txt noerrors.txt cat $DUMMYOUT | grep "ERROR" > results/dummy-errors.txt || true cat $DUMMYOUT | grep "FATAL" >> results/dummy-errors.txt || true diff -ruN results/dummy-errors.txt noerrors.txt -cat $GATEWAYOUT | grep "ERROR" > results/gateway-errors.txt || true -cat $GATEWAYOUT | grep "FATAL" >> results/gateway-errors.txt || true +IGNOREMSG="GetRoundBufferInfo: Error received: rpc error: code = Unknown desc = round buffer is empty" +cat $GATEWAYLOGS/*.log | grep "ERROR" | grep -v $IGNOREMSG > results/gateway-errors.txt || true +cat $GATEWAYLOGS/*.log | grep "FATAL" >> results/gateway-errors.txt || true diff -ruN results/gateway-errors.txt noerrors.txt diff --git a/basice2e/server-1.yaml b/basice2e/server-1.yaml index 389959d6683c12921f6df98db8d506c4da7af29d..1b9e5e43872c3299aa65035dd84109c49baae5f7 100644 --- a/basice2e/server-1.yaml +++ b/basice2e/server-1.yaml @@ -1,9 +1,9 @@ logPath: "results/servers/server-1.log" verbose: "false" batchSize: 4 -dbUsername: "cmix" +dbUsername: "bernardo" dbPassword: "" -dbName: "cmix_server" +dbName: "node1" dbAddresses: - "" - "" @@ -17,7 +17,8 @@ servers: - localhost:50003 - localhost:50004 gateways: - - "localhost:8443" + - "localhost:8440" keyPath: "../keys/cmix.rip.key" certPath: "../keys/cmix.rip.crt" gatewayCertPath: "../keys/gateway.cmix.rip.crt" +skipReg: "true" diff --git a/basice2e/server-2.yaml b/basice2e/server-2.yaml index 66853d5da8a42b5378a27861819c56bb7485e651..184abe100fec59bd77394e7495d6f534c07fe73f 100644 --- a/basice2e/server-2.yaml +++ b/basice2e/server-2.yaml @@ -1,9 +1,9 @@ logPath: "results/servers/server-2.log" verbose: "false" batchSize: 4 -dbUsername: "cmix" +dbUsername: "bernardo" dbPassword: "" -dbName: "cmix_server" +dbName: "node2" dbAddresses: - "" - "" @@ -17,7 +17,8 @@ servers: - localhost:50003 - localhost:50004 gateways: - - "localhost:8443" + - "localhost:8441" keyPath: "../keys/cmix.rip.key" certPath: "../keys/cmix.rip.crt" gatewayCertPath: "../keys/gateway.cmix.rip.crt" +skipReg: "true" diff --git a/basice2e/server-3.yaml b/basice2e/server-3.yaml index 5fbfbe863389c1a0e21bd16a3654d11b0076cc9f..e402126e0354adf758806a5fb95f8a29f05e3b00 100644 --- a/basice2e/server-3.yaml +++ b/basice2e/server-3.yaml @@ -1,9 +1,9 @@ logPath: "results/servers/server-3.log" verbose: "false" batchSize: 4 -dbUsername: "cmix" +dbUsername: "bernardo" dbPassword: "" -dbName: "cmix_server" +dbName: "node3" dbAddresses: - "" - "" @@ -17,7 +17,8 @@ servers: - localhost:50003 - localhost:50004 gateways: - - "localhost:8443" + - "localhost:8442" keyPath: "../keys/cmix.rip.key" certPath: "../keys/cmix.rip.crt" gatewayCertPath: "../keys/gateway.cmix.rip.crt" +skipReg: "true" diff --git a/basice2e/server-4.yaml b/basice2e/server-4.yaml index da566476b9c0184f5e01e98eac3a7fb544595e84..0a6839fbd9fc084a6465acb4e9c28c63261d818a 100644 --- a/basice2e/server-4.yaml +++ b/basice2e/server-4.yaml @@ -1,9 +1,9 @@ logPath: "results/servers/server-4.log" verbose: "false" batchSize: 4 -dbUsername: "cmix" +dbUsername: "bernardo" dbPassword: "" -dbName: "cmix_server" +dbName: "node4" dbAddresses: - "" - "" @@ -21,3 +21,4 @@ gateways: keyPath: "../keys/cmix.rip.key" certPath: "../keys/cmix.rip.crt" gatewayCertPath: "../keys/gateway.cmix.rip.crt" +skipReg: "true" diff --git a/basice2e/server-5.yaml b/basice2e/server-5.yaml index 6f263c88e2a1d42b0b1b4341532612b13a8e1e02..b587879225d22f587063282c103ce1c745b34837 100644 --- a/basice2e/server-5.yaml +++ b/basice2e/server-5.yaml @@ -1,9 +1,9 @@ logPath: "results/servers/server-5.log" verbose: "false" batchSize: 4 -dbUsername: "cmix" +dbUsername: "bernardo" dbPassword: "" -dbName: "cmix_server" +dbName: "node5" dbAddresses: - "" - "" @@ -17,7 +17,8 @@ servers: - localhost:50003 - localhost:50004 gateways: - - "localhost:8443" + - "localhost:8444" keyPath: "../keys/cmix.rip.key" certPath: "../keys/cmix.rip.crt" gatewayCertPath: "../keys/gateway.cmix.rip.crt" +skipReg: "true" diff --git a/basice2e/udb.yaml b/basice2e/udb.yaml index 67b314baebb98e3ac5dd96515be5202ff08e8d71..091e0c13205caea0db3743a8dee8bb9523f46476 100644 --- a/basice2e/udb.yaml +++ b/basice2e/udb.yaml @@ -1,6 +1,9 @@ # UDB Config for E2E Integration test logPath: "logfile.log" -numNodes: 5 gateways: + - "localhost:8444" - "localhost:8443" + - "localhost:8442" + - "localhost:8441" + - "localhost:8440" certPath: "../keys/gateway.cmix.rip.crt" diff --git a/update.sh b/update.sh index 791e482525534733970875a88249638e64ae0ce7..53d96901c5c3af6e71784b259d35b737e4535862 100755 --- a/update.sh +++ b/update.sh @@ -47,6 +47,14 @@ pushd $GOPATH/src/gitlab.com/elixxir/client-consoleUI update popd +pushd $GOPATH/src/gitlab.com/elixxir/primitives +update +popd + +pushd $GOPATH/src/gitlab.com/elixxir/registration +update +popd + pushd .. go test ./... popd