Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

devop test #109

Merged
merged 35 commits into from
Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
709af50
devop test
pinkiebell Dec 7, 2022
b0bf87c
test
pinkiebell Dec 7, 2022
d9811da
split heavy tests
pinkiebell Dec 7, 2022
12ffce6
convert other tests
pinkiebell Dec 7, 2022
de7ff4c
remove obsolete files
pinkiebell Dec 7, 2022
60fca44
fix unsupported ami
pinkiebell Dec 7, 2022
1f27bf8
delete example.yml
pinkiebell Dec 7, 2022
d539b00
add devops workflow
pinkiebell Dec 7, 2022
2fa8a05
syntax???
pinkiebell Dec 7, 2022
f2db20b
syntax???
pinkiebell Dec 7, 2022
89e925e
wip
pinkiebell Dec 7, 2022
ddba7e5
add note
pinkiebell Dec 7, 2022
4a5ee6e
add labeled event
pinkiebell Dec 7, 2022
4d9eae7
test
pinkiebell Dec 7, 2022
2142274
use smaller instances for eth transfer
pinkiebell Dec 7, 2022
d6eb7ad
stick to specific runner
pinkiebell Dec 8, 2022
2d74826
workflows: more specific labels
pinkiebell Dec 8, 2022
516c8f5
debug
pinkiebell Dec 8, 2022
642cfed
scripts: exit early if the test failed but with no failed proof requests
pinkiebell Dec 8, 2022
2f17ba4
raise rpc request timeout
pinkiebell Dec 8, 2022
b292d5e
wip
pinkiebell Dec 8, 2022
0a9a5c0
incr eth transfer instance type
pinkiebell Dec 8, 2022
48c528d
depends on perf counters?
pinkiebell Dec 8, 2022
6b62b57
test
pinkiebell Dec 8, 2022
8be1b9b
Revert "test"
pinkiebell Dec 8, 2022
7225dfe
try with perf util again
pinkiebell Dec 8, 2022
65a1247
coverage: dont run on draft pr
pinkiebell Dec 9, 2022
29d0f74
heavy_ci: attach perf to pid instead
pinkiebell Dec 9, 2022
1dff2ec
remove dbg statement
pinkiebell Dec 9, 2022
19346ef
try with smaller instance
pinkiebell Dec 9, 2022
2169a3d
capacity issues
pinkiebell Dec 9, 2022
dfb7bec
updates from autogen workflow
invalid-email-address Dec 9, 2022
4def688
test
pinkiebell Dec 10, 2022
bbada75
wip
pinkiebell Dec 10, 2022
6f31aee
wip
pinkiebell Dec 10, 2022
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
21 changes: 2 additions & 19 deletions .github/workflows/autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,13 @@ on:
types: [synchronize, opened, reopened, labeled]

jobs:
wakeup:
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'allow-autogen')
name: Wake up self-hosted runner
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- run: .github/workflows/wakeup_runner.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_INSTANCE_ID: ${{ secrets.AWS_INSTANCE_ID }}

gen:
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'allow-autogen')
timeout-minutes: 7200
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
COMPOSE_PROJECT_NAME: ${{ github.run_id }}
needs: [wakeup]
runs-on: heavy-worker
runs-on: ["${{github.run_id}}", self-hosted, r6a.24xlarge]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -39,7 +23,6 @@ jobs:

- name: Build docker images
run: |
docker compose down -v --remove-orphans || true
docker compose build dev

- name: Contracts
Expand Down
21 changes: 3 additions & 18 deletions .github/workflows/test.yml → .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,15 @@ on:
push:
branches:
- master
pull_request_target:
pull_request:

jobs:
wakeup:
name: Wake up self-hosted runner
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- run: .github/workflows/wakeup_runner.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_INSTANCE_ID: ${{ secrets.AWS_INSTANCE_ID }}

main:
if: github.event.pull_request.draft == false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
COMPOSE_PROJECT_NAME: ${{ github.run_id }}
needs: [wakeup]
runs-on: heavy-worker
runs-on: ["${{github.run_id}}", self-hosted, r6a.2xlarge]
steps:
- uses: actions/checkout@v2
with:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/github-ops.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: github-ops

on:
workflow_dispatch:
workflow_run:
workflows: ["*"]
types:
- requested
- completed

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
ping:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Ping runner workflow
env:
# only needs public repo scope
GH_OPS_PAT: ${{ secrets.GH_OPS_PAT }}
run: |
curl -H "authorization: token $GH_OPS_PAT" 'https://api.github.com/repos/privacy-scaling-explorations/github-ops/dispatches' -d '{"event_type":"zkevm-chain"}'
64 changes: 0 additions & 64 deletions .github/workflows/heavy_test.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/pi-eth-transfer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pi Circuit aggregation eth_transfer
on:
workflow_dispatch:
pull_request:
types: [synchronize, opened, reopened, labeled]

jobs:
test:
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ci-pi-eth-transfer')
timeout-minutes: 7200
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
runs-on: ["${{github.run_id}}", self-hosted, r6a.24xlarge]
steps:
- uses: actions/checkout@v2

- name: Setup
run: cp .env.example .env

- name: Build docker images
run: |
docker compose down -v --remove-orphans || true
docker compose build bootnode dev

