Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2934aa98e3 | ||
|
|
26617072a2 | ||
|
|
14fcd9d265 | ||
|
|
22756e9687 | ||
|
|
8f4c50f37d | ||
|
|
7a5ff1496a | ||
|
|
13fc41d9ad | ||
|
|
e76a1f12af | ||
|
|
5e40eb0d44 | ||
|
|
64eb713492 | ||
|
|
c0f621702e | ||
|
|
85187152c5 | ||
|
|
ed4e8808cf | ||
|
|
60803bafa1 | ||
|
|
92fe485576 | ||
|
|
c3a32eb86b | ||
|
|
8b683fb68c | ||
|
|
10987b66ea | ||
|
|
ce696361f3 | ||
|
|
4debf38588 | ||
|
|
ad148fa2a3 | ||
|
|
03b0c61d4c | ||
|
|
d7367a8e4e | ||
|
|
425df76652 | ||
|
|
9f7962d332 | ||
|
|
408b294b40 | ||
|
|
f0cf60e66c | ||
|
|
d1a8f5cb43 | ||
|
|
7c91351235 | ||
|
|
65a5e5e6f0 |
@@ -1,2 +1,5 @@
|
||||
nimbledeps/*
|
||||
*.exe
|
||||
stew/*
|
||||
nim-stew-master/*
|
||||
.idea/
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
[submodule "vendor/nimbus-build-system"]
|
||||
path = vendor/nimbus-build-system
|
||||
url = https://github.com/status-im/nimbus-build-system.git
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-libp2p"]
|
||||
path = vendor/nim-libp2p
|
||||
url = https://github.com/vacp2p/nim-libp2p
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-stew"]
|
||||
path = vendor/nim-stew
|
||||
url = https://github.com/status-im/nim-stew
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-results"]
|
||||
path = vendor/nim-results
|
||||
url = https://github.com/arnetheduck/nim-results
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-chronos"]
|
||||
path = vendor/nim-chronos
|
||||
url = https://github.com/status-im/nim-chronos
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-chronicles"]
|
||||
path = vendor/nim-chronicles
|
||||
url = https://github.com/status-im/nim-chronicles
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-faststreams"]
|
||||
path = vendor/nim-faststreams
|
||||
url = https://github.com/status-im/nim-faststreams
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-json-serialization"]
|
||||
path = vendor/nim-json-serialization
|
||||
url = https://github.com/status-im/nim-json-serialization
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-serialization"]
|
||||
path = vendor/nim-serialization
|
||||
url = https://github.com/status-im/nim-serialization
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-metrics"]
|
||||
path = vendor/nim-metrics
|
||||
url = https://github.com/status-im/nim-metrics
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nimcrypto"]
|
||||
path = vendor/nimcrypto
|
||||
url = https://github.com/status-im/nimcrypto
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-bearssl"]
|
||||
path = vendor/nim-bearssl
|
||||
url = https://github.com/status-im/nim-bearssl
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-secp256k1"]
|
||||
path = vendor/nim-secp256k1
|
||||
url = https://github.com/status-im/nim-secp256k1
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "vendor/nim-http-utils"]
|
||||
path = vendor/nim-http-utils
|
||||
url = https://github.com/status-im/nim-http-utils
|
||||
branch = master
|
||||
ignore = dirty
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
# BUILD NIM APP ----------------------------------------------------------------
|
||||
FROM rust:1.77.1-alpine3.18 AS nim-build
|
||||
|
||||
ARG NIMFLAGS
|
||||
ARG MAKE_TARGET
|
||||
ARG NIM_COMMIT
|
||||
|
||||
# Get build tools and required header files
|
||||
RUN apk add --no-cache bash git build-base pcre-dev linux-headers curl jq
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
# workaround for alpine issue: https://github.com/alpinelinux/docker-alpine/issues/383
|
||||
RUN apk update && apk upgrade
|
||||
|
||||
# Ran separately from 'make' to avoid re-doing
|
||||
RUN git submodule update --init --recursive
|
||||
|
||||
# Slowest build step for the sake of caching layers
|
||||
RUN make -j$(nproc) deps QUICK_AND_DIRTY_COMPILER=1
|
||||
|
||||
# Build the final node binary
|
||||
RUN make -j$(nproc) $MAKE_TARGET NIMFLAGS="${NIMFLAGS}"
|
||||
|
||||
# PRODUCTION IMAGE -------------------------------------------------------------
|
||||
|
||||
FROM alpine:3.18 as prod
|
||||
|
||||
LABEL maintainer="asoutullo@status.im"
|
||||
LABEL source="https://github.com/vacp2p/dst-gossipsub-test-node/tree/dockerized"
|
||||
|
||||
# LibP2P, Metrics ports
|
||||
EXPOSE 5000 8008
|
||||
|
||||
# Referenced in the binary
|
||||
RUN apk add --no-cache busybox-suid \
|
||||
&& apk add --no-cache --update busybox-extras \
|
||||
&& apk add --no-cache bash
|
||||
|
||||
# Copy to separate location to accomodate different MAKE_TARGET values
|
||||
COPY --from=nim-build /app/build/main /node/main
|
||||
|
||||
WORKDIR /node
|
||||
|
||||
COPY cron_runner.sh .
|
||||
|
||||
RUN chmod +x /node/main
|
||||
RUN chmod +x cron_runner.sh
|
||||
|
||||
ENTRYPOINT ["./cron_runner.sh"]
|
||||
@@ -0,0 +1,68 @@
|
||||
# Copyright (c) 2022 Status Research & Development GmbH. Licensed under
|
||||
# either of:
|
||||
# - Apache License, version 2.0
|
||||
# - MIT license
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
||||
|
||||
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
|
||||
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
||||
|
||||
ifeq ($(NIM_PARAMS),)
|
||||
# "variables.mk" was not included, so we update the submodules.
|
||||
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
|
||||
.DEFAULT:
|
||||
+@ echo -e "Git submodules not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
|
||||
$(GIT_SUBMODULE_UPDATE); \
|
||||
echo
|
||||
# Now that the included *.mk files appeared, and are newer than this file, Make will restart itself:
|
||||
# https://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles
|
||||
#
|
||||
# After restarting, it will execute its original goal, so we don't have to start a child Make here
|
||||
# with "$(MAKE) $(MAKECMDGOALS)". Isn't hidden control flow great?
|
||||
|
||||
else # "variables.mk" was included. Business as usual until the end of this file.
|
||||
|
||||
# must be included after the default target
|
||||
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
|
||||
|
||||
.PHONY: deps dstnode
|
||||
|
||||
dstnode.nims:
|
||||
ln -s dstnode.nimble $@
|
||||
|
||||
update: | update-common
|
||||
rm -rf dstnode.nims && \
|
||||
$(MAKE) dstnode.nims $(HANDLE_OUTPUT)
|
||||
|
||||
deps: | deps-common dstnode.nims
|
||||
|
||||
dstnode: | build deps
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
$(ENV_SCRIPT) nim dstnode $(NIM_PARAMS) dstnode.nims
|
||||
|
||||
clean: | clean-common
|
||||
rm -rf build/dstnode
|
||||
|
||||
#####################
|
||||
## Container image ##
|
||||
#####################
|
||||
# -d:insecure - Necessary to enable Prometheus HTTP endpoint for metrics
|
||||
# -d:chronicles_colors:none - Necessary to disable colors in logs for Docker
|
||||
DOCKER_IMAGE_NIMFLAGS := -d:chronicles_colors:none -d:insecure --threads:on -d:metrics -d:libp2p_network_protocols_metrics -d:release
|
||||
# build a docker image
|
||||
docker-image: MAKE_TARGET ?= dstnode
|
||||
docker-image: DOCKER_IMAGE_TAG ?= soutullostatus/dst-test-node:v1.2
|
||||
docker-image:
|
||||
docker build \
|
||||
--build-arg="MAKE_TARGET=$(MAKE_TARGET)" \
|
||||
--build-arg="NIMFLAGS=$(DOCKER_IMAGE_NIMFLAGS)" \
|
||||
--target prod \
|
||||
--tag $(DOCKER_IMAGE_TAG) . \
|
||||
--progress=plain
|
||||
|
||||
docker-push:
|
||||
docker push $(DOCKER_IMAGE_TAG)
|
||||
|
||||
endif
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2018-2020 Status Research & Development GmbH. Licensed under
|
||||
# either of:
|
||||
# - Apache License, version 2.0
|
||||
# - MIT license
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
[ -z "$1" -o `echo "$1" | tr '/' '\n' | wc -l` != 2 ] && \
|
||||
{ echo "Usage: `basename $0` some/repo [destdir] # 'destdir' defaults to 'vendor/repo'"; exit 1; }
|
||||
REPO="$1"
|
||||
|
||||
DEST="vendor/${REPO#*/}"
|
||||
[ -n "$2" ] && DEST="$2"
|
||||
|
||||
git submodule add --force https://github.com/${REPO}.git "$DEST"
|
||||
git config -f .gitmodules submodule.${DEST}.ignore untracked
|
||||
git config -f .gitmodules submodule.${DEST}.branch master
|
||||
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 <minutes> <hours>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
minutes="$1"
|
||||
hours="$2"
|
||||
|
||||
cron_expression="$minutes $hours * * *"
|
||||
|
||||
cron_job_file="/etc/cron.d/my-cron-job"
|
||||
mkdir -p /etc/cron.d
|
||||
|
||||
echo -e "$cron_expression /node/main > /proc/1/fd/1 2>&1 \n" > "$cron_job_file"
|
||||
|
||||
echo "Cron job file created at $cron_job_file"
|
||||
|
||||
env >> /etc/environment
|
||||
|
||||
crontab /etc/cron.d/my-cron-job
|
||||
|
||||
crond -f
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
mode = ScriptMode.Verbose
|
||||
|
||||
### Package
|
||||
version = "0.1.0"
|
||||
author = "Distributed Systems Testing"
|
||||
description = "DstNode - Libp2p version: V1.2 (c4da9be32cc01efa2de066c396fe9ef1c7769aa1)"
|
||||
license = "MIT or Apache License 2.0"
|
||||
#bin = @["build/waku"]
|
||||
|
||||
### Dependencies
|
||||
requires "nim >= 1.6.0",
|
||||
"libp2p",
|
||||
"stew",
|
||||
"chronos",
|
||||
"chronicles"
|
||||
|
||||
|
||||
### Helper functions
|
||||
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
|
||||
if not dirExists "build":
|
||||
mkDir "build"
|
||||
# allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims"
|
||||
var extra_params = params
|
||||
for i in 2..<paramCount():
|
||||
extra_params &= " " & paramStr(i)
|
||||
exec "nim " & lang & " --out:build/" & name & " " & extra_params & " " & srcDir & name & ".nim"
|
||||
|
||||
### DstNode tasks
|
||||
task dstnode, "Build DstNode":
|
||||
let name = "main"
|
||||
buildBinary name
|
||||
+80
-37
@@ -2,7 +2,7 @@ import stew/endians2, stew/byteutils, tables, strutils, os
|
||||
import libp2p, libp2p/protocols/pubsub/rpc/messages
|
||||
import libp2p/muxers/mplex/lpchannel, libp2p/protocols/ping
|
||||
import chronos
|
||||
import sequtils, hashes, math, metrics
|
||||
import sequtils, hashes, math, metrics, metrics/chronos_httpserver
|
||||
from times import getTime, toUnix, fromUnix, `-`, initTime, `$`, inMilliseconds
|
||||
from nativesockets import getHostname
|
||||
|
||||
@@ -11,20 +11,44 @@ const chunks = 1
|
||||
proc msgIdProvider(m: Message): Result[MessageId, ValidationResult] =
|
||||
return ok(($m.data.hash).toBytes())
|
||||
|
||||
proc startMetricsServer(
|
||||
serverIp: IpAddress, serverPort: Port
|
||||
): Result[MetricsHttpServerRef, string] =
|
||||
info "Starting metrics HTTP server", serverIp = $serverIp, serverPort = $serverPort
|
||||
|
||||
let metricsServerRes = MetricsHttpServerRef.new($serverIp, serverPort)
|
||||
if metricsServerRes.isErr():
|
||||
return err("metrics HTTP server start failed: " & $metricsServerRes.error)
|
||||
|
||||
let server = metricsServerRes.value
|
||||
try:
|
||||
waitFor server.start()
|
||||
except CatchableError:
|
||||
return err("metrics HTTP server start failed: " & getCurrentExceptionMsg())
|
||||
|
||||
info "Metrics HTTP server started", serverIp = $serverIp, serverPort = $serverPort
|
||||
ok(metricsServerRes.value)
|
||||
|
||||
proc main {.async.} =
|
||||
let
|
||||
hostname = getHostname()
|
||||
myId = parseInt(hostname[4..^1])
|
||||
myId = parseInt(getEnv("PEERNUMBER"))
|
||||
msg_rate = parseInt(getEnv("MSGRATE"))
|
||||
msg_size = parseInt(getEnv("MSGSIZE"))
|
||||
|
||||
#publisherCount = client.param(int, "publisher_count")
|
||||
publisherCount = 10
|
||||
publisherCount = parseInt(getEnv("PEERS"))
|
||||
isPublisher = myId <= publisherCount
|
||||
#isAttacker = (not isPublisher) and myId - publisherCount <= client.param(int, "attacker_count")
|
||||
isAttacker = false
|
||||
rng = libp2p.newRng()
|
||||
#randCountry = rng.rand(distribCumSummed[^1])
|
||||
#country = distribCumSummed.find(distribCumSummed.filterIt(it >= randCountry)[0])
|
||||
echo "Hostname: ", hostname
|
||||
let
|
||||
address = initTAddress("0.0.0.0:5000")
|
||||
myport = 5000 + parseInt(getEnv("PEERNUMBER"))
|
||||
myaddress = "0.0.0.0:" & $myport
|
||||
address = initTAddress(myaddress)
|
||||
switch =
|
||||
SwitchBuilder
|
||||
.new()
|
||||
@@ -32,7 +56,7 @@ proc main {.async.} =
|
||||
.withRng(rng)
|
||||
#.withYamux()
|
||||
.withMplex()
|
||||
.withMaxConnections(10000)
|
||||
.withMaxConnections(250)
|
||||
.withTcpTransport(flags = {ServerFlags.TcpNoDelay})
|
||||
#.withPlainText()
|
||||
.withNoise()
|
||||
@@ -45,16 +69,20 @@ proc main {.async.} =
|
||||
anonymize = true,
|
||||
)
|
||||
pingProtocol = Ping.new(rng=rng)
|
||||
gossipSub.parameters.floodPublish = false
|
||||
# Metrics
|
||||
echo "Starting metrics HTTP server"
|
||||
let metricsServer = startMetricsServer(parseIpAddress("0.0.0.0"), Port(8008))
|
||||
|
||||
gossipSub.parameters.floodPublish = true
|
||||
#gossipSub.parameters.lazyPushThreshold = 1_000_000_000
|
||||
#gossipSub.parameters.lazyPushThreshold = 0
|
||||
gossipSub.parameters.opportunisticGraftThreshold = -10000
|
||||
gossipSub.parameters.heartbeatInterval = 700.milliseconds
|
||||
gossipSub.parameters.pruneBackoff = 3.seconds
|
||||
gossipSub.parameters.gossipFactor = 0.05
|
||||
gossipSub.parameters.d = 8
|
||||
gossipSub.parameters.dLow = 6
|
||||
gossipSub.parameters.dHigh = 12
|
||||
gossipSub.parameters.heartbeatInterval = 1.seconds
|
||||
gossipSub.parameters.pruneBackoff = 60.seconds
|
||||
gossipSub.parameters.gossipFactor = 0.25
|
||||
gossipSub.parameters.d = 6
|
||||
gossipSub.parameters.dLow = 4
|
||||
gossipSub.parameters.dHigh = 8
|
||||
gossipSub.parameters.dScore = 6
|
||||
gossipSub.parameters.dOut = 6 div 2
|
||||
gossipSub.parameters.dLazy = 6
|
||||
@@ -96,14 +124,12 @@ proc main {.async.} =
|
||||
switch.mount(gossipSub)
|
||||
switch.mount(pingProtocol)
|
||||
await switch.start()
|
||||
#TODO
|
||||
#defer: await switch.stop()
|
||||
|
||||
echo "Listening on ", switch.peerInfo.addrs
|
||||
echo myId, ", ", isPublisher, ", ", switch.peerInfo.peerId
|
||||
|
||||
var peersInfo = toSeq(1..parseInt(getEnv("PEERS")))
|
||||
rng.shuffle(peersInfo)
|
||||
echo "Waiting 60 seconds for node building..."
|
||||
await sleepAsync(60.seconds)
|
||||
|
||||
proc pinger(peerId: PeerId) {.async.} =
|
||||
try:
|
||||
@@ -120,41 +146,58 @@ proc main {.async.} =
|
||||
|
||||
let connectTo = parseInt(getEnv("CONNECTTO"))
|
||||
var connected = 0
|
||||
for peerInfo in peersInfo:
|
||||
if connected >= connectTo: break
|
||||
let tAddress = "peer" & $peerInfo & ":5000"
|
||||
echo tAddress
|
||||
let addrs = resolveTAddress(tAddress).mapIt(MultiAddress.init(it).tryGet())
|
||||
let tAddress = "nimp2p-service:5000"
|
||||
var addrs: seq[MultiAddress]
|
||||
|
||||
echo "Trying to resolve ", tAddress
|
||||
while true:
|
||||
try:
|
||||
let peerId = await switch.connect(addrs[0], allowUnknownPeerId=true).wait(5.seconds)
|
||||
#asyncSpawn pinger(peerId)
|
||||
connected.inc()
|
||||
addrs = resolveTAddress(tAddress).mapIt(MultiAddress.init(it).tryGet())
|
||||
echo tAddress, " resolved: ", addrs
|
||||
break # Break out of the loop on successful resolution
|
||||
except CatchableError as exc:
|
||||
echo "Failed to dial", exc.msg
|
||||
echo "Failed to resolve address:", exc.msg
|
||||
echo "Waiting 15 seconds..."
|
||||
await sleepAsync(15.seconds)
|
||||
|
||||
rng.shuffle(addrs)
|
||||
var index = 0
|
||||
while true:
|
||||
if connected >= connectTo: break
|
||||
while true:
|
||||
try:
|
||||
echo "Trying to connect to ", addrs[index]
|
||||
let peerId = await switch.connect(addrs[index], allowUnknownPeerId=true).wait(5.seconds)
|
||||
#asyncSpawn pinger(peerId)
|
||||
connected.inc()
|
||||
index.inc()
|
||||
echo "Connected!"
|
||||
break
|
||||
except CatchableError as exc:
|
||||
echo "Failed to dial", exc.msg
|
||||
echo "Waiting 15 seconds..."
|
||||
await sleepAsync(15.seconds)
|
||||
|
||||
#let
|
||||
# maxMessageDelay = client.param(int, "max_message_delay")
|
||||
# warmupMessages = client.param(int, "warmup_messages")
|
||||
#startOfTest = Moment.now() + milliseconds(warmupMessages * maxMessageDelay div 2)
|
||||
|
||||
await sleepAsync(10.seconds)
|
||||
echo "Mesh size: ", gossipSub.mesh.getOrDefault("test").len
|
||||
|
||||
for msg in 0 ..< 10:#client.param(int, "message_count"):
|
||||
await sleepAsync(12.seconds)
|
||||
if msg mod publisherCount == myId - 1:
|
||||
#if myId == 1:
|
||||
let turnToPublish = parseInt(getHostname()[4..^1])
|
||||
echo "Publishing turn is: ", turnToPublish
|
||||
for msg in 0 ..< 10000:#client.param(int, "message_count"):
|
||||
await sleepAsync(msg_rate)
|
||||
if msg mod publisherCount == turnToPublish:
|
||||
echo "Sending message at: " ,times.getTime()
|
||||
let
|
||||
now = getTime()
|
||||
nowInt = seconds(now.toUnix()) + nanoseconds(times.nanosecond(now))
|
||||
#var nowBytes = @(toBytesLE(uint64(nowInt.nanoseconds))) & newSeq[byte](500_000 div chunks)
|
||||
var nowBytes = @(toBytesLE(uint64(nowInt.nanoseconds))) & newSeq[byte](50)
|
||||
#echo "sending ", uint64(nowInt.nanoseconds)
|
||||
for chunk in 0..<chunks:
|
||||
nowBytes[10] = byte(chunk)
|
||||
doAssert((await gossipSub.publish("test", nowBytes)) > 0)
|
||||
var nowBytes = @(toBytesLE(uint64(nowInt.nanoseconds))) & newSeq[byte](msg_size)
|
||||
doAssert((await gossipSub.publish("test", nowBytes)) > 0)
|
||||
|
||||
#echo "BW: ", libp2p_protocols_bytes.value(labelValues=["/meshsub/1.1.0", "in"]) + libp2p_protocols_bytes.value(labelValues=["/meshsub/1.1.0", "out"])
|
||||
#echo "DUPS: ", libp2p_gossipsub_duplicate.value(), " / ", libp2p_gossipsub_received.value()
|
||||
|
||||
waitFor(main())
|
||||
waitFor(main())
|
||||
@@ -0,0 +1,3 @@
|
||||
--noNimblePath
|
||||
--path:"/mnt/d/Projects/status/dst-gossipsub-test-node/vendor/nimbus-build-system"
|
||||
--path:"/mnt/d/Projects/status/dst-gossipsub-test-node/vendor/nim-libp2p"
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
custom_network_name="my_custom_network"
|
||||
num_peers=10
|
||||
|
||||
if ! docker network inspect "$custom_network_name" >/dev/null 2>&1; then
|
||||
docker network create "$custom_network_name"
|
||||
docker network create --attachable --driver bridge "$custom_network_name"
|
||||
fi
|
||||
|
||||
for ((i = 0; i < num_peers; i++)); do
|
||||
# Construct the hostname (e.g., peer1, peer2, ...)
|
||||
hostname="pod-$i"
|
||||
|
||||
# Run the Docker container with the current hostname
|
||||
docker run -e PEERSPERPOD="1" -e PEERS="10" -e CONNECTTO="5" -e MSGRATE="1000" -e MSGSIZE="1000" -e PEERNUMBER="0" --hostname="$hostname" --network="$custom_network_name" dst-test-node &
|
||||
|
||||
done
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
nim c -d:chronicles_colors=None --threads:on -d:metrics -d:libp2p_network_protocols_metrics -d:release main
|
||||
rm -rf shadow.data/
|
||||
shadow shadow.yaml
|
||||
grep -rne 'milliseconds\|BW' shadow.data/ > latencies
|
||||
-5033
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
mode = ScriptMode.Verbose
|
||||
|
||||
packageName = "test_node"
|
||||
version = "0.1.0"
|
||||
author = "Status Research & Development GmbH"
|
||||
description = "A test node for gossipsub"
|
||||
license = "MIT"
|
||||
skipDirs = @[]
|
||||
|
||||
requires "nim >= 1.6.0",
|
||||
"libp2p",
|
||||
"ggplotnim"
|
||||
+1
Submodule vendor/nim-bearssl added at d81b37dc20
+1
Submodule vendor/nim-chronicles added at 33761a5f77
+1
Submodule vendor/nim-chronos added at 8a306763ce
+1
Submodule vendor/nim-faststreams added at 11b9d952a8
+1
Submodule vendor/nim-http-utils added at be57dbc902
+1
Submodule vendor/nim-json-serialization added at 4d0b0662ed
+1
Submodule vendor/nim-libp2p added at c4da9be32c
+1
Submodule vendor/nim-metrics added at 2e29df0950
+1
Submodule vendor/nim-results added at e2adf66b8b
+1
Submodule vendor/nim-secp256k1 added at 194b715b16
+1
Submodule vendor/nim-serialization added at afae13adac
+1
Submodule vendor/nim-stew added at 104132fd02
+1
Submodule vendor/nimbus-build-system added at a15dc546a0
+1
Submodule vendor/nimcrypto added at 24e006df85
Reference in New Issue
Block a user