Skip to content
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

Сlean-ups after x/act updates #834

Merged
merged 21 commits into from
Sep 13, 2024
Merged

Сlean-ups after x/act updates #834

merged 21 commits into from
Sep 13, 2024

Conversation

artur-abliazimov
Copy link
Contributor

@artur-abliazimov artur-abliazimov commented Sep 12, 2024

Summary by CodeRabbit

  • New Features

    • Streamlined action handling mechanism by removing the Template and Approvers from the action structure.
    • Introduced MsgVoteForAction for enhanced action validation and processing.
  • Bug Fixes

    • Removed deprecated approval mechanisms, simplifying workflows and improving system efficiency.
  • Refactor

    • Significant restructuring of action messages and removal of approval-related code to enhance clarity and maintainability.
  • Chores

    • Removed migration logic and related files, indicating a shift in how migrations are managed within the system.

mn13 and others added 18 commits September 9, 2024 16:11
- Set expressions within MsgNewAction handling.
- Update registry initialization in space module, add missing rule ids
- UpdateSpace
- UpdateKey
…o-template-1

# Conflicts:
#	CHANGELOG.md
#	api/warden/act/v1beta1/events.pulsar.go
#	api/warden/act/v1beta1/query.pulsar.go
#	api/warden/act/v1beta1/tx.pulsar.go
#	api/warden/warden/v1beta3/events.pulsar.go
#	api/warden/warden/v1beta3/key.pulsar.go
#	api/warden/warden/v1beta3/space.pulsar.go
#	api/warden/warden/v1beta3/tx.pulsar.go
#	proto/warden/warden/v1beta3/events.proto
#	proto/warden/warden/v1beta3/key.proto
#	proto/warden/warden/v1beta3/space.proto
#	proto/warden/warden/v1beta3/tx.proto
#	tests/cases/approve_any_3_action.go
#	tests/cases/owner_approve_action.go
#	warden/x/act/keeper/actions.go
#	warden/x/act/keeper/msg_server_new_action.go
#	warden/x/act/keeper/query_rules.go
#	warden/x/act/types/v1beta1/errors.go
#	warden/x/act/types/v1beta1/events.pb.go
#	warden/x/act/types/v1beta1/query.pb.go
#	warden/x/act/types/v1beta1/registry.go
#	warden/x/act/types/v1beta1/tx.pb.go
#	warden/x/warden/keeper/msg_server_update_key.go
#	warden/x/warden/keeper/rules.go
#	warden/x/warden/types/v1beta3/events.pb.go
#	warden/x/warden/types/v1beta3/key.pb.go
#	warden/x/warden/types/v1beta3/space.go
#	warden/x/warden/types/v1beta3/space.pb.go
#	warden/x/warden/types/v1beta3/tx.pb.go
# Conflicts:
#	api/warden/act/v1beta1/action.pulsar.go
#	api/warden/act/v1beta1/events.pulsar.go
#	api/warden/act/v1beta1/tx.pulsar.go
#	api/warden/act/v1beta1/tx_grpc.pb.go
#	proto/warden/act/v1beta1/action.proto
#	proto/warden/act/v1beta1/tx.proto
#	warden/x/act/keeper/actions.go
#	warden/x/act/keeper/query_actions_by_address_test.go
#	warden/x/act/migrations/v3/store.go
#	warden/x/act/types/v1beta1/action.pb.go
#	warden/x/act/types/v1beta1/codec.go
#	warden/x/act/types/v1beta1/errors.go
#	warden/x/act/types/v1beta1/events.pb.go
#	warden/x/act/types/v1beta1/tx.pb.go
#	warden/x/warden/migrations/v3/store.go
@artur-abliazimov artur-abliazimov added protocol x-act Related to `x/act` module labels Sep 12, 2024
@artur-abliazimov artur-abliazimov self-assigned this Sep 12, 2024
Copy link
Contributor

coderabbitai bot commented Sep 12, 2024

Important

Review skipped

Review was skipped due to path filters

