feat: introduce gas_floor_base_cost for EIP-7623 compliance#101
feat: introduce gas_floor_base_cost for EIP-7623 compliance#101mrLSD merged 3 commits intofeat/gasometr-refactoringfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes introduce a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@CodeRabbit full review |
✅ Actions performedFull review triggered. |
| if config.has_floor_gas { | ||
| // According to EIP-2028: non-zero byte = 16, zero-byte = 4 | ||
| // According to EIP-7623: tokens_in_calldata = zero_bytes_in_calldata + nonzero_bytes_in_calldata * 4 | ||
| let tokens_in_calldata = (zero_data_len + non_zero_data_len * 4) as u64; |
There was a problem hiding this comment.
Maybe we should use saturating arithmetic operations here just to be safe.
…or gas calculations
3f57395 to
4810147
Compare
* Gasometr: refactoring and improvements * Bump version to: v2.2.1 * Extend doc comment for calculate_intrinsic_gas_and_gas_floor * feat: introduce gas_floor_base_cost for EIP-7623 compliance (#101) * feat: introduce gas_floor_base_cost for EIP-7623 compliance * fix: replace simple arithmetic operations with saturating_* analogs for gas calculations * chore: remove gas_floor_base_cost constant --------- Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev>
* Feat: gasometr refactoring and improvements (#100) * Gasometr: refactoring and improvements * Bump from version: v2.2.1 * Extend doc comment for calculate_intrinsic_gas_and_gas_floor * feat: introduce gas_floor_base_cost for EIP-7623 compliance (#101) * feat: introduce gas_floor_base_cost for EIP-7623 compliance * fix: replace simple arithmetic operations with saturating_* analogs for gas calculations * chore: remove gas_floor_base_cost constant --------- Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev> * Fix typo --------- Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev>
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.