Repository navigation
EVM Contract v2.0.0
Introduction
Vaulta EVM Contract v2.0.0 builds upon the previously introduced Gas Fee Algorithm architecture with key enhancements that improve fairness and updateability of transaction fees and introduces support for a separate account to pay gas for the call action.
Read on for more details.
New Features
Gas Fee Algorithm V3
PRs
- (847)[2.0] update silkworm to 2.0
Dual-Component Gas Fee Model
The Gas V3 algorithm introduces a dual-component gas fee model, separating transaction costs into:
- Computational Gas: Charges associated with CPU usage for executing operations.
- Storage Gas: Charges related to RAM usage for storing data.
Each component has its own pricing:
overhead_price: Cost per unit of computational gasstorage_price: Cost per unit of storage gas
To maintain compatibility with existing tools and interfaces, the system calculates a unified gas_price as the maximum of overhead_price and storage_price. The total gas_used is the sum of computational and storage gas, adjusted for any applicable discounts or refunds.
Gas Discount and Refund Mechanism
This release also introduces a transaction-level gas discount and refund mechanism that adjusts for scenarios where overcharging occurs in the new dual-component model.
- If the
inclusion_priceexceeds zero, miners receiveinclusion_price * computational_gasas their fee. Theinclusion_price * storage_gasportion is not collected in the final fee because the storage gas is discounted to effectively refund that excess fee back to the sender. - Depending on which of
overhead_priceorstorage_priceis greater, either discounts are applied to storage gas used or an explicit refund of gas usage occurs at the end of the transaction to prevent overcharging.
Safer Pricing Adjustments for Resource Cost Variability
Vaulta’s resource layer, specifically RAM, is subject to market-based pricing volatility. This release improves the handling for updates to gas pricing without breaking deployed application functionality.
The operation updtgasparam changes the gas usage for storage-manipulating operations and opcodes (such as SSTORE) and should only be used in select scenarios where RAM price changes drastically. Instead, setgasprices, can now be used to reflect RAM cost changes dynamically by updating storage_price with minimal disruption.
Allow separate account to pay gas for call action
PRs
- (835)[2.0] support calls with gas paid by other account.
A separate account can now pay the gas fees for a given user's call action. This feature supports advanced use cases such as gas obfuscation and sponsored transactions.
Building, compatibility, and upgrading
Building
The README in the evm-contract repository contains instructions on how to build Vaulta EVM Contract.
Compatibility and upgrading
Vaulta EVM Contract can be upgraded from the prior 1.x.x version by simply deploying the WASM and ABI.
Further details on changes since last release
Contributors
Special thanks to the contributors that submitted patches for this release:
Full list of changes since last release
PRs
- (720)[1.0 -> main] Bump 1.0.0-rc1 version
- (721)[1.0 -> main] Add basic test for non-EOS gas token
- (722)[1.0 -> main] Make gas_limit dynamic in handle_evm_transfer
- (723)[1.0 -> main] Bump 1.0.0-rc2 version
- (730)[1.0 -> main] Restrict rlp formats when decoding transaction
- (731)[1.0 -> main] Update silkworm 1.0.1
- (732)[1.0 -> main] Bump 1.0.0-rc3 version
- (736)[1.0 -> main] Check ingress fee precision
- (740)[1.0] Update silkworm 1.0.2
- (741) Revert "[1.0] Update silkworm 1.0.2"
- (743)[1.0 -> main] Update silkworm 1.0.2
- (747)[1.0 -> main] Bump 1.0.0-rc4 version
- (755)[1.0->main] Use upload-artifact v4 script in CI
- (756)[1.0 -> main] dynamic chainid
- (750) Add support for storage and overhead price
- (758)[1.0 -> main] Kayan 1.0 spring main
- (759) Fix configchange trace generation
- (764)[1.0 -> main] Bump 1.0.0 version
- (767)
cmake_minimum_required()beforeproject()to avoid cmake warning - (766) Add simple stack limit tests.
- (768)[1.0->main] merge changes removing the 1gwei gas price limit
- (771)[1.0.1 -> main] Change to BSL licensing scheme
- (775) Update for Spring main 1.1.0
- (773) fix cicd, update local_testnet_deployment_plan.md
- (782)[1.0->main] configurable ingress gas limit
- (779) Add gas parameters scaling tests
- (785)[1.0->main] forward ingress gas limit test
- (760) Return constant reference in value_promoter
- (789) Update silkworm (last gas v3)
- (791)[1.0 -> main] Enable EIP2 enforcement by default
- (792) Update silkworm with default EIP2 enforcing when evm_version >= 3
- (783) Fix gas price used in evm_contract::call_
- (794)[1.0 -> main] Bump 1.0.1 version
- (804)[1.0 -> main] Fix tests broken by spring 1.1
- (805)[1.0->main] Support multiple bridge transfers in one tx
- (806)[1.0->main] Add statistics
- (803) Refactor gas price handling
- (808)[1.1 -> main] Bump 1.1.0-rc1 version
- (817)[1.1 -> main] Bump 1.1.0 version
- (824)[1.0] Fix CI/CD cmake version
- (825)[1.0 -> 2.0] Fix CI/CD cmake version
- (822)[2.0] Update silkworm 2.0.0-rc1
- (821)[2.0] Bump 2.0.0-rc1 version
- (839)[2.0] Update README.md
- (835)[2.0] support calls with gas paid by other account.
- (841)[2.0] print inline evm tx error in hex
- (847)[2.0] update silkworm to 2.0
- (850)[2.0] Bump 2.0.0-rc2 version
- (856)[1.2] backport gas payer feature from release/2.0
- (858)[1.2 -> 2.0] forward 1.2 to 2.0
- (861)[1.2] bump version 1.2.0
- (862)[1.2->2.0] forward 1.2 to 2.0 (version bump)
- (867)[1.1] fix callback
- (872)[1.1] version bump 1.1.1
- (873)[1.1 -> 1.2] fix callback
- (874)[1.2->2.0] forward callback fix
- (876)[1.1->1.2] forward verbump
- (877)[1.2->2.0] forward verbump
- (879)[1.2] Relax strict inequality check on max_gas_cost
- (880)[1.2 -> 2.0] Relax strict inequality check on max_gas_cost
- (881)[2.0] Fix incorrect accounting of gas_fee_income in v3
- (885)[2.0] Fix r and s check in is_valid_signature
- (890)[2.0] Bump 2.0.0 version
Full Changelog: v1.1.0...v2.0.0