Skip to content

Add EVM stress workload tooling#3404

Open
codchen wants to merge 2 commits into
mainfrom
tony/evm-stress-tooling
Open

Add EVM stress workload tooling#3404
codchen wants to merge 2 commits into
mainfrom
tony/evm-stress-tooling

Conversation

@codchen
Copy link
Copy Markdown
Collaborator

@codchen codchen commented May 7, 2026

Summary

  • Adds ./scripts/evm_stress.sh, which initializes a local seid node, patches genesis with deterministic sender accounts, starts the node, and runs the transfer workload.
  • Adds scripts/evm_stress/main.go, which generates deterministic sender keys, optionally dumps their derived Sei addresses for genesis funding, and sends nonce-0 EVM transfers from unique senders to a shared recipient at the target rate.
  • Ignores the local evm_stress build artifact.

This is split out from #3376 so the investigation tooling can be reviewed independently from logging and execution optimizations.

Test Plan

  • go test ./scripts/evm_stress
  • go run github.com/securego/gosec/v2/cmd/gosec@v2.22.11 ./scripts/evm_stress/...

Note

Low Risk
Adds developer-only stress-testing scripts and a Go load generator without modifying production chain logic; risk is limited to local environment usage and potential resource-intensive runs.

Overview
Adds an evm_stress workload toolchain for local performance investigations: a new scripts/evm_stress.sh script initializes a local seid, bulk-patches genesis.json with many deterministic sender accounts, starts the node while filtering key log lines, waits for the EVM JSON-RPC to come up, and then launches a transfer flood.

Introduces scripts/evm_stress/main.go, a deterministic key/address generator that can either dump Sei bech32 addresses for genesis funding or run a rate-limited EVM transfer sender (unique senders, nonce 0) to a single recipient at a target TPS. Updates .gitignore to ignore the local ./evm_stress artifact.

Reviewed by Cursor Bugbot for commit 93fda38. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 12, 2026, 3:08 AM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 0% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.22%. Comparing base (654d40b) to head (93fda38).

Files with missing lines Patch % Lines
scripts/evm_stress/main.go 0.00% 73 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3404      +/-   ##
==========================================
- Coverage   59.25%   59.22%   -0.03%     
==========================================
  Files        2110     2111       +1     
  Lines      174181   174254      +73     
==========================================
  Hits       103210   103210              
- Misses      62044    62117      +73     
  Partials     8927     8927              
Flag Coverage Δ
sei-chain-pr 0.00% <0.00%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
scripts/evm_stress/main.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread .gitignore Outdated
}
time.Sleep(300 * time.Millisecond)
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Infinite loop in waitForBalance lacks timeout

Low Severity

waitForBalance spins in an infinite for loop polling for a positive balance, with no timeout or context cancellation check. If the genesis patching fails or the node doesn't produce a block, this hangs forever with no diagnostic output. Since ctx is context.Background(), there's no external cancellation path either.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 66f51e7. Configure here.

@codchen codchen force-pushed the tony/evm-stress-tooling branch from 66f51e7 to 93fda38 Compare May 12, 2026 03:07
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 93fda38. Configure here.

Comment thread scripts/evm_stress.sh
echo "==> shutting down..."
[ -n "${SEID_PID:-}" ] && kill "$SEID_PID" 2>/dev/null || true
# Kill the entire process group so tail and grep children are also terminated.
[ -n "${LOG_PID:-}" ] && kill -- -"$LOG_PID" 2>/dev/null || true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup fails to kill log-tailing child processes

Medium Severity

kill -- -"$LOG_PID" attempts to send a signal to the process group identified by $LOG_PID, but in a non-interactive shell script (no set -m), background subshells do not become process group leaders — they inherit the parent's PGID. So there is no process group with PGID equal to $LOG_PID, the kill silently fails (masked by 2>/dev/null || true), and the tail/grep children are left orphaned. The comment explicitly states the intent to "kill the entire process group so tail and grep children are also terminated," but this doesn't happen.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 93fda38. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants