Skip to content

chore(ism): charge gas for signature verification#154

Merged
mbreithecker merged 4 commits intomainfrom
mbreithecker/gas-consumption
Feb 11, 2026
Merged

chore(ism): charge gas for signature verification#154
mbreithecker merged 4 commits intomainfrom
mbreithecker/gas-consumption

Conversation

@mbreithecker
Copy link
Copy Markdown
Member

Charge gas proportional the the signatures the ISM needs to verify.

closes #119

@mbreithecker mbreithecker requested a review from Copilot January 23, 2026 14:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds gas consumption for signature verification in Interchain Security Modules (ISMs). The changes charge 1000 gas units per signature verified in both MessageIdMultisigISM and MerkleRootMultisigISM implementations.

Changes:

  • Added gas metering that charges 1000 gas per signature verification in ISM verify methods
  • Updated test files to use proper SDK context instead of empty context for gas tracking
  • Added test assertions to verify correct gas consumption

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
x/core/01_interchain_security/types/message_id_multisig.go Added gas consumption logic for signature verification
x/core/01_interchain_security/types/merkle_root_multisig.go Added gas consumption logic for signature verification
x/core/01_interchain_security/types/message_id_multisig_test.go Updated tests to use KeeperTestSuite for proper context initialization
x/core/01_interchain_security/types/merkle_root_multisig_test.go Updated tests to use KeeperTestSuite and added gas consumption assertions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread x/core/01_interchain_security/types/merkle_root_multisig_test.go Outdated
Copy link
Copy Markdown
Collaborator

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

lgtm!

@mbreithecker mbreithecker merged commit 96cfe94 into main Feb 11, 2026
1 check passed
@mbreithecker mbreithecker deleted the mbreithecker/gas-consumption branch February 11, 2026 12:55
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.

Signatures should consume gas inside Verify func of ISM

3 participants