Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e8ae567
as_ref in aleph-client for Connection types
fixxxedpoint Dec 15, 2022
528f9aa
rust API for synthetic-network's json API
fixxxedpoint Dec 14, 2022
5a98f81
refactored synthetic-link
fixxxedpoint Dec 15, 2022
9d20ad0
new e2e-tests: high out-latency
fixxxedpoint Dec 15, 2022
2bf7a6e
refactored synthetic-network bash scripts
fixxxedpoint Dec 15, 2022
8a259e0
added git submodule for synthetic-network
fixxxedpoint Dec 15, 2022
0093386
added nightly e2e test for synthetic-network
fixxxedpoint Dec 15, 2022
32eb26d
refactored synthetic-link library
fixxxedpoint Dec 15, 2022
fc1a3f0
added load_config for synthetic-network e2e test
fixxxedpoint Dec 15, 2022
64234ae
more refactoring of synthetic-link
fixxxedpoint Dec 15, 2022
75434a5
missing synthetic-link in Cargo.toml
fixxxedpoint Dec 16, 2022
415faf0
e2e-tests/config.rs cleaned
fixxxedpoint Dec 16, 2022
1ac0792
Into -> From in synthetic-link
fixxxedpoint Dec 16, 2022
55f6f14
slightly cleaned code for synthetic-network
fixxxedpoint Dec 16, 2022
26d1e53
added RUST_SRC_PATH in shell.nix for better support for IDEs
fixxxedpoint Dec 16, 2022
08269ca
slightly cleaned synthetic-link
fixxxedpoint Dec 17, 2022
59461bb
refactored synthetic-link: more types for ranged parameters
fixxxedpoint Dec 17, 2022
7bccc5d
refactored synthetic-link lib
fixxxedpoint Dec 18, 2022
5eaaaf3
added code-docs to synthetic-link
fixxxedpoint Dec 18, 2022
86b0399
using try_from for PortRange in synthetic-lib for input validation
fixxxedpoint Dec 19, 2022
0282568
Merge remote-tracking branch 'origin/main' into network_tests.synthet…
fixxxedpoint Dec 30, 2022
95a7c33
Merge remote-tracking branch 'origin/main' into network_tests.synthet…
fixxxedpoint Jan 2, 2023
31c8cf5
missing deps after merge for synthetic-network
fixxxedpoint Jan 2, 2023
10739fc
Merge remote-tracking branch 'origin/main' into network_tests.synthet…
fixxxedpoint Jan 3, 2023
8eb1410
REVERT ME testing nightly pipeline
fixxxedpoint Jan 3, 2023
98499c2
fix after merge
fixxxedpoint Jan 3, 2023
b991f75
say no to install-protoc in github pipelines
fixxxedpoint Jan 3, 2023
b2a6a9d
Revert "say no to install-protoc in github pipelines"
fixxxedpoint Jan 3, 2023
a0f76fb
GITHUB_TOKEN for "Install Protoc" action
fixxxedpoint Jan 3, 2023
01d7b68
reverted changed file permissions
fixxxedpoint Jan 3, 2023
61e2f79
reverted rust-toolchain file
fixxxedpoint Jan 3, 2023
ca97e85
typo in description for PortRange
fixxxedpoint Jan 3, 2023
03aa36e
e2e-tests: config.validator_names() uses validators_count
fixxxedpoint Jan 3, 2023
d879c86
e2e-tests: added description for the `latency` tests
fixxxedpoint Jan 3, 2023
9a8e405
shell.nix: added description for new ENV var RUST_SRC_PATH - it's for…
fixxxedpoint Jan 3, 2023
f4a646b
BACKUP: e2e-tests/config.rs with iterators
fixxxedpoint Jan 4, 2023
36287c9
new verion of the synthetic-network e2e-test that supports non-docker…
fixxxedpoint Jan 4, 2023
a899970
Merge remote-tracking branch 'origin/main' into network_tests.synthet…
fixxxedpoint Jan 4, 2023
fbd4c4d
fix for e2e-test `no_quorum_without_high_latency` - missing call for …
fixxxedpoint Jan 4, 2023
4c0a55a
extended README.md for the synthetic-network: how to run e2e-tests wi…
fixxxedpoint Jan 4, 2023
93eeb03
renamed e2e-tests for high-out-latency with synthetic-network
fixxxedpoint Jan 4, 2023
656af60
renamed one of the e2e-tests pipelines in nightly for high-latency (s…
fixxxedpoint Jan 4, 2023
f79bdb0
Revert "REVERT ME testing nightly pipeline"
fixxxedpoint Jan 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactored synthetic-network bash scripts
  • Loading branch information
fixxxedpoint committed Dec 16, 2022
commit 2bf7a6ed32452b2770f30ff117fe34f8beb4321c
22 changes: 6 additions & 16 deletions scripts/synthetic-network/build_synthetic-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,17 @@ set -euo pipefail

source ./scripts/common.sh

GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5}
UPDATE=${UPDATE:-true}

TMPDIR="$(dirname $0)/vendor"
mkdir -p $TMPDIR
log "created a temporary folder at $TMPDIR"
if [[ "$UPDATE" = true ]]; then
git submodule init
git submodule update
fi

pushd .

log "cloning synthetic-network's git repo"
cd $TMPDIR
if [[ ! -d ./synthetic-network ]]; then
git clone https://github.com/daily-co/synthetic-network.git
fi
cd synthetic-network
git fetch origin
git checkout $GIT_COMMIT
cd scripts/synthetic-network/vendor/synthetic-network

log "building base docker image for synthetic-network with support for synthetic-network"
log "patching synthetic network"
# aleph-node crashes since it uses newer glibc than this image
sed -i 's/FROM node:12.20.2/FROM node:19.2/' Dockerfile
docker build -t syntheticnet .

popd
Expand Down
24 changes: 14 additions & 10 deletions scripts/synthetic-network/run_consensus_synthetic-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ Usage:
IMPORTANT: this script requires aleph-node:latest docker image.
--no-build-image
skip docker image build
--commit 72bbb4fde915e4132c19cd7ce3605364abac58a5
commit hash used to build synthetic-network, default is 72bbb4fde915e4132c19cd7ce3605364abac58a5
--no-update
skip git-submodule update for the synthetic-network repository
EOF
exit 0
}

function build_test_image() {
local commit=$1
local path=$2
local path=$1

GIT_COMMIT=$commit ${path}/build_synthetic-network.sh
${path}/build_synthetic-network.sh
}

while [[ $# -gt 0 ]]; do
Expand All @@ -34,9 +33,9 @@ while [[ $# -gt 0 ]]; do
BUILD_IMAGE=false
shift
;;
--commit)
GIT_COMMIT="$2"
shift;shift
--no-update)
UPDATE=false
shift
;;
--help)
usage
Expand All @@ -49,12 +48,17 @@ while [[ $# -gt 0 ]]; do
done

BUILD_IMAGE=${BUILD_IMAGE:-true}
GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5}
UPDATE=${UPDATE:-true}

if [[ "$UPDATE" = true ]]; then
git submodule init
git submodule update
fi

if [[ "$BUILD_IMAGE" = true ]]; then
log "building custom docker image for synthetic-network tests"
path=$(dirname $0)
build_test_image $GIT_COMMIT $path
build_test_image $path
fi

log "running synthetic-network"
Expand Down
31 changes: 12 additions & 19 deletions scripts/synthetic-network/run_script_for_synthetic-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ Usage:
IMPORTANT: first you need to call 'scripts/run_consensus_synthetic-network.sh' and let it run in background.
It spawns docker-compose configured with synthetic-network.
It requires node.js to run.
--commit 72bbb4fde915e4132c19cd7ce3605364abac58a5
commit hash used to build synthetic-network, default is 72bbb4fde915e4132c19cd7ce3605364abac58a5
--script-path scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js
path to a synthetic-network scrypt. Default is a demo scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js
from the synthetic-network repo. Please consult synthetic-network repo for details: https://github.com/daily-co/synthetic-network
--no-update
skip git-submodule update for the synthetic-network repository
EOF
exit 0
}

while [[ $# -gt 0 ]]; do
case $1 in
--commit)
GIT_COMMIT="$2"
shift;shift
;;
--script-path)
SCRIPT_PATH="$2"
shift;shift
;;
--no-update)
UPDATE=false
shift
;;
--help)
usage
shift
Expand All @@ -41,23 +41,16 @@ while [[ $# -gt 0 ]]; do
esac
done

GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5}
SCRIPT_PATH=${SCRIPT_PATH:-scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js}
SCRIPT_PATH=$(realpath $SCRIPT_PATH)
UPDATE=${UPDATE:-true}

TMPDIR="$(dirname $0)/vendor"
mkdir -p $TMPDIR
log "created a temporary folder at $TMPDIR"

log "cloning synthetic-network's git repo"
cd $TMPDIR
if [[ ! -d ./synthetic-network ]]; then
git clone https://github.com/daily-co/synthetic-network.git
if [[ "$UPDATE" = true ]]; then
git submodule init
git submodule update
fi
cd synthetic-network
git fetch origin
git checkout $GIT_COMMIT
cd frontend

cd synthetic-network/frontend

log "running .js script"
node $SCRIPT_PATH ${@:1}
Expand Down