Skip to content

Commit

Permalink
Align v3-parity with develop branch (#971)
Browse files Browse the repository at this point in the history
* Epikichi/edge 964 implement multiple erc mode support (#954)

* adding support for ERC20 and ERC721 mode for Pandora's Box stress testing

* adding in default for devnet ephemeral anticipation

* fixing markdown format

* reverting for a separate PR

* introducing workflow dispatch trigger for Devnet V3 workflow. (#927)

* introducing workflow dispatch trigger for Devnet V3 workflow.

* adding ephemeral environment naming

* adding pandora modes

* Add performance tests to devnet deployments (#918)

* added performance tests to devnet deployment
* removing depricated loadbot performance tests

* Docker setup: Wait for genesis file to exist before starting nodes (#949)

* Docker setup: Wait for genesis file to exist before starting nodes

* Docker setup: don't run init if genesis file already exists

* adding conditional dependency for compose to wait for successful  node

Co-authored-by: epikichi <ji@epik.dev>

Co-authored-by: Epikichi <78609649+epikichi@users.noreply.github.com>
Co-authored-by: ZeljkoBenovic <47507986+ZeljkoBenovic@users.noreply.github.com>
Co-authored-by: mediremi-antithesis <107197847+mediremi-antithesis@users.noreply.github.com>
Co-authored-by: epikichi <ji@epik.dev>
  • Loading branch information
5 people committed Nov 28, 2022
1 parent b8ecb2b commit 1e4a66a
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 22 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.devnet.yml
Expand Up @@ -169,3 +169,46 @@ jobs:
}
]
}
pandoras_box_eoa:
uses: ./.github/workflows/pandoras_box.yml
name: Pandora's Box EOA
needs: deploy_devnet
secrets:
SLACK_PERFORMANCE_WEBHOOK_URL: ${{ secrets.SLACK_PERFORMANCE_WEBHOOK_URL }}
PANDORAS_TARGET: ${{ secrets.PANDORAS_TARGET }}
PANDORAS_MNEMONIC: ${{ secrets.PANDORAS_MNEMONIC }}
with:
runner: devnet
environment: devnet
transaction_batch: '200'
transaction_count: '10000'
mode: EOA
pandoras_box_erc20:
uses: ./.github/workflows/pandoras_box.yml
name: Pandora's Box ERC20
needs: pandoras_box_eoa
secrets:
SLACK_PERFORMANCE_WEBHOOK_URL: ${{ secrets.SLACK_PERFORMANCE_WEBHOOK_URL }}
PANDORAS_TARGET: ${{ secrets.PANDORAS_TARGET }}
PANDORAS_MNEMONIC: ${{ secrets.PANDORAS_MNEMONIC }}
with:
runner: devnet
environment: devnet
transaction_batch: '200'
transaction_count: '10000'
mode: ERC20
pandoras_box_erc721:
uses: ./.github/workflows/pandoras_box.yml
name: Pandora's Box ERC721
needs: pandoras_box_erc20
secrets:
SLACK_PERFORMANCE_WEBHOOK_URL: ${{ secrets.SLACK_PERFORMANCE_WEBHOOK_URL }}
PANDORAS_TARGET: ${{ secrets.PANDORAS_TARGET }}
PANDORAS_MNEMONIC: ${{ secrets.PANDORAS_MNEMONIC }}
with:
runner: devnet
environment: devnet
transaction_batch: '200'
transaction_count: '10000'
mode: ERC721
25 changes: 18 additions & 7 deletions .github/workflows/deploy.testnet.yml
Expand Up @@ -209,14 +209,25 @@ jobs:
needs: deploy_testnet
secrets:
SLACK_PERFORMANCE_WEBHOOK_URL: ${{ secrets.SLACK_PERFORMANCE_WEBHOOK_URL }}
LOADBOT_JSONRPC_URL: ${{ secrets.LOADBOT_JSONRPC_URL }}
LOADBOT_SENDER_ADDRESS: ${{ secrets.LOADBOT_SENDER_ADDRESS }}
LOADBOT_GRPC_ADDRESS: ${{ secrets.LOADBOT_GRPC_ADDRESS }}
LOADBOT_0x1AB8C3df809b85012a009c0264eb92dB04eD6EFa: ${{ secrets.LOADBOT_0x1AB8C3df809b85012a009c0264eb92dB04eD6EFa }}
PANDORAS_TARGET: ${{ secrets.PANDORAS_TARGET }}
PANDORAS_MNEMONIC: ${{ secrets.PANDORAS_MNEMONIC }}
with:
runner: testnet
environment: testnet
chain_id: '750'
transaction_value: '100'
transaction_batch: '200'
transaction_count: '10000'
transactions_per_second: '100'
mode: ERC20
pandoras_box_erc721:
uses: ./.github/workflows/pandoras_box.yml
name: Pandora's Box ERC721
needs: pandoras_box_erc20
secrets:
SLACK_PERFORMANCE_WEBHOOK_URL: ${{ secrets.SLACK_PERFORMANCE_WEBHOOK_URL }}
PANDORAS_TARGET: ${{ secrets.PANDORAS_TARGET }}
PANDORAS_MNEMONIC: ${{ secrets.PANDORAS_MNEMONIC }}
with:
runner: testnet
environment: testnet
transaction_batch: '200'
transaction_count: '10000'
mode: ERC721
12 changes: 8 additions & 4 deletions docker/local/docker-compose.yml
Expand Up @@ -24,7 +24,8 @@ services:
dockerfile: docker/local/Dockerfile
command: ["server", "--data-dir", "/data", "--chain", "/genesis/genesis.json", "--grpc-address", "0.0.0.0:9632", "--libp2p", "0.0.0.0:1478", "--jsonrpc", "0.0.0.0:8545", "--seal"]
depends_on:
- init
init:
condition: service_completed_successfully
ports:
- '10000:9632'
- '10002:8545'
Expand All @@ -41,7 +42,8 @@ services:
dockerfile: docker/local/Dockerfile
command: ["server", "--data-dir", "/data", "--chain", "/genesis/genesis.json", "--grpc-address", "0.0.0.0:9632", "--libp2p", "0.0.0.0:1478", "--jsonrpc", "0.0.0.0:8545", "--seal"]
depends_on:
- init
init:
condition: service_completed_successfully
ports:
- '20000:9632'
- '20002:8545'
Expand All @@ -58,7 +60,8 @@ services:
dockerfile: docker/local/Dockerfile
command: ["server", "--data-dir", "/data", "--chain", "/genesis/genesis.json", "--grpc-address", "0.0.0.0:9632", "--libp2p", "0.0.0.0:1478", "--jsonrpc", "0.0.0.0:8545", "--seal"]
depends_on:
- init
init:
condition: service_completed_successfully
ports:
- '30000:9632'
- '30002:8545'
Expand All @@ -75,7 +78,8 @@ services:
dockerfile: docker/local/Dockerfile
command: ["server", "--data-dir", "/data", "--chain", "/genesis/genesis.json", "--grpc-address", "0.0.0.0:9632", "--libp2p", "0.0.0.0:1478", "--jsonrpc", "0.0.0.0:8545", "--seal"]
depends_on:
- init
init:
condition: service_completed_successfully
ports:
- '40000:9632'
- '40002:8545'
Expand Down
32 changes: 21 additions & 11 deletions docker/local/polygon-edge.sh
Expand Up @@ -3,25 +3,35 @@
set -e

POLYGON_EDGE_BIN=./polygon-edge
GENESIS_PATH=/genesis/genesis.json

case "$1" in

"init")
echo "Generating secrets..."
secrets=$("$POLYGON_EDGE_BIN" secrets init --num 4 --data-dir data- --json)
echo "Secrets have been successfully generated"
if [ -f "$GENESIS_PATH" ]; then
echo "Secrets have already been generated."
else
echo "Generating secrets..."
secrets=$("$POLYGON_EDGE_BIN" secrets init --num 4 --data-dir data- --json)
echo "Secrets have been successfully generated"

echo "Generating genesis file..."
"$POLYGON_EDGE_BIN" genesis \
--dir /genesis/genesis.json \
--consensus ibft \
--ibft-validators-prefix-path data- \
--bootnode /dns4/node-1/tcp/1478/p2p/$(echo $secrets | jq -r '.[0] | .node_id') \
--bootnode /dns4/node-2/tcp/1478/p2p/$(echo $secrets | jq -r '.[1] | .node_id')
echo "Genesis file has been successfully generated"
echo "Generating genesis file..."
"$POLYGON_EDGE_BIN" genesis \
--dir "$GENESIS_PATH" \
--consensus ibft \
--ibft-validators-prefix-path data- \
--bootnode /dns4/node-1/tcp/1478/p2p/$(echo $secrets | jq -r '.[0] | .node_id') \
--bootnode /dns4/node-2/tcp/1478/p2p/$(echo $secrets | jq -r '.[1] | .node_id')
echo "Genesis file has been successfully generated"
fi
;;

*)
until [ -f "$GENESIS_PATH" ]
do
echo "Waiting 1s for genesis file $GENESIS_PATH to be created by init container..."
sleep 1
done
echo "Executing polygon-edge..."
exec "$POLYGON_EDGE_BIN" "$@"
;;
Expand Down

0 comments on commit 1e4a66a

Please sign in to comment.