-
Notifications
You must be signed in to change notification settings - Fork 51
feat: add load-test payload worker for base-load-test integration #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
55090f5
d17d2e8
6a6799c
c584a34
0f641f4
8d306fd
7ddffa4
4811b31
fbbf5a7
7c09461
e507e7c
5e021c7
c8c37de
b98b1a6
f9c9f8e
93d3a25
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,96 @@ | ||||||||||||||||||||||||||||||||
| name: Load Test | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||||||||||||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| build-binaries: | ||||||||||||||||||||||||||||||||
| name: Build binaries | ||||||||||||||||||||||||||||||||
| uses: ./.github/workflows/_build-binaries.yaml | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| load-test: | ||||||||||||||||||||||||||||||||
|
Comment on lines
+13
to
+16
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 23 days ago In general, the fix is to add an explicit The best fix here is to add a root-level Concretely:
permissions:
contents: readNo imports or additional methods are needed because this is purely a YAML configuration change for the workflow.
Suggested changeset
1
.github/workflows/load-test.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| name: Run load test benchmark | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| needs: [build-binaries] | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Harden the runner (Audit all outbound calls) | ||||||||||||||||||||||||||||||||
| uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| egress-policy: audit | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Download base-reth-node | ||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| name: base-reth-node | ||||||||||||||||||||||||||||||||
| path: ${{ runner.temp }}/bin/ | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Download builder | ||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| name: builder | ||||||||||||||||||||||||||||||||
| path: ${{ runner.temp }}/bin/ | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Download base-load-test | ||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| name: base-load-test | ||||||||||||||||||||||||||||||||
| path: ${{ runner.temp }}/bin/ | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Make binaries executable | ||||||||||||||||||||||||||||||||
| run: chmod +x ${{ runner.temp }}/bin/* | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run load test benchmark | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| mkdir -p ${{ runner.temp }}/data-dir | ||||||||||||||||||||||||||||||||
| mkdir -p ${{ runner.temp }}/output | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| go run benchmark/cmd/main.go \ | ||||||||||||||||||||||||||||||||
| --log.level info \ | ||||||||||||||||||||||||||||||||
| run \ | ||||||||||||||||||||||||||||||||
| --config configs/examples/load-test.yml \ | ||||||||||||||||||||||||||||||||
| --root-dir ${{ runner.temp }}/data-dir \ | ||||||||||||||||||||||||||||||||
| --output-dir ${{ runner.temp }}/output \ | ||||||||||||||||||||||||||||||||
| --builder-bin ${{ runner.temp }}/bin/builder \ | ||||||||||||||||||||||||||||||||
| --base-reth-node-bin ${{ runner.temp }}/bin/base-reth-node \ | ||||||||||||||||||||||||||||||||
| --load-test-bin ${{ runner.temp }}/bin/base-load-test | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| node-version: "20" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Build Report | ||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| cp -r ${{ runner.temp }}/output/ ./output/ || true | ||||||||||||||||||||||||||||||||
| pushd report | ||||||||||||||||||||||||||||||||
| npm install | ||||||||||||||||||||||||||||||||
| npm run build | ||||||||||||||||||||||||||||||||
| popd | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Upload Output | ||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| name: load-test-output | ||||||||||||||||||||||||||||||||
| path: ${{ runner.temp }}/output/ | ||||||||||||||||||||||||||||||||
| retention-days: 7 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Upload Report | ||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| name: load-test-report | ||||||||||||||||||||||||||||||||
| path: report/dist/ | ||||||||||||||||||||||||||||||||
| retention-days: 7 | ||||||||||||||||||||||||||||||||
|
Comment on lines
+17
to
+96
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 23 days ago In general, the fix is to add an explicit The single best fix here, without changing functionality, is to add a root-level permissions:
contents: readNo additional imports, methods, or definitions are needed; this is purely a YAML configuration change within the workflow file.
Suggested changeset
1
.github/workflows/load-test.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Load test throughput test | ||
| description: Test builder throughput using base-load-test binary as transaction generator | ||
| payloads: | ||
| - name: Load Test | ||
| type: load-test | ||
| id: load-test | ||
| sender_count: 10 | ||
| transactions: | ||
| - weight: 70 | ||
| type: transfer | ||
| - weight: 20 | ||
| type: calldata | ||
| max_size: 256 | ||
| - weight: 10 | ||
| type: precompile | ||
| target: sha256 | ||
|
|
||
| benchmarks: | ||
| - variables: | ||
| - type: payload | ||
| value: load-test | ||
| - type: node_type | ||
| value: builder | ||
| - type: validator_node_type | ||
| value: base-reth-node | ||
| - type: num_blocks | ||
| value: 10 | ||
| - type: gas_limit | ||
| value: 1000000000 |
Uh oh!
There was an error while loading. Please reload this page.