Files ignored due to path filters (42)
  • tests/testdata/snapshot-base/config/genesis.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-base/config/gentx/gentx-85d1e2d789cdc74d572a48b6de76477d9d1d79c9.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-base/config/node_key.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-base/config/priv_validator_key.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-base/keyring-test/711f0c3111779219015b37e235b7052b532bed3e.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-base/keyring-test/alice.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-base/keyring-test/b0b3c0320eee612d53ee503b33d8aa26deaa7423.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/config/genesis.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/config/gentx/gentx-365bc73652207de103158c338b33962456430b20.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/config/node_key.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/config/priv_validator_key.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/25f15d556cc34510107fe3bc0116bcdff066affd.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/6ed425becfe9fd99cd432cd0fb4d1ad55ee0dd7a.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/a5180d2e8edfa2f50ba335a86f342b1b28525161.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/bob.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/c4a77064d4b1e6bf5239b3f4a89d7fb257efd3e6.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/d0e1f31bd583c4ef018dc24a9ca69cdb58a21e0b.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/fd57801681c71651fc6775899bef4babab1ed1f5.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/val.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-keychain/keyring-test/writer.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/config/genesis.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/config/gentx/gentx-0af5fa98eea8f957a7ee0c30d6a1333e40382b65.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/config/node_key.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/config/priv_validator_key.json is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/0d16cb2369afa892c981bda57d01773fa17e15eb.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/4321b27aa17effe4688897cd2d7eca0866988f9b.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/5a8be402a8c139ccee4e241ae8400711db123b77.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/5eece0eadba63655897c60fdc3f40bfd9e12f5f8.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/6db1d127d817ee57621e13015d1d5ea63c6fa121.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/772e4eb79bdcd57db625471ae1deff5c0af164dd.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/7e2d7a6a9fba5f6d42a6ce681fddc97e9f36bd04.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/832cfcbe7f1b48c2cdfdf1cfa457315912258070.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/a24792af0f1dc2c531f1fe20d7dccb04bbfb4e88.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/ac147d880a5b72f0c84426791a34a84887d778b6.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/alice.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/bob.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/charlie.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/daf73545d76a45e987a023250e026c7e551c75c2.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/dave.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/ea55665ef2934e3e31e167f8beee40cf2acd1a2d.address is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/erin.info is excluded by !tests/testdata/**
  • tests/testdata/snapshot-many-users/keyring-test/frank.info is excluded by !tests/testdata/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory.

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

Walkthrough

Walkthrough

The changes in this pull request involve significant modifications to the action handling system, including the removal of the Template and Approvers from the Action structure. This restructuring simplifies action definitions and alters approval workflows. The Action message in the protocol buffer has been reorganized, and several related functionalities, including approval mechanisms, have been entirely removed. Additionally, migration logic for transitioning between versions has been eliminated, indicating a shift in how data management is handled within the system.

Changes

File Path Change Summary
CHANGELOG.md Summary of significant modifications to action handling, including removal of Template and Approvers.
proto/warden/act/v1beta1/action.proto Removed Approver message and reordered fields in Action message.
proto/warden/act/v1beta1/events.proto Removed EventApproveAction message, indicating a change in approval tracking.
proto/warden/act/v1beta1/tx.proto Removed ApproveAction RPC method and related message types, eliminating approval functionality.
warden/x/act/keeper/actions.go Removed code related to handling approvers and execution checks for actions.
warden/x/act/keeper/migrations.go Deleted migration logic for transitioning between versions in the act module.
warden/x/act/keeper/msg_server_approve_action.go Removed implementation of ApproveAction method, affecting action approval handling.
warden/x/act/keeper/msg_server_new_action.go Minor formatting change in NewAction function; no functional impact.
warden/x/act/types/v1beta1/action.go Removed functions related to creating and adding approvers in the Action struct.
warden/x/act/types/v1beta1/codec.go Modified message type registration, removing MsgApproveAction and adding MsgVoteForAction.
warden/x/act/types/v1beta1/errors.go Removed error declarations ErrSample and ErrApproverExists.
warden/x/warden/keeper/migrations.go Deleted migration logic for the warden protocol.
warden/x/warden/migrations/v3/store.go Removed functionality for migrating data between old and new store structures.
warden/x/warden/module/module.go Removed migration registration logic from the RegisterServices method.

Possibly related PRs

  • [x/act V2]: Add MsgVote handling #794: This PR introduces new types and methods for handling action votes, which aligns with the main PR's focus on modifying action handling and approval mechanisms.
  • 779 handle approve reject expressions #812: This PR enhances the handling of approval and rejection expressions, which directly relates to the changes made in the main PR regarding the removal of approvers and the restructuring of action definitions.
  • Test fixes #824: This PR modifies the logic of action execution to utilize expressions for approval and rejection, reflecting a shift in how actions are processed, similar to the changes in the main PR.

Suggested labels

bug


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 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.

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.

This comment has been minimized.

Copy link

vercel bot commented Sep 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
warden-help-center ⬜️ Ignored (Inspect) Visit Preview Sep 13, 2024 8:08am

@artur-abliazimov artur-abliazimov requested review from mn13, Pitasi and backsapc and removed request for Pitasi and backsapc September 12, 2024 15:25
@backsapc
Copy link
Contributor

backsapc commented Sep 13, 2024

LGTM, but we need to regenerate the genesis files for the integration tests

@backsapc backsapc merged commit e125ebd into main Sep 13, 2024
17 checks passed
@backsapc backsapc deleted the feature/x-act-v2/781-cleanups branch September 13, 2024 08:15
artur-abliazimov added a commit that referenced this pull request Sep 13, 2024
artur-abliazimov added a commit that referenced this pull request Sep 13, 2024
jjheywood pushed a commit that referenced this pull request Sep 13, 2024
* Revert "Revert "Сlean-ups after x/act updates (#834)" (#837)"

This reverts commit 8853239.

* Updated wardenjs (#839)

---------

Co-authored-by: backsapc <backsapce@hotmail.com>
@coderabbitai coderabbitai bot mentioned this pull request Sep 13, 2024
@coderabbitai coderabbitai bot mentioned this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants