Skip to content

Commit 4b19e48

Browse files
committed
produce document
1 parent 603ec51 commit 4b19e48

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

docs/guide/permissioned-evm.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Permissioned EVM Guide: Contract Deployment Allowlist
2+
3+
## Overview
4+
5+
This guide covers the deploy allowlist: a chainspec-controlled guardrail that restricts
6+
top-level contract creation transactions to a set of approved EOAs. It does not restrict
7+
regular call transactions and is not a full transaction allowlist.
8+
9+
## Deploy Allowlist (execution layer)
10+
11+
**Purpose**: Restrict contract deployment to a known set of EOAs.
12+
13+
**Mechanics**:
14+
15+
- Enforcement happens in the EVM handler before execution.
16+
- Only top-level contract creation transactions are checked.
17+
- Contract-to-contract `CREATE/CREATE2` is still allowed (by design).
18+
- If no allowlist is configured, behavior matches standard Ethereum.
19+
20+
**Chainspec configuration** (inside `config.evolve`):
21+
22+
```json
23+
"evolve": {
24+
"deployAllowlist": [
25+
"0xYourDeployerAddressHere",
26+
"0xAnotherDeployerAddressHere"
27+
],
28+
"deployAllowlistActivationHeight": 0
29+
}
30+
```
31+
32+
## Activation and Validation Rules
33+
34+
- If `deployAllowlist` is set and `deployAllowlistActivationHeight` is omitted, activation
35+
defaults to `0`.
36+
- If the allowlist is empty or missing, contract deployment is unrestricted.
37+
- Duplicate entries or the zero address are rejected at startup.
38+
- The list is capped at 1024 addresses.
39+
40+
## Security and Limitations
41+
42+
- This is not a general permissioned chain; it only gates top-level contract creation.
43+
- Non-allowlisted EOAs can still deploy contracts via existing factory contracts if those
44+
factories allow it.
45+
- If you need stricter control, only deploy factories with explicit access control and avoid
46+
deploying open factories.
47+
48+
## Operational Notes
49+
50+
- The allowlist is static; changes require a chainspec update and node restart.
51+
- For existing networks, use an activation height to coordinate rollouts.
52+
53+
References:
54+
55+
- `crates/node/src/config.rs`
56+
- `crates/ev-revm/src/handler.rs`

0 commit comments

Comments
 (0)