fix: ics02 and ics20 gas calculation#1164
Conversation
Greptile SummaryThis PR fixes zero-gas DoS vulnerabilities in the ICS02 and ICS20 precompiles by ensuring KV store operations are properly metered. The ICS02 constructor now uses
Confidence Score: 5/5Safe to merge — both changes are straightforward removals of zero-gas overrides, backed by a new unit test and a passing integration test with an updated gas budget. The ICS02 constructor change is a one-line swap to a well-known SDK helper, and the ICS20 removal eliminates code whose defer-restore was already a no-op. The new unit test explicitly pins the cost formula, and the integration test confirms the real-world gas budget. No new code paths are introduced that could regress unrelated behavior. No files require special attention. Important Files Changed
|
|
@greptile review |
This reverts commit beb4078.
|
@greptile review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1164 +/- ##
==========================================
- Coverage 64.31% 64.20% -0.12%
==========================================
Files 336 336
Lines 24054 24063 +9
==========================================
- Hits 15471 15450 -21
- Misses 6973 6991 +18
- Partials 1610 1622 +12
🚀 New features to boost your workflow:
|
mattac21
left a comment
There was a problem hiding this comment.
should add a changelog entry for this. also do you think we need to note this in the upgrade guide?
|
@mergify backport to release/v0.7.x |
❌ No backport have been createdDetails
GitHub error:
|
Replaces zero-valued gas configs with instantiated values in ICS02, and charges for gas in ICS20.