-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…2353) # Description This PR does the following: (cf. #2174 (comment)) 1. Let's deprecate `gas_adjustment`. The name of the setting does not properly convey what is used for imho, and its semantics (multiply the estimated gas by the value and add it to the estimation) are confusing. 2. Instead, replace it with a `gas_multiplier` setting, with the following semantics: take the estimated gas and multiply it by the value of the setting. Meaning that when we previously had `gas_adjustment = 0.1`, which increases the gas by 10%, we would now have `gas_multiplier = 1.1`. This PR enforces a lower bound of `1.0` for the new setting but no upper bound so that people are free to use as high gas as they want. # Commits * Deprecate `gas_adjustment` in favor of new `gas_multiplier` setting * Add changelog entry * Add tests for `adjust_gas` * Fix `unused_variable` warning * Improve tests * Fix typo in test code * Use 1.1 gas_multiplier in mock tests * Return zero when `gas_amount` is zero, instead of max_gas * Short-circuit when gas_amount = 0 or gas_multiplier = 1
- Loading branch information
Showing
16 changed files
with
200 additions
and
61 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/breaking-changes/ibc-relayer-cli/2174-gas-multiplier.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Deprecate `gas_adjustment` setting in favor of new `gas_multiplier` setting | ||
([#2174](https://github.com/informalsystems/ibc-rs/issues/2174)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.