Skip to content

Conversation

@randy-cro
Copy link
Contributor

@randy-cro randy-cro commented Nov 13, 2025

Description

Previous staking optimizations were causing AppHash mismatches across nodes.
To address this issue, two key changes were introduced:

  1. Use of an in-memory KV store to manage staking caches.
    Reference

  2. Implementation of fixed gas consumption for staking-related messages to ensure consistent gas usage.
    Reference

⚠️ Version Note:
As this is a v1.5 patch, all staking-related operations will be rejected at the antehandler level.
This serves as a warning for node operators about potential AppHash mismatches due to inconsistent gas consumption.

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

@randy-cro randy-cro requested a review from a team as a code owner November 13, 2025 08:19
@randy-cro randy-cro requested review from XinyuCRO and calvinaco and removed request for a team November 13, 2025 08:19
@randy-cro randy-cro changed the base branch from main to release/v1.5.x November 13, 2025 08:20
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

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.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/staking-optimization-1.5.x-patch

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot removed the nix label Nov 13, 2025
@randy-cro randy-cro force-pushed the fix/staking-optimization-1.5.x-patch branch 9 times, most recently from a252593 to 287bb38 Compare November 20, 2025 03:54
@randy-cro randy-cro changed the base branch from release/v1.5.x to release/v1.6.x November 20, 2025 03:55
@randy-cro randy-cro changed the title fix: staking optimization v1.5.x patch fix: staking optimization v1.6.x patch Nov 20, 2025
@randy-cro randy-cro force-pushed the fix/staking-optimization-1.5.x-patch branch from 287bb38 to 9128ce5 Compare November 21, 2025 11:11
@randy-cro randy-cro changed the base branch from release/v1.6.x to release/v1.6.x-optstaking November 21, 2025 12:42
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/gogoproto v1.7.2
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is there so many dependency updates?

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