Skip to content

Fixed discrepancies in GetGasEstimate() result#18

Merged
8lecramm merged 1 commit into
DEROFDN:community-devfrom
Alumn0:fix/gasestimate
Jun 7, 2026
Merged

Fixed discrepancies in GetGasEstimate() result#18
8lecramm merged 1 commit into
DEROFDN:community-devfrom
Alumn0:fix/gasestimate

Conversation

@Alumn0
Copy link
Copy Markdown

@Alumn0 Alumn0 commented Jun 7, 2026

Description

GetGasEstimate()'s results are incorrect. One reason for that is that the dvm simulator used to estimate fees is missing the current block height / topo height, which leads to discrepancies, specifically when a smart contract stores the current block height.
This update adds a function parameter for the block height to SimulatorInitialize() and sets the corresponding property on the Simulator object.

Type of change

Please select the right one.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This will require a HardFork to be enabled

Which part is impacted ?

  • Wallet
  • Daemon
  • Miner
  • Explorer
  • Simulator
  • Misc (documentation, comments, text...)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

License

I am contributing & releasing the code under DERO Research License (which can be found here).

@8lecramm 8lecramm self-assigned this Jun 7, 2026
@8lecramm 8lecramm merged commit a17f929 into DEROFDN:community-dev Jun 7, 2026
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