Skip to content

Commit 552b4f5

Browse files
committed
add documentation to readme and remove a line of docs
1 parent 2d76e7b commit 552b4f5

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,24 @@ Custom RPC namespace `txpoolExt` that provides:
5555
- Configurable byte limit for transaction retrieval (default: 1.98 MB)
5656
- Efficient iteration that stops when reaching the byte limit
5757

58+
### 6. Base Fee Redirect
59+
60+
On vanilla Ethereum, EIP-1559 burns the base fee. For custom networks, ev-reth can redirect the base fee to a designated address:
61+
62+
- Intercepts base fee during EVM execution via custom handler
63+
- Credits `base_fee_per_gas * gas_used` to a specified recipient
64+
- Configurable activation height for safe network upgrades
65+
- See [Configuration](#redirecting-the-base-fee-custom-networks-only) for setup details
66+
67+
### 7. Custom Contract Size Limit
68+
69+
Ethereum enforces a 24KB contract size limit per [EIP-170](https://eips.ethereum.org/EIPS/eip-170). For networks requiring larger contracts:
70+
71+
- Configurable maximum contract code size (e.g., 128KB)
72+
- Activation height support for safe network upgrades
73+
- Standard EIP-170 limit applies before activation
74+
- See [Configuration](#custom-contract-size-limit) for setup details
75+
5876
## Installation
5977

6078
### Prerequisites
@@ -251,6 +269,36 @@ Implementation details:
251269
- No runtime environment variables are required; the chainspec carries the policy alongside other fork settings
252270
- When not configured, the EVM operates normally with standard fee burning
253271

272+
### Custom Contract Size Limit
273+
274+
By default, Ethereum enforces a 24KB contract size limit per [EIP-170](https://eips.ethereum.org/EIPS/eip-170). If your network requires larger contracts, `ev-reth` supports configuring a custom limit via the chainspec.
275+
276+
Add the contract size settings to your chainspec under the `evolve` stanza:
277+
278+
```json
279+
"config": {
280+
...,
281+
"evolve": {
282+
"contractSizeLimit": 131072,
283+
"contractSizeLimitActivationHeight": 1000000
284+
}
285+
}
286+
```
287+
288+
Configuration options:
289+
290+
- `contractSizeLimit`: Maximum contract code size in bytes (e.g., `131072` for 128KB)
291+
- `contractSizeLimitActivationHeight`: Block height at which the custom limit activates
292+
293+
How it works:
294+
295+
- Before the activation height: The standard EIP-170 limit (24KB) applies
296+
- At and after the activation height: The custom limit applies
297+
- If `contractSizeLimitActivationHeight` is omitted, it defaults to `0` (active from genesis)
298+
- If `contractSizeLimit` is not set, the EIP-170 default (24KB) is always used
299+
300+
This design ensures safe upgrades for existing networks: contracts that were previously rejected due to size limits won't suddenly become deployable until the network explicitly activates the new limit at a specific block height.
301+
254302
### Payload Builder Configuration
255303

256304
The payload builder can be configured with:

crates/ev-revm/src/factory.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ pub struct EvEvmFactory<F> {
104104
inner: F,
105105
redirect: Option<BaseFeeRedirectSettings>,
106106
mint_precompile: Option<MintPrecompileSettings>,
107-
/// Custom contract size limit with activation height.
108107
contract_size_limit: Option<ContractSizeLimitSettings>,
109108
}
110109

0 commit comments

Comments
 (0)