8000 refactor: Node interface, FullNode, LightNode, FullClient, LightClient by yarikbratashchuk · Pull Request #1932 · rollkit/rollkit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: Node interface, FullNode, LightNode, FullClient, LightClient #1932

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

Merged
merged 25 commits into from
Jan 21, 2025

Conversation

yarikbratashchuk
Copy link
Contributor
@yarikbratashchuk yarikbratashchuk commented Nov 27, 2024

Cleaning up rollkit, in preparation for execution api (#1896 #1897 #1898 #1899 #1900)

@yarikbratashchuk yarikbratashchuk self-assigned this Nov 27, 2024
Copy link
Contributor
coderabbitai bot commented Nov 27, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

@yarikbratashchuk yarikbratashchuk changed the title WIP on node interface seggregation WIP on node refactoring Nov 28, 2024
@yarikbratashchuk yarikbratashchuk changed the title WIP on node refactoring refactor: Node interface, FullNode, LightNode, FullClient, LightClient Dec 3, 2024
@yarikbratashchuk yarikbratashchuk marked this pull request as ready for review December 3, 2024 15:30
@RollkitBot RollkitBot requested review from a team, tzdybal, gupadhyaya and MSevey and removed request for a team December 3, 2024 15:30
Copy link
Contributor
@MSevey MSevey left a comment

Choose a reason for hiding this comment

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

Even though this is going on the feature branch for the exec_api, I think we should always have a passing CI.

Otherwise we get into the habit of merging failing CI and get ourselves into a hole.

If there are checks that need to be updated or removed for this feature branch we can do that, as long as we have a plan.

Copy link
github-actions bot commented Dec 17, 2024
PR Preview Action v1.6.0

🚀 View preview at
https://rollkit.github.io/rollkit/pr-preview/pr-1932/

Built to branch gh-pages at 2025-01-16 12:05 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@yarikbratashchuk yarikbratashchuk force-pushed the yarik/node-seggregation branch from ce9fb69 to 7575eb6 Compare January 7, 2025 14:37
@yarikbratashchuk yarikbratashchuk force-pushed the yarik/node-seggregation branch from 7575eb6 to a8529b5 Compare January 7, 2025 14:40
@yarikbratashchuk yarikbratashchuk force-pushed the yarik/node-seggregation branch 2 times, most recently from 668af87 to 13e71ab Compare January 9, 2025 12:31
@yarikbratashchuk yarikbratashchuk force-pushed the yarik/node-seggregation branch from 13e71ab to efa6ad2 Compare January 9, 2025 12:41
Copy link
codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 52.47525% with 48 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature/exec_api@584b187). Learn more about missing BASE report.

Files with missing lines Patch % Lines
cmd/rollkit/commands/run_node.go 0.00% 25 Missing ⚠️
types/serialization.go 50.00% 8 Missing and 4 partials ⚠️
block/manager.go 55.00% 9 Missing ⚠️
da/da.go 0.00% 0 Missing and 1 partial ⚠️
node/setup.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##             feature/exec_api    #1932   +/-   ##
===================================================
  Coverage                    ?   39.42%           
===================================================
  Files                       ?       72           
  Lines                       ?    11250           
  Branches                    ?        0           
===================================================
  Hits                        ?     4435           
  Misses                      ?     6197           
  Partials                    ?      618           

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

Copy link
Member
@tzdybal tzdybal left a comment

Choose a reason for hiding this comment

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

LGTM.

A lot of cleanup. We need to reintroduce tests (maybe rewrite them to some extend) ASAP (may be follow-up PR).

ChainID: h.ChainID(),
}
return Hash(abciHeader.Hash())
//abciHeader := cmtypes.Header{
Copy link
Member

Choose a reason for hiding this comment

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

How the godoc of this method is inaccurate - it's not ABCI-compatible anymore.

Copy link
Contributor
@tuxcanfly tuxcanfly left a comment

Choose a reason for hiding this comment

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

needs lint fixes.

Comment on lines -481 to +493
initialHeight := uint64(m.genesis.InitialHeight) //nolint:gosec
initialHeight := m.genesis.InitialHeight //nolint:gosec
Copy link
Contributor

Choose a reason for hiding this comment

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

ideally we'd have a defensive check here as InitialHeight might be -1:

if initial < 0 {
    return fmt.Errorf("initial height cannot be negative: %d", m.genesis.InitialHeight)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's of type uint64

Copy link
Member
@tzdybal tzdybal left a comment

Choose a reason for hiding this comment

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

LGTM. My comment is optional and might be resolved in follow-up PR.

require.NotNil(executor)

// Test GetTxs
txs, err := executor.GetTxs(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Is there any assertion on tx's? for example, that there are some?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, will go in followup

Copy link
Member

Choose a reason for hiding this comment

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

Please make a issue for this

@yarikbratashchuk yarikbratashchuk merged commit 5d72b03 into feature/exec_api Jan 21, 2025
23 of 24 checks passed
@yarikbratashchuk yarikbratashchuk deleted the yarik/node-seggregation branch January 21, 2025 23:22
@tac0turtle tac0turtle removed this from Rollkit Apr 24, 2025
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.

5 participants
0