Skip to content

Commit

Permalink
Merge branch 'cudos-dev' into cudos-master
Browse files Browse the repository at this point in the history
  • Loading branch information
kstoykov committed Apr 21, 2022
2 parents 8543fbe + bd29e8b commit d60b370
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@
"type": "shell",
"group": "build"
},
//TENDERMINT load test
{
"label": "Run TENDERMINT LOAD TEST LOCAL in docker",
"command": "cd ./docker/tendermint-load-tester && docker-compose --env-file ./tendermint-load-tester.local.arg -f ./tendermint-load-tester.yml -p tendermint-load-tester up --build",
"type": "shell",
"group": "build"
},
{
"label": "Run TENDERMINT LOAD TEST PRIVATE in docker",
"command": "cd ./docker/tendermint-load-tester && docker-compose --env-file ./tendermint-load-tester.private.arg -f ./tendermint-load-tester.yml -p tendermint-load-tester up --build",
"type": "shell",
"group": "build"
},
{
"label": "Run TENDERMINT LOAD TEST PUBLIC in docker",
"command": "cd ./docker/tendermint-load-tester && docker-compose --env-file ./tendermint-load-tester.public.arg -f ./tendermint-load-tester.yml -p tendermint-load-tester up --build",
"type": "shell",
"group": "build"
},
//hermes-ibc-relayer
{
"label": "Build HERMES-IBC-RELAYER BINARY BUILDER in docker",
Expand Down
25 changes: 25 additions & 0 deletions docker/tendermint-load-tester/tendermint-load-tester.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM golang:buster

ARG USER_ID
ARG USER_NAME
ARG GROUP_ID
ARG GROUP_NAME
ARG TESTER_HOME

RUN if [ $USER_NAME != 'root' ]; then \
addgroup -gid ${GROUP_ID} $GROUP_NAME; \
adduser --disabled-password -gecos "" -uid ${USER_ID} -gid ${GROUP_ID} ${USER_NAME}; \
fi

WORKDIR ${TESTER_HOME}

RUN apt-get update

RUN git clone https://github.com/informalsystems/tm-load-test.git TendermintLoadTester && \
cd TendermintLoadTester && \
git checkout v1.0.0 && \
make

CMD ["/bin/bash", "-c", "./TendermintLoadTester/build/tm-load-test -c ${CONNECTIONS} -T ${DURATION} -r ${TX_RATE} -s ${TX_SIZE} \
--endpoints ${ENDPOINTS} \
--stats-output ${TESTER_HOME}/stats.csv"];
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ENDPOINTS="ws://tm-endpoint1.somewhere.com:26657/websocket,ws://tm-endpoint2.somewhere.com:26657/websocket"
CONNECTIONS=1
DURATION=10
TX_RATE=1000
TX_SIZE=250
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TESTER_HOME=/usr/tendermint
ENV_FILE=./tendermint-load-tester.local.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TESTER_HOME=/usr/tendermint
ENV_FILE=./tendermint-load-tester.private.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TESTER_HOME=/usr/tendermint
ENV_FILE=./tendermint-load-tester.public.env
22 changes: 22 additions & 0 deletions docker/tendermint-load-tester/tendermint-load-tester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3.1'

networks:
shared-cudos-network:
name: shared-cudos-network

services:
tendermint-load-tester:
image: tendermint-load-tester
container_name: tendermint-load-tester
build:
dockerfile: CudosBuilders/docker/tendermint-load-tester/tendermint-load-tester.dockerfile
context: ../../../
args:
USER_ID: "0"
USER_NAME: "root"
GROUP_ID: "0"
GROUP_NAME: "root"
TESTER_HOME: "$TESTER_HOME"
env_file: "$ENV_FILE"
networks:
- shared-cudos-network
3 changes: 3 additions & 0 deletions tools-bash/updater/src/versions/genesis-0.5-0.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ if [ "$NETWORK_DRESSREHEARSAL" = "true" ]; then
result=$(jq ".chain_id = \"cudos-dressrehearsal-2\"" "$WORKING_MIGRATE_DIR/genesis.tmp.json")
echo $result > "$WORKING_MIGRATE_DIR/genesis.tmp.json"

distributionAddress=$(getModuleAddress "$WORKING_MIGRATE_DIR/genesis.tmp.json" "distribution")
setAccountBalanceInAcudosWithoutAuthAccount "$WORKING_MIGRATE_DIR/genesis.tmp.json" "$distributionAddress" "18308656328740320386054741"

setAccountBalanceInCudosAdmin "$WORKING_MIGRATE_DIR/genesis.tmp.json" "cudos19m4ez024zrquym4vsku7gj4z78mdhazera5q2s" "1"

encodedDenoms=$(jq -r ".app_state.bank.supply[].denom | @base64" "$WORKING_MIGRATE_DIR/genesis.tmp.json");
Expand Down

0 comments on commit d60b370

Please sign in to comment.