- name: Pi Circuit aggregation eth_transfer
if: always()
run: |
docker compose -f docker-compose.yml -f docker-compose-perf.yml run --use-aliases --no-TTY --rm --entrypoint bash dev -c 'COORDINATOR_AGGREGATE_PROOF=true COORDINATOR_CIRCUIT_NAME=pi ./scripts/heavy_ci.sh eth_transfer'
./scripts/ci_commit_errors.sh pi-ag-eth_transfer
30 changes: 30 additions & 0 deletions .github/workflows/pi-native-withdraw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pi Circuit aggregation native_withdraw
on:
workflow_dispatch:
pull_request:
types: [synchronize, opened, reopened, labeled]

jobs:
test:
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ci-pi-native-withdraw')
timeout-minutes: 7200
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
runs-on: ["${{github.run_id}}", self-hosted, r6a.24xlarge]
steps:
- uses: actions/checkout@v2

- name: Setup
run: cp .env.example .env

- name: Build docker images
run: |
docker compose down -v --remove-orphans || true
docker compose build bootnode dev

- name: Pi Circuit aggregation native_withdraw
if: always()
run: |
docker compose -f docker-compose.yml -f docker-compose-perf.yml run --use-aliases --no-TTY --rm --entrypoint bash dev -c 'COORDINATOR_AGGREGATE_PROOF=true COORDINATOR_CIRCUIT_NAME=pi ./scripts/heavy_ci.sh native_withdraw'
./scripts/ci_commit_errors.sh pi-ag-native_withdraw
30 changes: 30 additions & 0 deletions .github/workflows/super-eth-transfer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Super Circuit aggregation eth_transfer
on:
workflow_dispatch:
pull_request:
types: [synchronize, opened, reopened, labeled]

jobs:
test:
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ci-super-eth-transfer')
timeout-minutes: 7200
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
runs-on: ["${{github.run_id}}", self-hosted, r6a.24xlarge]
steps:
- uses: actions/checkout@v2

- name: Setup
run: cp .env.example .env

- name: Build docker images
run: |
docker compose down -v --remove-orphans || true
docker compose build bootnode dev

- name: Super Circuit aggregation eth_transfer
if: always()
run: |
docker compose -f docker-compose.yml -f docker-compose-perf.yml run --use-aliases --no-TTY --rm --entrypoint bash dev -c 'COORDINATOR_AGGREGATE_PROOF=true COORDINATOR_CIRCUIT_NAME=super ./scripts/heavy_ci.sh eth_transfer'
./scripts/ci_commit_errors.sh super-ag-eth_transfer
30 changes: 30 additions & 0 deletions .github/workflows/super-native-withdraw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Super Circuit aggregation native_withdraw
on:
workflow_dispatch:
pull_request:
types: [synchronize, opened, reopened, labeled]

jobs:
test:
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ci-super-native-withdraw')
timeout-minutes: 7200
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
runs-on: ["${{github.run_id}}", self-hosted, r6a.48xlarge]
steps:
- uses: actions/checkout@v2

- name: Setup
run: cp .env.example .env

- name: Build docker images
run: |
docker compose down -v --remove-orphans || true
docker compose build bootnode dev

- name: Super Circuit aggregation native_withdraw
if: always()
run: |
docker compose -f docker-compose.yml -f docker-compose-perf.yml run --use-aliases --no-TTY --rm --entrypoint bash dev -c 'COORDINATOR_AGGREGATE_PROOF=true COORDINATOR_CIRCUIT_NAME=super ./scripts/heavy_ci.sh native_withdraw'
./scripts/ci_commit_errors.sh super-ag-native_withdraw
21 changes: 0 additions & 21 deletions .github/workflows/wakeup_runner.sh

This file was deleted.

2 changes: 1 addition & 1 deletion coordinator/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use hyper::client::HttpConnector;
use hyper::Uri;
use zkevm_common::json_rpc::jsonrpc_request_client;

pub const RPC_REQUEST_TIMEOUT: u64 = 15000;
pub const RPC_REQUEST_TIMEOUT: u64 = 30000;

/// may override any pending transactions
pub async fn send_transaction_to_l1(
Expand Down
15 changes: 9 additions & 6 deletions scripts/heavy_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ trap 'pkill --parent $$' TERM EXIT INT

cargo build --release --bin prover_rpcd
env time --output PROVER_STATS.txt --verbose -- \
perf stat \
-o PROVER_PERF.txt \
cargo run --release --bin prover_rpcd 2>&1 | xz > PROVER_LOG.txt.xz &
PID=$!
perf stat --pid $PID -I 300000 -o PROVER_PERF.txt \
-e stalled-cycles-backend \
-e stalled-cycles-frontend \
-e instructions \
Expand All @@ -30,10 +31,7 @@ env time --output PROVER_STATS.txt --verbose -- \
-e l2_cache_accesses_from_ic_misses \
-e ic_tag_hit_miss.all_instruction_cache_accesses \
-e ic_tag_hit_miss.instruction_cache_hit \
-e ic_tag_hit_miss.instruction_cache_miss \
-- \
cargo run --release --bin prover_rpcd 2>&1 | xz > PROVER_LOG.txt.xz &
PID=$!
-e ic_tag_hit_miss.instruction_cache_miss &

# sleep a bit in case the geth nodes are not up yet
sleep 3
Expand All @@ -55,6 +53,11 @@ if [ $status -eq 0 ]; then
exit 0
fi

# if there are not failed proof requests, then something else failed
if [ "${FAILED_BLOCKS}" = "" ]; then
exit 1
fi

# error collection
mkdir errors

Expand Down