Add missing 63/64 rule documentation and a test (#462)

- Prominently point out the important differences of the `pallet-revive`
runtime.
- Add a test case illustrating the problem.

See also: https://github.com/paritytech/contract-issues/issues/257

---------

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus authored and GitHub committed 2026-01-27 19:43:14 +01:00
1 parent 99b73ec083
commit 95ae938ddf
29 files changed
+172 -30

No files matched your search

+12
View File
@@ -2,6 +2,18 @@
Hello and a warm welcome to the `revive` Solidity compiler book!
> [!WARNING]
>
> Solidity on PVM is running on the `pallet-revive` runtime. This introduces **observable semantic differences** in comparison with the EVM.
>
> Study the [differences](https://paritytech.github.io/revive/user_guide/differences.html) section carefully. **Ignoring these differences may lead to defunct contracts.**
>
> Notable examples:
> - The 63/64 gas rule isn't implemented in the pallet (introduces potential DoS vector when calling other contracts)
> - Contract instantiation works differently (by hash instead of by code)
> - The gas model implemented by `pallet-revive` differs from Ethereum
> - The heap size is fixed instead of gas-metered and there's a fixed amount of stack size (contracts working fine on EVM may trap on PVM)
## Target audience
- **Solidity dApp developers** should read the [user guide](./user_guide.md). Solidity on PolkaVM introduces important differences to EVM which should be well understood.