Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Comments

test(node): restart tests#2553

Closed
theochap wants to merge 2 commits intomainfrom
theo/restart-test
Closed

test(node): restart tests#2553
theochap wants to merge 2 commits intomainfrom
theo/restart-test

Conversation

@theochap
Copy link
Member

Description

Adds a couple of restart tests to ensure that nodes can recover from stopping and restarting after some time

@theochap theochap self-assigned this Jul 24, 2025
@theochap theochap added K-feature Kind: feature M-tests Meta: Testing related A-node Area: cl node (eq. Go op-node) handles single-chain consensus labels Jul 24, 2025
@theochap theochap moved this to In Review in Project Tracking Jul 24, 2025
@theochap theochap added this to the [kona-node] Phase 5: Alpha milestone Jul 24, 2025
@codecov
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.1%. Comparing base (8449725) to head (3542838).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theochap theochap force-pushed the theo/restart-test branch from 94f90e9 to d1f202f Compare July 24, 2025 21:10
Copy link
Contributor

@clabby clabby left a comment

Choose a reason for hiding this comment

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

very nice. g2g if CI passes

@theochap theochap force-pushed the theo/add-engine-queue-test branch from 4990f3f to b0e904d Compare July 24, 2025 21:18
@theochap theochap force-pushed the theo/restart-test branch from d1f202f to e085998 Compare July 24, 2025 21:23
@theochap theochap force-pushed the theo/add-engine-queue-test branch 3 times, most recently from 2923d27 to e99a0fb Compare July 25, 2025 17:26
@theochap theochap force-pushed the theo/restart-test branch from e085998 to adf8e72 Compare July 25, 2025 17:27
@theochap theochap force-pushed the theo/add-engine-queue-test branch 2 times, most recently from e03cc19 to 8c886a3 Compare July 25, 2025 18:17
@theochap theochap force-pushed the theo/restart-test branch from adf8e72 to 15d28cf Compare July 25, 2025 18:35
@theochap theochap changed the base branch from theo/add-engine-queue-test to main July 25, 2025 18:36
Copilot AI review requested due to automatic review settings July 25, 2025 18:36
@theochap theochap force-pushed the theo/restart-test branch from 15d28cf to efbb929 Compare July 25, 2025 18:36
@theochap theochap enabled auto-merge July 25, 2025 18:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds restart tests to validate that nodes can recover from stopping and restarting after extended periods. These tests ensure node resilience and proper p2p reconnection capabilities after downtime.

  • Introduces TestRestartSync to verify nodes can resync after 2-minute downtime
  • Adds TestRestartP2p to confirm p2p connections are re-established after restart
  • Implements node stop/start functionality using Kurtosis CLI commands
  • Enables dev RPC endpoints across all test network configurations for enhanced testing capabilities

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/node/restart_test.go New test file with sync and p2p restart validation tests
tests/node/mod.go Utility functions for node control, WebSocket handling, and dev RPC support
tests/node/engine_test.go New engine queue monitoring test using dev RPC endpoints
tests/node/rpc_test.go Simplified peer selection logic removing connectedness check
tests/justfile Extended test timeout and added filtered test execution capability
tests/devnets/*.yaml Enabled dev RPC endpoints for all Kona node configurations
Comments suppressed due to low confidence (1)

tests/node/mod.go:49

  • [nitpick] The generic type parameter Out is not descriptive. Consider using a more specific name like ResultType or TResult to improve readability.
		Result Out    `json:"result"`

var wg sync.WaitGroup
for _, node := range nodes {
if node == ref {
t.Log("skipping reference node %s", node.Escape().ID().Key())
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

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

The Log statement uses incorrect format specifier. It should use t.Logf with the format string or remove the format placeholder.

Suggested change
t.Log("skipping reference node %s", node.Escape().ID().Key())
t.Logf("skipping reference node %s", node.Escape().ID().Key())

Copilot uses AI. Check for mistakes.
found := false
for _, peer := range peers.Peers {
if peer.NodeID == refId {
t.Log("node %s is connected to reference node %s", clName, ref.Escape().ID().Key())
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

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

The Log statement uses incorrect format specifier. It should use t.Logf with the format string or remove the format placeholder.

Suggested change
t.Log("node %s is connected to reference node %s", clName, ref.Escape().ID().Key())
t.Logf("node %s is connected to reference node %s", clName, ref.Escape().ID().Key())

Copilot uses AI. Check for mistakes.
@theochap theochap force-pushed the theo/restart-test branch from 80d3bc4 to 76e2fa6 Compare July 25, 2025 19:33
@theochap theochap force-pushed the theo/restart-test branch from 76e2fa6 to 3542838 Compare July 25, 2025 19:36
@theochap theochap added the M-do-not-merge Meta: Do not merge label Jul 25, 2025
@theochap
Copy link
Member Author

It seems that manually restarting the kurtosis services cause segfault errors in the devstack... Going to close this one until we integrate kona in sysgo

@theochap theochap closed this Jul 25, 2025
auto-merge was automatically disabled July 25, 2025 21:05

Pull request was closed

@github-project-automation github-project-automation bot moved this from In Review to Done in Project Tracking Jul 25, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 22, 2025
## Description

This PR adds back the connection drop test and the restart test inside
our e2e testing suite

See #2554 and #2553
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
## Description

This PR adds back the connection drop test and the restart test inside
our e2e testing suite

See op-rs/kona#2554 and op-rs/kona#2553
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-node Area: cl node (eq. Go op-node) handles single-chain consensus K-feature Kind: feature M-do-not-merge Meta: Do not merge M-tests Meta: Testing related

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants