Skip to content
Snippets Groups Projects

[ante] use infinite gas meter for transactions

Merged akrokr requested to merge akh/infinite_gas into develop

Fixes #1549 (closed)

We do not use cosmos gas but our app still consumes gas and panics if the signer does not specify enough. Gas-wanted can be set to anything (it's fake, not used) and we've had issues in the past where we've needed to increase the recommended fake gas to avoid panics.

This wraps the ctx used for transaction processing with an infinite gas meter. It avoids out-of-gas panics in tx processing and also allows implementation changes to be made without consensus failure as long as the final state of the block is correct.

Note on regression tests: I set the gas wanted to 0 for tests. Previous version migrations which backdate their version then fail since they need gas. So I wired in an optional gas field for reg txs similar to sequence number. This works but if there's a better way, I'm all ears.

Edited by akrokr

Merge request reports

Merge request pipeline #916479413 passed

Merge request pipeline passed for d7f62124

Test coverage 53.90% (0.00%) from 1 job
Deployed to integ‎ration‎ 1 year ago

Merged by PlutoPluto 1 year ago (Jun 29, 2023 9:26pm UTC)

Loading

Pipeline #916499183 passed

Pipeline passed for 04bca25b on develop

Test coverage 53.90% (0.00%) from 1 job
Deployed to integ‎ration‎ 1 year ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading