mirror of https://github.com/logos-co/wadoku.git
the subscriber will wait longer to maximise the reception
This commit is contained in:
parent
b5de96eb5c
commit
0efc295863
29
run-waku.sh
29
run-waku.sh
|
@ -24,7 +24,7 @@ loglvl="info" # log level
|
|||
duration=$2
|
||||
#iat=$3
|
||||
|
||||
sleep_time=30
|
||||
sleep_time=20
|
||||
time=""
|
||||
|
||||
unique="XYZ"
|
||||
|
@ -119,18 +119,6 @@ docker_run() {
|
|||
|
||||
#darg= "--network=host"
|
||||
|
||||
|
||||
[ -d $LPDIR ] || mkdir -p $LPDIR
|
||||
ofname="$LPDIR/$lpush.out"
|
||||
echo "docker: stopping and removing $prefix-$lpush"
|
||||
docker stop $prefix-$lpush
|
||||
docker rm $prefix-$lpush
|
||||
echo "docker: starting $prefix-$lpush"
|
||||
echo " docker run --name "$prefix-$lpush" -d=true "$prefix-$lpush:alpha" -o "$docker_op_dir/$lpush.out" -d $duration -i $iat -l $loglvl -c $ctopic"
|
||||
docker run --name "$prefix-$lpush" -d=true "$prefix-$lpush:alpha" -o "$docker_op_dir/$lpush.out" -d $duration -i $iat -l $loglvl -c $ctopic
|
||||
|
||||
#sleep $sleep_time
|
||||
|
||||
[ -d $FTDIR ] || mkdir -p $FTDIR
|
||||
ofname="$FTDIR/$filtr.out"
|
||||
echo "docker: stopping and removing $prefix-$filtr"
|
||||
|
@ -141,6 +129,17 @@ docker_run() {
|
|||
docker run --name "$prefix-$filtr" -d=true "$prefix-$filtr:alpha" -o "$docker_op_dir/$filtr.out" -d $duration -l $loglvl -i $iat -c $ctopic
|
||||
echo "$prefix-$filtr is running as $prefix-$filtr"
|
||||
|
||||
sleep $sleep_time
|
||||
|
||||
[ -d $LPDIR ] || mkdir -p $LPDIR
|
||||
ofname="$LPDIR/$lpush.out"
|
||||
echo "docker: stopping and removing $prefix-$lpush"
|
||||
docker stop $prefix-$lpush
|
||||
docker rm $prefix-$lpush
|
||||
echo "docker: starting $prefix-$lpush"
|
||||
echo " docker run --name "$prefix-$lpush" -d=true "$prefix-$lpush:alpha" -o "$docker_op_dir/$lpush.out" -d $duration -i $iat -l $loglvl -c $ctopic"
|
||||
docker run --name "$prefix-$lpush" -d=true "$prefix-$lpush:alpha" -o "$docker_op_dir/$lpush.out" -d $duration -i $iat -l $loglvl -c $ctopic
|
||||
|
||||
|
||||
# now wait for runs to complete...
|
||||
echo "$(date): Waiting for the docker run to finish in $duration"
|
||||
|
@ -183,7 +182,9 @@ kurtosis_run() {
|
|||
}" > waku/config.json
|
||||
|
||||
kurtosis run --enclave-id $enclave . '{"config":"github.com/logos-co/wadoku/waku/config.json"}' > $FTDIR/kurtosis_output.log
|
||||
sleep $sleep_time
|
||||
|
||||
sleep $sleep_time
|
||||
|
||||
filtr_suffix="$(kurtosis enclave inspect $enclave | grep $prefix-$filtr | cut -f 1 -d ' ')"
|
||||
lpush_suffix="$(kurtosis enclave inspect $enclave | grep $prefix-$lpush | cut -f 1 -d ' ')"
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ import (
|
|||
const StartPort = 60000
|
||||
const PortRange = 1000
|
||||
|
||||
const GraceWait = 10 // percentage
|
||||
const InterPubSubDelay = 25 // seconds
|
||||
const DnsDiscoveryUrl = "enrtree://AOGECG2SPND25EEFMAJ5WF3KSGJNSGV356DSTL2YVLLZWIV6SAYBM@prod.waku.nodes.status.im"
|
||||
const NameServer = "1.1.1.1"
|
||||
const LocalHost = "0.0.0.0"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"output_file": "output.out",
|
||||
"duration": "2000s",
|
||||
"duration": "1024s",
|
||||
"iat": "100ms",
|
||||
"content_topic": "2000s-100ms-2023-01-18-14h33m38s-XYZ",
|
||||
"content_topic": "1024s-100ms-2023-01-20-16h01m32s-XYZ",
|
||||
"log_level": "info",
|
||||
"log_file": "output.log"
|
||||
}
|
||||
|
|
|
@ -145,8 +145,13 @@ func main() {
|
|||
log.Error("Out of the Write loop: Message channel closed - timeout")
|
||||
stopC <- struct{}{}
|
||||
}()
|
||||
// add extra 20sec + 5% as a grace period to receive as much as possible
|
||||
filterWait := conf.Duration +
|
||||
common.InterPubSubDelay * time.Second +
|
||||
conf.Duration/100*common.GraceWait
|
||||
|
||||
<-time.After(conf.Duration)
|
||||
log.Info("Will be waiting for ", filterWait, ", excess ", common.GraceWait, "% from ", conf.Duration)
|
||||
<-time.After(filterWait)
|
||||
log.Error(conf.Duration, " elapsed, closing the " + nodeType + " node!");
|
||||
|
||||
// shut the nodes down
|
||||
|
|
|
@ -63,7 +63,7 @@ func main() {
|
|||
node.WithHostAddress(hostAddr),
|
||||
//node.WithNTP(), // don't use NTP, fails at msec granularity
|
||||
node.WithWakuRelay(),
|
||||
node.WithLightPush(),
|
||||
//node.WithLightPush(), // no need to add lightpush to be a lightpush client!
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
Loading…
Reference in New Issue