Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reproduce starge gas metering behavior on exhaustion:
``` $ cd runtime/near-vm-runner $ cargo test --release --lib -- tests::global_gas_test --exact --nocapture Compiling near-vm-runner v3.0.0 (/home/matklad/projects/nearcore/runtime/near-vm-runner) Finished release [optimized] target(s) in 4.11s Running /home/matklad/projects/nearcore/target/release/deps/near_vm_runner-f0eca327e6895b3d running 1 test cpu_ram_soak_test1: 125.684196ms FunctionCallError(HostError(GasLimitExceeded)) cpu_ram_soak_test2: 125.702125ms FunctionCallError(HostError(GasLimitExceeded)) cpu_ram_soak_test3: 125.205206ms FunctionCallError(HostError(GasLimitExceeded)) test tests::global_gas_test ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 61 filtered out; finished in 0. $ cargo test --features protocol_feature_wasm_global_gas_counter --release --lib -- tests::global_gas_test --exact --nocapture Finished release [optimized] target(s) in 0.11s Running /home/matklad/projects/nearcore/target/release/deps/near_vm_runner-149fc9ad00e9397e running 1 test cpu_ram_soak_test1: 43.372139ms FunctionCallError(HostError(GasLimitExceeded)) cpu_ram_soak_test2: 431.044328ms FunctionCallError(HostError(GasLimitExceeded)) cpu_ram_soak_test3: 4.217799331s FunctionCallError(HostError(GasLimitExceeded)) test tests::global_gas_test ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 61 filtered out; finished in 4.76s ``` notice how in the second case the runtime increases. That's probably a bug in the new gas metering. I suspect some integer overflow -- it only manifests with 10^18 gas.
- Loading branch information