-
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: | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| @@ -4,6 +4,9 @@ | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, the fix is to add an explicit permissions block so that the GITHUB_TOKEN used by this workflow is restricted to the least privilege it needs. For a typical test/build workflow that only checks out code and works with artifacts, contents: read is usually sufficient. This matches CodeQL’s suggested minimal starting point and is unlikely to break existing behavior.
The single best fix here, without changing functionality, is to add a root-level permissions block just after the on: section in .github/workflows/load-test.yaml. This will apply to both jobs (build-binaries and load-test) unless they define their own permissions. Based on the visible steps, the workflow only needs read access to repository contents to allow actions/checkout to function, and no write scopes are required. Thus we can safely set:
permissions:
contents: readNo additional imports, methods, or definitions are needed; this is purely a YAML configuration change within the workflow file.
-
Copy modified lines R7-R9
| @@ -4,6 +4,9 @@ | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true |
| 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.