Skip to content

Conversation

@ukint-vs
Copy link
Member

  • Track the largest can_charge_gas check inside the builtin pallet (std-only) and expose it through BuiltinDispatcherFactory.
  • Consume the stored hint in calculate_gas_info_impl so RPC estimation keeps the declared gas limit while still reporting the actual burn.
  • Add related tests

@gear-tech/dev

@ukint-vs ukint-vs requested a review from breathx September 29, 2025 05:54
@ukint-vs ukint-vs self-assigned this Sep 29, 2025
@ukint-vs ukint-vs added A0-pleasereview PR is ready to be reviewed by the team C0-bug Something isn't working labels Sep 29, 2025
@semanticdiff-com
Copy link

semanticdiff-com bot commented Sep 29, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  pallets/gear/src/builtin.rs  51% smaller
  pallets/gear-builtin/src/mock.rs  9% smaller
  pallets/gear-builtin/src/lib.rs  1% smaller
  pallets/gear-builtin/src/tests/gas.rs  0% smaller
  pallets/gear-builtin/src/tests/mod.rs  0% smaller
  pallets/gear-builtin/src/tests/staking.rs  0% smaller
  pallets/gear/src/runtime_api.rs  0% smaller

Copy link
Member

@breathx breathx left a comment

Choose a reason for hiding this comment

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

This should work in wasm as well.

Example fix: if call is in RPC propagate some reserve + unreserve notes, so they will have actual no-op action but modify necessary gas

@breathx breathx added A3-gotissues PR occurred to have issues after the review and removed A0-pleasereview PR is ready to be reviewed by the team C0-bug Something isn't working labels Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-gotissues PR occurred to have issues after the review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants