Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

refactor(x/evm): move precommit to end block #1271

Merged
merged 1 commit into from
Nov 2, 2023
Merged

refactor(x/evm): move precommit to end block #1271

merged 1 commit into from
Nov 2, 2023

Conversation

itsdevbear
Copy link
Contributor

@itsdevbear itsdevbear commented Nov 2, 2023

Summary by CodeRabbit

Refactor:

  • The Precommit function in the Keeper struct and AppModule has been renamed to EndBlock, maintaining the same functionality and error return type. This change is part of an internal code restructuring and should not affect end-user experience.

Chores:

  • The EVM module has been moved from the Precommiters list to the EndBlockers list in the MakeAppConfig function. This is a backend adjustment and should not impact the end-user directly.

@itsdevbear itsdevbear marked this pull request as ready for review November 2, 2023 17:48
Copy link

coderabbitai bot commented Nov 2, 2023

Walkthrough

The changes primarily revolve around the transition of the EVM module from a precommiter to an end blocker in the Cosmos SDK. The Precommit function has been renamed to EndBlock across multiple files, and the EVM module is now included in the EndBlockers list.

Changes

File Path Summary
cosmos/x/evm/.../abci.go The Precommit function in the Keeper struct has been renamed to EndBlock.
cosmos/x/evm/module.go The AppModule no longer implements appmodule.HasPrecommit. The Precommit function has been renamed to EndBlock.
e2e/testapp/.../app_config.go The evmtypes.ModuleName is added to the EndBlockers list, and the Precommiters list is removed.

🐇🍂

In the season of fall, when leaves take their flight,
Code changes dance in the soft autumn light.
From precommit to end block, the EVM takes its stride,
In the world of Cosmos, it's an exciting ride.

The rabbit hops along, under the moon's gentle glow,
Celebrating the changes, in the code's ebb and flow.
So here's to the end block, may it run without error,
To the rhythm of code, we're all in this together! 🍁🌙


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.json

@itsdevbear itsdevbear requested a review from calbera November 2, 2023 17:50
@itsdevbear itsdevbear merged commit 06b11bf into main Nov 2, 2023
8 checks passed
@itsdevbear itsdevbear deleted the pc-eb branch November 2, 2023 17:51
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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between bcbdd0d and 05f33b1.
Files selected for processing (3)
  • cosmos/x/evm/keeper/abci.go (1 hunks)
  • cosmos/x/evm/module.go (2 hunks)
  • e2e/testapp/app_config.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • e2e/testapp/app_config.go
Additional comments: 3
cosmos/x/evm/keeper/abci.go (1)
  • 28-34: The function name has been changed from Precommit to EndBlock. Ensure that all calls to this function throughout the codebase have been updated to match the new function name.
cosmos/x/evm/module.go (2)
  • 45-51: The AppModule struct no longer implements the appmodule.HasPrecommit interface. This is consistent with the changes made in the abci.go file where the Precommit function was renamed to EndBlock. Ensure that this change does not break any dependencies that might still be expecting the AppModule to implement the appmodule.HasPrecommit interface.

  • 134-137: The Precommit function has been renamed to EndBlock and now returns an error. This change is consistent with the overall shift of the EVM module's operation from the precommit stage to the end block stage in the Cosmos SDK lifecycle. Ensure that all calls to this function throughout the codebase have been updated to match the new function name.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant