mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## 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. |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||