-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Labels
Description
Description
This issue tracks internal audit progress.
Areas to Audit
- EVM module initialization
- EVM authenticator
- EVM execute call
- EVM RPC handlers
Items to Fix by Severity
Critical
-
StorageInspectorrebates gas costs as they happen (since these accesses are charged by the SDK later). This means that a caller can run a (roughly) infinite loop of SSTOREs, causing the client to hang. Instead, costs should be rebated after the EVM returns. Move EVM storage rebate after execution #2291
High
- No practical gas limit is enforced on EVM txs when the paymaster is active. We should set a configurable hard limit on EVM tx consumption, defaulting to 30M gas. Re-enable ETH block gas limit #2256
Moderate:
- No way to update
EvmRuntimeConfigafter genesis: Allow updating EVM chain configs #2292- Support add/remove allowed contract deployers
- Support modifying
hardforks,limit_contract_code_sizeandblock_gas_limit. - Determine if
coinbaseaddress is used. If so, determine whether to allow changes.
- EVM Authenticator accepts all tx types and coerces them to EIP-1559. Only EIP-1559 txs should be accepted Reject txs other than EIP-1559 #2294
-
CfgEnv::memory_limitshould be set since we've raised the gas limit significantly. 50MB seems reasonable. Set memory limit on EVM as fallback if gas limit is raised #2293 - Our use of
CfgEnv.disable_balance_checksis incorrect. This option should be left with its default value Re-enable ETH block gas limit #2256 - Rollup may panic if exactly the right amount of funds is sent to cover the prechecks. Add test for money printing vuln. Fix panic at genesis #2270
Low
-
validate_chain_iddoesn't respect EIP-7702 (should accept0) Allow chainid 0 for compatibility with EIP7702 #2295 - We allow the code_hash to be set to an unrelated value for accounts set at genesis. We should compute the hash from the code instead.
-
RawTx,FullyBakedTx, andRlpEvmTransactionare all missing length limits. SetRawTxandFullyBakedTxto 1MB. LeaveRlpEvmTransactionas is. Add limits onRawTxandFullyBakedTxsizes #2296 - Re-examine TODOS in EVM DB; should be fixed, removed, or marked as non-security critical
-
TODO move to new_raw_with_hash for better performance -
TODO: Here we generate a default account and set the balance from bank
-
- (Optional)
EvmDb::code_by_hashdoesn't charge gas when the code is in temp_cache. This technically violates the API of the temp_cache, which states that using the cache should be indistinguishable from accessing storage because the cache can be cleared at any time and for any reason - (Optional) Add BLS precompile support
Won't Fix Before Ale Mainnet
- Access lists are silently dropped by the transaction deserializer
- Authorization lists are silently dropped by the transaction deserializer
-
CfgEnvconstructor for ETH call doesn't matchaccept_tx. -
SovHandler::validate_against_state_and_deduct_callerdoesn't enforce EIP-3607 or 7702. -
SovHandler::validate_against_state_and_deduct_callerwon't get support for new EIPs as they are added to Reth.
Open Questions
- Why do we pass
RlpEvmTransactionto the EVM module rather than, say,Signed<Eip1559Tx>. Answer: We want the exact tx bytes from the user to go on chain - Do we need to support EIP-7702? If so, what changes are needed besides enabling authorization lists and un-gating the tx type?
Reactions are currently unavailable