datahaven/operator/runtime/mainnet
Ahmad Kaouk 0b636e0d79
fix: Fix EVM gas-to-weight handling for call/create (#266)
## Summary
- Replace the legacy “estimated transaction length” heuristic in the EVM
`call` runtime API across mainnet, stagenet, and testnet with a direct
`GasWeightMapping::gas_to_weight` lookup. The resulting weight is now
always forwarded to the runner (`Some(weight_limit)`), so zero-gas
requests no longer slip through without a cap.
- Update the EVM `create` runtime API the same way. Previously it always
passed `None` for `weight_limit`, effectively running contract-deploy
dry-runs without any weight ceiling; we now map the gas limit and pass
the explicit weight instead.
- For both `call` and `create`, set the proof-size base cost to `None`
to match our solo-chain assumption that PoV size isn’t budgeted in these
simulated paths.

## Why
We use these runtime APIs when serving `eth_call` and `eth_estimateGas`.
The old behavior meant a zero gas limit (or any `create` dry-run) ran
with unlimited weight, diverging from what the extrinsic path enforces.
Passing the mapped weight—zero included—keeps RPC simulations aligned
with real execution, while dropping the proof-size estimate removes a
guessy value we don’t charge on-chain.
2025-10-30 17:09:15 +02:00
..
src fix: Fix EVM gas-to-weight handling for call/create (#266) 2025-10-30 17:09:15 +02:00
tests fix: add explicit sovereign account balance check in unlock_tokens (#253) 2025-10-30 11:19:14 +00:00
build.rs feat: Standardize currency system to HAVE token with Wei-based units (#130) 2025-08-18 13:26:30 +02:00
Cargo.toml feat: add slashing support (#242) 2025-10-29 10:43:55 +00:00