Skip to content

fix: skip gas settlement when virtual calls do not charge gas - #3621

Merged
peilun-conflux merged 2 commits into
Conflux-Chain:masterfrom
peilun-conflux:codex/fix-virtual-gas-refund
Oct 28, 2026
Merged

peilun-conflux merged 2 commits into
Conflux-Chain:masterfrom
peilun-conflux:codex/fix-virtual-gas-refund

Conversation

@peilun-conflux

@peilun-conflux peilun-conflux commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Virtual calls with gas charging disabled still refunded gas to the sender and deducted fees from the total eSpace balance. The uncharged refund could overflow the sender's balance, causing an eth_call panic.

Guard both settlement operations with the existing charge_gas flag. Add regression tests for the overflow and normal gas charging.


This change is Reviewable

@ChenxingLi ChenxingLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ChenxingLi reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on peilun-conflux).

@peilun-conflux
peilun-conflux merged commit 2cb1658 into Conflux-Chain:master Oct 28, 2026
12 checks passed
@peilun-conflux
peilun-conflux deleted the codex/fix-virtual-gas-refund branch October 28, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants