EIP-7923: Linear, Page-Based Memory Costing

This EIP seems to have an issue similar to what I described in EIP-7971: Hard limit and cost reduction for transient storage allocation - #2 by yoavw

The EIP defines MAXIMUM_MEMORY_SIZE = 64 * 1024 * 1024 and says “A transaction-global memory limit is imposed. If the number of pages allocated in a transaction exceeds MAXIMUM_MEMORY_SIZE // PAGE_SIZE (i.e., 16384), an exceptional halt should be raised.”

In transactions that include calls from different users (e.g. EIP-7702 batching relayer, ERC-4337 bundler, intent solver, crosschain bridges), the first call could maliciously allocate 64MB-ε, and move the solidity memory pointer back to its original position so it cannot be detected by other calls. This will cause an exceptional halt in other calls.

There’s no GAS-like opcode to check the current memory allocation, and no CALL param to limit the amount of memory a call may use. Therefore no way for calls to defend themselves.

For any transaction-wide “shared budget”, we need an opcode and a way to limit the resource use per CALL.

Can we avoid this altogether, and just use gas pricing to mitigate DoS instead of introducing new shared budgets?