Skip to content

chore: remove deprecated delegation module #259

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 2 commits into from
Apr 17, 2025

Conversation

mbreithecker
Copy link
Member

@mbreithecker mbreithecker commented Apr 17, 2025

Summary by CodeRabbit

  • New Features

    • Upgraded the application to version 2.1.0.
  • Refactor

    • Removed the Delegation module and all related functionality from the application.
    • Updated the application to use the new upgrade handler for version 2.1.
  • Chores

    • Cleaned up documentation and configuration files related to the Delegation module.
    • Updated build information to reflect the new version.
    • Removed legacy migration workflows and validator proof verification processes.

Copy link

coderabbitai bot commented Apr 17, 2025

Walkthrough

This change removes the entire delegation module and all related code, configuration, and documentation from the codebase. It eliminates the v2.0 upgrade handler and validator proof verification system, including all associated JSON proof files, scripts, and workflows. The application is updated to use a new v2.1 upgrade handler and store loader, which now deletes the delegation store. All references to the delegation module are removed from application configuration and initialization. Protobuf definitions and CLI commands for delegation are also deleted. The Makefile is updated to reflect version v2.1.0 and a new build timestamp.

Changes

Files/Paths (grouped) Change Summary
.github/workflows/all.yml, .github/workflows/migration.yml Removed the migration proof verification job and its reusable workflow from CI.
Makefile Updated VERSION to v2.1.0 and BUILD_TIME to a new timestamp.
app/app.go, app/app_config.go Removed all delegation module references and updated upgrade logic to v2.1.
app/upgrades/v2_0/*, app/upgrades/v2_0/validator-proofs/*, app/upgrades/v2_0/validator_mapping.go Deleted the entire v2.0 upgrade handler, validator mapping, and all validator proof data and verification scripts.
app/upgrades/v2_1/store.go, app/upgrades/v2_1/upgrade.go Added new v2.1 upgrade handler and store loader to delete the delegation store.
proto/kyve/delegation/module/module.proto, proto/kyve/delegation/v1beta1/*.proto Removed all protobuf definitions for the delegation module.
x/delegation/* Deleted the entire delegation module, including keeper, logic, CLI, types, genesis, and documentation/specification files.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant v2_1 Upgrade Handler
    participant StoreLoader

    App->>v2_1 Upgrade Handler: On upgrade to v2.1, call CreateUpgradeHandler
    v2_1 Upgrade Handler->>App: Run module migrations
    App->>StoreLoader: Call CreateStoreLoader with upgrade height
    StoreLoader->>App: Delete "delegation" store at upgrade
Loading

Possibly related PRs

  • KYVENetwork/chain#218: Removes the validator migration proof verification system and associated workflow, which this PR also deletes.
  • KYVENetwork/chain#216: Modifies delegation upgrade and migration logic, which is now entirely removed in this PR.
  • KYVENetwork/chain#209: Introduces Shared Staking, replacing delegation, which aligns with this PR's removal of the delegation module.

Suggested reviewers

  • troykessler

Poem

🐇
Farewell to delegation, your time is now done,
The codebase is lighter, v2.1 has begun!
Proofs and old scripts, all swept far away,
New upgrades are hopping in, ready to play.
With stores now deleted and modules so neat,
The rabbit is bouncing on swift, happy feet!
🥕

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

🪧 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.
  • @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.

troykessler
troykessler previously approved these changes Apr 17, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
CHANGELOG.md (2)

17-17: Heading level should increment by one
The "Unreleased" heading jumps from level 1 (#) directly to level 3 (###). For better markdown structure, it should be level 2 (##).

- ### Unreleased
+ ## Unreleased
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

17-17: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


19-19: Add missing determiner in changelog entry
For clarity, prepend “the” to the entry description.

- - [#259](https://github.com/KYVENetwork/chain/pull/259) Remove deprecated delegation module.
+ - [#259](https://github.com/KYVENetwork/chain/pull/259) Remove the deprecated delegation module.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~19-~19: You might be missing the article “the” here.
Context: ....com//pull/259) Remove deprecated delegation module. ### [v2.0.0](https:...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7e3145a and d134e98.

📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
CHANGELOG.md

[uncategorized] ~19-~19: You might be missing the article “the” here.
Context: ....com//pull/259) Remove deprecated delegation module. ### [v2.0.0](https:...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md

17-17: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Summary
  • GitHub Check: test / test
  • GitHub Check: lint / golangci

@mbreithecker mbreithecker merged commit 3c64c12 into main Apr 17, 2025
4 checks passed
@mbreithecker mbreithecker deleted the mbreithecker/cleanup-delegation-module branch April 17, 2025 08:57
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.

2 participants