Skip to content

Conversation

@d1r1
Copy link

@d1r1 d1r1 commented Oct 6, 2025

Context: Benchmarks show WASM instructions are ~20x faster than EVM instructions, not 1000x as originally estimated

Change: Updated FUEL_DENOM_RATE from 1000 to 20 to align with measured performance characteristics

Rationale: Original 1000:1 ratio was placeholder value. New 20:1 ratio based on empirical benchmarking maintains gas equivalence with EVM while accurately reflecting execution costs

Verification: All fuel cost constants in fuel_procedure.rs scaled proportionally (divided by 50). Test assertions updated to expect new gas consumption values

BREAKING CHANGE: Existing WASM contracts with explicit ConsumeFuel() calls will consume 50x more gas per unit of fuel. System builtin operations remain gas-equivalent to EVM

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 6, 2025

CodSpeed Performance Report

Congrats! CodSpeed is installed 🎉

🆕 165 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@d1r1 d1r1 force-pushed the v82-patched branch 3 times, most recently from 02cd9a7 to c170628 Compare October 23, 2025 20:53
d1r1 added 2 commits November 17, 2025 13:56
…atio

Context: Benchmarks show WASM instructions are ~20x faster than EVM instructions, not 1000x as originally estimated

Change: Updated FUEL_DENOM_RATE from 1000 to 20 to align with measured performance characteristics

Rationale: Original 1000:1 ratio was placeholder value. New 20:1 ratio based on empirical benchmarking maintains gas equivalence with EVM while accurately reflecting execution costs

Verification: All fuel cost constants in fuel_procedure.rs scaled proportionally (divided by 50). Test assertions updated to expect new gas consumption values

BREAKING CHANGE: Existing WASM contracts with explicit ConsumeFuel() calls will consume 50x more gas per unit of fuel. System builtin operations remain gas-equivalent to EVM
Context: FUEL_DENOM_RATE was duplicated between fluentbase and revm. Testnet uses legacy rate (1000), correct rate is 20.
Change: Removed FUEL_DENOM_RATE constant from interpreter. Inlined fuel denomination logic in handler/validation.rs with 'fluent-testnet' feature for conditional compilation. Deleted unused Gas methods record_denominated_cost() and record_denominated_refund(). Added cfg-if dependency.
Rationale: Eliminates constant duplication - fluentbase remains source of truth. Feature flag enables testnet backward compatibility while defaulting to correct rate for new deployments.
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