Skip to content

chore: Remove unused node key param - #2304

Merged
julienrbrt merged 1 commit into
mainfrom
manav/remove_node_key
May 26, 2025
Merged

chore: Remove unused node key param#2304
julienrbrt merged 1 commit into
mainfrom
manav/remove_node_key

Conversation

@Manav-Aggarwal

@Manav-AggarwalManav-Aggarwal commented May 22, 2025

Copy link
Copy Markdown
Member

Overview

Remove unused node key parameter

Summary by CodeRabbit

  • Refactor

    • Simplified node initialization and related commands by removing the need to provide a node key during setup.
    • Reduced dependencies and streamlined function signatures for node creation and command execution.
  • Tests

    • Updated test helpers and test command setup to align with the simplified node initialization process.

@coderabbitai

coderabbitaiBot commented May 22, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This change removes the use of the nodeKey parameter and associated key management logic from node initialization, function signatures, and tests across the codebase. All references to the key package and the InitFiles helper are eliminated, simplifying node creation and related command-line interfaces.

Changes

File(s)Change Summary
node/full.go, node/light.go, node/node.goRemoved nodeKey parameter from node creation functions; eliminated key package imports.
node/helpers.goDeleted the InitFiles function and related imports.
node/helpers_test.go, node/node_test.goRemoved calls to InitFiles and usage of nodeKey in test helpers.
pkg/cmd/run_node.goRemoved nodeKey parameter from StartNode function and related logic.
pkg/cmd/run_node_test.goRemoved all references to nodeKey in test code and function signatures.
rollups/evm/based/cmd/run.go, rollups/evm/single/cmd/run.go, rollups/testapp/cmd/run.goRemoved nodeKey argument from calls to StartNode in command handlers.

Sequence Diagram(s)

sequenceDiagram
participant CLI/Tests
participant NodeFactory
participant Node
CLI/Tests->>NodeFactory: NewNode(config, ..., p2pClient, genesis, database, ...)
NodeFactory->>Node: Initialize Node (without nodeKey)
Node-->>NodeFactory: Node instance
NodeFactory-->>CLI/Tests: Node instance
Loading

Suggested reviewers

  • yarikbratashchuk
  • tac0turtle

Poem

A hop and a skip, the nodeKey is gone,
No more keys to wrangle, we simply hop on.
With lighter paws, our code runs free,
Simpler, sleeker—just as it should be!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (1.64.8)

Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2
Failed executing command with error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 619225a and de50e07.

📒 Files selected for processing (11)
  • node/full.go (0 hunks)
  • node/helpers.go (0 hunks)
  • node/helpers_test.go (0 hunks)
  • node/light.go (0 hunks)
  • node/node.go (1 hunks)
  • node/node_test.go (0 hunks)
  • pkg/cmd/run_node.go (0 hunks)
  • pkg/cmd/run_node_test.go (10 hunks)
  • rollups/evm/based/cmd/run.go (1 hunks)
  • rollups/evm/single/cmd/run.go (1 hunks)
  • rollups/testapp/cmd/run.go (1 hunks)
💤 Files with no reviewable changes (6)
  • pkg/cmd/run_node.go
  • node/helpers.go
  • node/node_test.go
  • node/full.go
  • node/helpers_test.go
  • node/light.go
🚧 Files skipped from review as they are similar to previous changes (5)
  • rollups/evm/single/cmd/run.go
  • rollups/testapp/cmd/run.go
  • node/node.go
  • rollups/evm/based/cmd/run.go
  • pkg/cmd/run_node_test.go
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: rollkit-docker / docker-build (GHCR; ghcr.io/rollkit/rollkit)
  • GitHub Check: test / Run Unit Tests
  • GitHub Check: test / Build All Rollkit Binaries
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actionsBot commented May 22, 2025

Copy link
Copy Markdown
Contributor

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedMay 25, 2025, 10:18 PM

@Manav-Aggarwal
Manav-Aggarwalforce-pushed the manav/remove_node_key branch 2 times, most recently from 33b1e6f to 619225aCompareMay 22, 2025 12:14
@codecov

codecovBot commented May 22, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 51.02%. Comparing base (cff3a64) to head (de50e07).
Report is 1 commits behind head on main.

Files with missing linesPatch %Lines
node/node.go0.00%1 Missing ⚠️
rollups/evm/based/cmd/run.go0.00%1 Missing ⚠️
rollups/evm/single/cmd/run.go0.00%1 Missing ⚠️
rollups/testapp/cmd/run.go0.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #2304 +/- ##
=======================================
Coverage 51.02% 51.02% =======================================
Files 81 81 Lines 7093 7079 -14 =======================================
- Hits 3619 3612 -7 + Misses 3098 3093 -5 + Partials 376 374 -2 

☔ 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.

@tac0turtletac0turtle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you will need to check how abci starts the system, i believe this was added for abci compatibility

@Manav-Aggarwal
Manav-Aggarwal marked this pull request as draft May 22, 2025 12:52
@Manav-Aggarwal
Manav-Aggarwal marked this pull request as ready for review May 25, 2025 22:17
@Manav-Aggarwal

Copy link
Copy Markdown
MemberAuthor

you will need to check how abci starts the system, i believe this was added for abci compatibility

Works for e2e test now

@julienrbrt
julienrbrt self-requested a review May 26, 2025 09:13

@julienrbrtjulienrbrt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK.

Tested in go-abci-execution by removing the nodekey from NewNode args.
NodeKey is only used in then https://github.com/rollkit/rollkit/blob/de50e07398ecd8da6562c52b70766f25b447e8cb/pkg/p2p/client.go#L67

@julienrbrt
julienrbrt added this pull request to the merge queueMay 26, 2025
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks May 26, 2025
@julienrbrt
julienrbrt added this pull request to the merge queueMay 26, 2025
Merged via the queue into main with commit 246f8cfMay 26, 2025
@julienrbrt
julienrbrt deleted the manav/remove_node_key branch May 26, 2025 09:35
@tac0turtletac0turtle removed this from EvolveAug 25, 2025
Sign up for freeto 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

@Manav-Aggarwal@tac0turtle@julienrbrt