Skip to content

PVM diff tests fail after revive weight update #276

@mokita-j

Description

@mokita-j

The following tests in diff testing are failing on PVM after updating revive weights:

    "fixtures/solidity/simple/yul_instructions/revert.sol::5::Y M0": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::5::Y M3": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::19::Y M0": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::19::Y M3": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::33::Y M0": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::33::Y M3": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::47::Y M0": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::47::Y M3": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::61::Y M0": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::61::Y M3": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::75::Y M0": "Failed",
    "fixtures/solidity/simple/yul_instructions/revert.sol::75::Y M3": "Failed"

*Note: Added the tests to revive-dev-node-polkavm-resolc.json)

Root cause:
The ref_time_per_fuel value increased significantly, but evm_max_extrinsic_weight (the dry-run weight ceiling) remained unchanged. Transactions that previously fit within the gas limit now revert with OutOfGas on PVM.
ref_time_per_fuel is calculated as the following:
ref_time_per_fuel = instr(1) - instr(0) - (instr_empty_loop(1) - instr_empty_loop(0))
instr and instr_empty_loopweights increased 14% and 2% respectively. Thus, ref_time_per_fuel increased 30% which reduces the total fuel available for PVM execution.

Possible fixes:

  • Exclude these tests from CI
  • Revisit the ref_time_per_fuel formula. A 14% swing in one benchmark input leads to a 30% swing in fuel pricing.

Metadata

Metadata

Assignees

Labels

PVMProblem occurs at the execution stage for PVMbug

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions