Skip to content

feat: adding spamoor test#3091

Merged
chatton merged 15 commits intomainfrom
cian/spamoor
Feb 19, 2026
Merged

feat: adding spamoor test#3091
chatton merged 15 commits intomainfrom
cian/spamoor

Conversation

@chatton
Copy link
Contributor

@chatton chatton commented Feb 19, 2026

Overview

This PR adds an E2E test that deploys Spamoor, and kicks off a few spammers using the API.

The test itself is quite basic, but can be used as a template for other tests to deploy more elaborate scenarios.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @chatton, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new end-to-end test for the 'spamoor' transaction generation tool, ensuring its proper integration and functionality within the EVM ecosystem. To support this new test and provide more flexibility for future E2E scenarios, the common EVM test setup function has been enhanced to expose the underlying Reth full node instance. This change required minor adjustments across several existing test files to accommodate the updated function signature.

Highlights

  • New E2E Test for Spamoor: A new end-to-end smoke test (TestSpamoorSmoke) has been added to validate the functionality of the 'spamoor' transaction spamming tool, integrating it with reth and sequencer nodes.
  • Updated Common EVM Test Setup: The setupCommonEVMTest helper function now returns the reth.Node instance, allowing other tests to interact directly with the Reth full node. This required updates to all existing E2E tests that call this function.
  • Dependency Updates: The go.mod file has been updated to include github.com/docker/go-connections and github.com/prometheus/client_model as direct dependencies, and a local replace directive for github.com/celestiaorg/tastora.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • test/e2e/evm_contract_bench_test.go
    • Adjusted indentation for consistency.
  • test/e2e/evm_force_inclusion_e2e_test.go
    • Updated calls to setupCommonEVMTest to handle the additional reth.Node return value.
  • test/e2e/evm_full_node_e2e_test.go
    • Updated calls to setupCommonEVMTest to handle the additional reth.Node return value.
  • test/e2e/evm_spamoor_smoke_test.go
    • Added a new E2E test file for 'spamoor' smoke testing.
    • Implemented TestSpamoorSmoke to spin up reth, sequencer, and a Spamoor node, then initiate basic transaction spammers.
    • Included helper functions requireHTTP, sumCounter, and sumGauge for metric collection and validation.
  • test/e2e/evm_test_common.go
    • Reordered import statements for evmtest.
    • Modified the setupCommonEVMTest function signature to return a *reth.Node instance.
    • Updated internal calls to setupCommonEVMTest to reflect the new return signature.
  • test/e2e/failover_e2e_test.go
    • Updated calls to setupCommonEVMTest to handle the additional reth.Node return value.
  • test/e2e/go.mod
    • Added github.com/docker/go-connections as a direct dependency.
    • Added github.com/prometheus/client_model as a direct dependency.
    • Introduced a local replace directive for github.com/celestiaorg/tastora.
Activity
  • The pull request is marked as 'WIP DO NOT MERGE', indicating it is still under active development and not ready for final review or merging.
  • The pull request description body is empty, suggesting that detailed context or rationale is yet to be provided by the author.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedFeb 19, 2026, 11:43 AM

@claude
Copy link
Contributor

claude bot commented Feb 19, 2026

Claude finished @chatton's task in 2m 9s —— View job


Code Review

  • Gather context and read changed files
  • Review new spamoor smoke test
  • Review changes to common EVM test setup
  • Review go.mod changes
  • Review formatting changes in other test files
  • Compile and post final review

Good addition overall — the test is well-structured, has meaningful assertions (addressing Gemini's TODO note), and uses proper cleanup via t.Cleanup. A few things worth addressing before merging:


test/e2e/evm_spamoor_smoke_test.go

1. context.Background() inconsistency (line 44)

ctx := t.Context() is defined at line 56, but context.Background() is used just above it on line 44. Move ctx := t.Context() to the top of the function body and reuse it everywhere:

// line 44 — should use ctx, not context.Background()
ni, err := rethNode.GetNetworkInfo(context.Background())

Fix this →

2. sumGauge is defined but never called (lines 166–177)

sumGauge is defined but has no callers anywhere in the test suite. Either use it or remove it to avoid dead code.

Fix this →

3. Bare time.Sleep not respecting context cancellation (lines 115, 123)

time.Sleep(60 * time.Second)  // line 115 — blocks regardless of test timeout
time.Sleep(2 * time.Second)   // line 123

If the test context is cancelled (timeout or signal), these sleeps will not be interrupted. Consider replacing with a context-aware sleep, e.g.:

select {
case <-time.After(60 * time.Second):
case <-ctx.Done():
    t.Fatal("context cancelled while waiting for spamoor activity")
}

4. requireHTTP doesn't accept context (line 132)

The helper uses a deadline loop but has no way to be cancelled by the test context. If the test times out mid-poll, it'll run to its own deadline before failing. Consider accepting a context.Context parameter.


test/e2e/evm_test_common.go

5. Stale doc comment on setupCommonEVMTest (line 515)

The comment says:

// Returns: jwtSecret, fullNodeJwtSecret (empty if needsFullNode=false), genesisHash

But the function now returns 5 values, with *reth.Node as the new last return. The comment should be updated to reflect this.

Fix this →

6. Function bloat acknowledged — follow-up ticket?

The PR author noted in a review comment that setupCommonEVMTest is "quite bloated." This function now returns 5 values. Worth tracking a follow-up issue to refactor it (e.g., return a struct), especially since further tests will likely need access to even more pieces of the setup.


test/e2e/go.mod

The Gemini review flagged a local replace directive for github.com/celestiaorg/tastora, but that isn't present in the current state of the file — it looks like it was already cleaned up. The existing replace directives for ev-node submodules are standard for this monorepo layout and are fine.

github.com/prometheus/client_model is correctly promoted to a direct dependency since it's explicitly imported in the new test file.


Summary

Severity Issue
Minor context.Background() on line 44 should use ctx from t.Context()
Minor sumGauge is dead code — use or remove
Minor time.Sleep on lines 115/123 not context-aware
Minor requireHTTP should accept a context
Nit Update doc comment for setupCommonEVMTest return values

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new end-to-end smoke test for 'Spamoor' and refactors the common EVM test setup function setupCommonEVMTest to return the reth.Node instance. The changes also include updating go.mod with new dependencies for the smoke test.

My review has identified a few areas for improvement:

  • Inconsistent Formatting: Several files have indentation changed from tabs to spaces, which is inconsistent with the project's style. Running gofmt should resolve this.
  • Build Configuration: The go.mod file includes a local replace directive which will break builds for others and in CI. This should be removed.
  • Test Completeness: The new TestSpamoorSmoke is a good addition but currently lacks assertions to verify its behavior, as noted by a TODO.
  • Test Context: The new test uses context.Background() where t.Context() would be more appropriate for better test lifecycle management.

Overall, the changes are a good step towards adding more comprehensive testing, but the identified issues should be addressed before merging.


// Use common setup (no full node needed initially)
jwtSecret, _, genesisHash, endpoints := setupCommonEVMTest(t, sut, false)
jwtSecret, _, genesisHash, endpoints, _ := setupCommonEVMTest(t, sut, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The indentation on this line has been changed from a tab to spaces, which is inconsistent with the project's coding style. Please use tabs for indentation or run gofmt to correct it.

Suggested change
jwtSecret, _, genesisHash, endpoints, _ := setupCommonEVMTest(t, sut, false)
jwtSecret, _, genesisHash, endpoints, _ := setupCommonEVMTest(t, sut, false)


// Use common setup with full node support
jwtSecret, fullNodeJwtSecret, genesisHash, endpoints := setupCommonEVMTest(t, sut, true)
jwtSecret, fullNodeJwtSecret, genesisHash, endpoints, _ := setupCommonEVMTest(t, sut, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The indentation on this line has been changed from a tab to spaces, which is inconsistent with the project's coding style. Please use tabs for indentation or run gofmt to correct it.

Suggested change
jwtSecret, fullNodeJwtSecret, genesisHash, endpoints, _ := setupCommonEVMTest(t, sut, true)
jwtSecret, fullNodeJwtSecret, genesisHash, endpoints, _ := setupCommonEVMTest(t, sut, true)

time.Sleep(2 * time.Second)
printCollectedTraceReport(t, collector)

// TODO: test should pass / fail based on results
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This TODO indicates the test is incomplete. A smoke test should have some basic assertions to be effective. Consider adding assertions to verify the outcome, for example, checking that some transactions were sent and that there were no failures.

require.Greater(t, sent, float64(0), "at least one transaction should have been sent")
require.Zero(t, fail, "no transactions should have failed")


// Get JWT secrets and setup common components first
jwtSecret, fullNodeJwtSecret, genesisHash, testEndpoints := setupCommonEVMTest(t, sut, true)
jwtSecret, fullNodeJwtSecret, genesisHash, testEndpoints, _ := setupCommonEVMTest(t, sut, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The indentation on this line has been changed from a tab to spaces, which is inconsistent with the project's coding style. Please use tabs for indentation or run gofmt to correct it.

Suggested change
jwtSecret, fullNodeJwtSecret, genesisHash, testEndpoints, _ := setupCommonEVMTest(t, sut, true)
jwtSecret, fullNodeJwtSecret, genesisHash, testEndpoints, _ := setupCommonEVMTest(t, sut, true)

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.00%. Comparing base (a9c50d2) to head (a992fae).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3091      +/-   ##
==========================================
- Coverage   61.01%   61.00%   -0.02%     
==========================================
  Files         113      113              
  Lines       11544    11544              
==========================================
- Hits         7044     7042       -2     
- Misses       3701     3703       +2     
  Partials      799      799              
Flag Coverage Δ
combined 61.00% <ø> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatton chatton changed the title [WIP DO NOT MERGE] [E2E] Adding spamoor test [E2E] Adding spamoor test Feb 19, 2026
//
// Returns: jwtSecret, fullNodeJwtSecret (empty if needsFullNode=false), genesisHash
func setupCommonEVMTest(t testing.TB, sut *SystemUnderTest, needsFullNode bool, _ ...string) (string, string, string, *TestEndpoints) {
func setupCommonEVMTest(t testing.TB, sut *SystemUnderTest, needsFullNode bool) (string, string, string, *TestEndpoints, *reth.Node) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I needed to return the reth node in order to get access to the DockerClient / Network so the spamoor instance can be deployed in the same network.

I think we can refactor this function in a follow up as it is quite bloated at this stage.

I also removed the unused string varargs

@chatton chatton marked this pull request as ready for review February 19, 2026 10:45
@chatton chatton changed the title [E2E] Adding spamoor test feat: adding spamoor test Feb 19, 2026
@chatton chatton requested review from alpe and julienrbrt February 19, 2026 10:46
@chatton chatton enabled auto-merge February 19, 2026 11:34
@chatton chatton added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit ef3469a Feb 19, 2026
28 checks passed
@chatton chatton deleted the cian/spamoor branch February 19, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments