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

Add out-of-gas recovery logic to Wasm Hooks #4195

Open
nicolaslara opened this issue Feb 1, 2023 · 2 comments
Open

Add out-of-gas recovery logic to Wasm Hooks #4195

nicolaslara opened this issue Feb 1, 2023 · 2 comments
Assignees

Comments

@nicolaslara
Copy link
Contributor

Background

Relayers batch IBC messages in an SDK multi-message. If one of these messages contains a wasm-hook execution (or lifecycle callback) it will execute a contract. Executing a contract means the expected gas of an IBC message execution is no longer "constant", but may vary depending on the contract's implementation. As a consequence, calling a contract with excesive gas consumption may fail the whole TX batch.

This can lead to a temporary DoS for message transfers and puts the onus on the relayers to manage it. We should ensure that either:

or a combination of the above.

Suggested Design

There are still open design questions here. My opinion is that improving multi-message and ensuring that relayers can deal with rogue packets is the right solution here,

Acceptance Criteria

  • Only offending transactions should fail and others shouldn't be affected
  • There is no expense risk for relayers on high gas
@nicolaslara
Copy link
Contributor Author

@ValarDragon Added this ticket to track the out-of-gas issue. Can you add your notes from the call here when you get a chance?

@nicolaslara
Copy link
Contributor Author

This is an example from the ibc codebase on how to use a custom gas meter for the contract calls: https://github.com/cosmos/ibc-go/blob/main/modules/core/keeper/msg_server.go#L451

@nicolaslara nicolaslara self-assigned this Feb 16, 2023
@nicolaslara nicolaslara moved this from Needs Triage 🔍 to In Progress🏃 in Osmosis Chain Development Feb 16, 2023
@p0mvn p0mvn removed the T:ice-box label Mar 2, 2023
@nicolaslara nicolaslara moved this from In Progress🏃 to Needs PR Review in Osmosis Chain Development Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs PR Review
Development

No branches or pull requests

2 participants