From 4060be3ede0da63c0eab944bc178e760a7b646ab Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Wed, 8 Apr 2026 14:42:03 +0000 Subject: [PATCH 1/4] docs: add precompile behavior chart for zones Co-authored-by: Daniel Robinson <1187252+danrobinson@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d6b16-0cab-760e-812e-4801fae12a1a --- docs/ZONES.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/ZONES.md b/docs/ZONES.md index cfac616d7..cf1061d4c 100644 --- a/docs/ZONES.md +++ b/docs/ZONES.md @@ -474,6 +474,36 @@ graph TB Tasks -- "submitBatch / processWithdrawal" --> Portal ``` +### Precompiles + +Zones inherit the Tempo L1 EVM but replace, disable, or pass through each precompile depending on whether it is relevant in the zone context. The zone also adds new precompiles for L1 state access, privacy, and zone-specific transaction context. + +#### Tempo L1 Precompiles on Zones + +| Precompile | Address | Zone Behavior | +|------------|---------|---------------| +| Standard EVM (ecrecover, SHA-256, etc.) | `0x01`–`0x0a`+ | **Unchanged** — standard Ethereum precompiles inherited from Tempo's active hardfork are available as-is. | +| TIP-20 tokens | `0x20C0…` prefix | **Replaced** — routed through `ZoneTip20Token`, which adds privacy (caller-scoped reads), fixed gas for transfers, bridge-auth for mint/burn, and TIP-403 policy enforcement via the L1-synced cache. | +| TIP20Factory | `0x20FC…0000` | **Replaced** — `ZoneTokenFactory` exposes only `enableToken(address, name, symbol, currency)`, called by ZoneInbox during `advanceTempo` to initialize bridged tokens. | +| TIP403Registry | `0x403C…0000` | **Replaced** — `ZoneTip403ProxyRegistry` delegates policy checks to a cache-first, L1-RPC-fallback provider instead of reading local storage. | +| TipFeeManager | `0xfeec…0000` | **Present** — the precompile is still registered, but its liquidity pools are not used by transactions. The zone executor overrides `validatorTokens` to match each transaction's fee token, so the FeeAMM swap path is bypassed and fees are collected directly in the user's token. | +| StablecoinDEX | `0xdec0…0000` | **Disabled** — not registered on zones, so the address behaves like an empty account. The L1 DEX is not relevant on zones. | +| NonceManager | `0x4E4F…0000` | **Unchanged** — passed through from L1. | +| ValidatorConfig (legacy) | `0xCCCC…0000` | **Unchanged** — passed through from L1. | +| ValidatorConfigV2 | `0xCCCC…0001` | **Unchanged** — passed through from L1. | +| AccountKeychain | `0xAAAA…0000` | **Unchanged** — passed through from L1. | +| AddressRegistry | `0xFDC0…0000` | **Not registered** — the address has no zone precompile implementation. | +| SignatureVerifier | `0x5165…0000` | **Not registered** — the address has no zone precompile implementation. | + +#### Zone-Only Precompiles + +| Precompile | Address | Description | +|------------|---------|-------------| +| TempoStateReader | `0x1c00…0004` | Reads L1 contract storage from zone contracts via the L1 state cache. | +| ZoneTxContext | `0x1c00…0005` | Provides zone-specific transaction context (e.g. the current L1 block). | +| ChaumPedersenVerify | `0x1c00…0100` | Verifies DLOG equality proofs for ECDH key exchange (encrypted deposits). | +| AesGcmDecrypt | `0x1c00…0101` | AES-256-GCM authenticated decryption (encrypted deposit payloads). | + ## Configuration ### Key Addresses From eb5a2cfe7e55e325878b1861184c6dca2ff2d35b Mon Sep 17 00:00:00 2001 From: Daniel Robinson Date: Wed, 8 Apr 2026 11:32:43 -0700 Subject: [PATCH 2/4] Apply suggestion from @danrobinson --- docs/ZONES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ZONES.md b/docs/ZONES.md index cf1061d4c..0271375f5 100644 --- a/docs/ZONES.md +++ b/docs/ZONES.md @@ -487,7 +487,7 @@ Zones inherit the Tempo L1 EVM but replace, disable, or pass through each precom | TIP20Factory | `0x20FC…0000` | **Replaced** — `ZoneTokenFactory` exposes only `enableToken(address, name, symbol, currency)`, called by ZoneInbox during `advanceTempo` to initialize bridged tokens. | | TIP403Registry | `0x403C…0000` | **Replaced** — `ZoneTip403ProxyRegistry` delegates policy checks to a cache-first, L1-RPC-fallback provider instead of reading local storage. | | TipFeeManager | `0xfeec…0000` | **Present** — the precompile is still registered, but its liquidity pools are not used by transactions. The zone executor overrides `validatorTokens` to match each transaction's fee token, so the FeeAMM swap path is bypassed and fees are collected directly in the user's token. | -| StablecoinDEX | `0xdec0…0000` | **Disabled** — not registered on zones, so the address behaves like an empty account. The L1 DEX is not relevant on zones. | +| StablecoinDEX | `0xdec0…0000` | **Disabled** — not registered on zones, so the address behaves like an empty account. Users on zones can trade on the StablecoinDEX on Tempo via the bridge. | NonceManager | `0x4E4F…0000` | **Unchanged** — passed through from L1. | | ValidatorConfig (legacy) | `0xCCCC…0000` | **Unchanged** — passed through from L1. | | ValidatorConfigV2 | `0xCCCC…0001` | **Unchanged** — passed through from L1. | From be5dd399190f69f4ad9253a98ff75f818785c59f Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:08:08 +0000 Subject: [PATCH 3/4] docs: improve precompile chart wording for accuracy - Standard EVM: specify hardfork sets (Prague pre-T1C, Osaka at T1C+) and 0x0100 - TIP403Registry: note read-only behavior and that mutating calls revert - NonceManager/ValidatorConfig/ValidatorConfigV2/AccountKeychain: replace 'passed through from L1' with 'same implementation as L1, runs locally on zone state' to avoid implying L1 RPC passthrough - StablecoinDEX: fix missing trailing pipe Co-authored-by: Daniel Robinson <1187252+danrobinson@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d6e60-0a2d-71fc-9628-1e53d4b668ef --- docs/ZONES.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/ZONES.md b/docs/ZONES.md index 0271375f5..3271e3518 100644 --- a/docs/ZONES.md +++ b/docs/ZONES.md @@ -482,16 +482,16 @@ Zones inherit the Tempo L1 EVM but replace, disable, or pass through each precom | Precompile | Address | Zone Behavior | |------------|---------|---------------| -| Standard EVM (ecrecover, SHA-256, etc.) | `0x01`–`0x0a`+ | **Unchanged** — standard Ethereum precompiles inherited from Tempo's active hardfork are available as-is. | +| Standard EVM (ecrecover, SHA-256, etc.) | `0x01`–`0x0a`, `0x0100` on T1C+ | **Unchanged** — standard Ethereum precompiles inherited from Tempo's active hardfork (Prague pre-T1C, Osaka at T1C+) are available as-is. | | TIP-20 tokens | `0x20C0…` prefix | **Replaced** — routed through `ZoneTip20Token`, which adds privacy (caller-scoped reads), fixed gas for transfers, bridge-auth for mint/burn, and TIP-403 policy enforcement via the L1-synced cache. | | TIP20Factory | `0x20FC…0000` | **Replaced** — `ZoneTokenFactory` exposes only `enableToken(address, name, symbol, currency)`, called by ZoneInbox during `advanceTempo` to initialize bridged tokens. | -| TIP403Registry | `0x403C…0000` | **Replaced** — `ZoneTip403ProxyRegistry` delegates policy checks to a cache-first, L1-RPC-fallback provider instead of reading local storage. | +| TIP403Registry | `0x403C…0000` | **Replaced** — read-only `ZoneTip403ProxyRegistry` serves authorization queries from a cache-first, L1-RPC-fallback provider. Mutating calls (`createPolicy`, `modifyPolicyWhitelist`, etc.) revert — policy state is managed on L1. | | TipFeeManager | `0xfeec…0000` | **Present** — the precompile is still registered, but its liquidity pools are not used by transactions. The zone executor overrides `validatorTokens` to match each transaction's fee token, so the FeeAMM swap path is bypassed and fees are collected directly in the user's token. | -| StablecoinDEX | `0xdec0…0000` | **Disabled** — not registered on zones, so the address behaves like an empty account. Users on zones can trade on the StablecoinDEX on Tempo via the bridge. -| NonceManager | `0x4E4F…0000` | **Unchanged** — passed through from L1. | -| ValidatorConfig (legacy) | `0xCCCC…0000` | **Unchanged** — passed through from L1. | -| ValidatorConfigV2 | `0xCCCC…0001` | **Unchanged** — passed through from L1. | -| AccountKeychain | `0xAAAA…0000` | **Unchanged** — passed through from L1. | +| StablecoinDEX | `0xdec0…0000` | **Disabled** — not registered on zones, so the address behaves like an empty account. Users on zones can trade on the StablecoinDEX on Tempo via the bridge. | +| NonceManager | `0x4E4F…0000` | **Unchanged** — same implementation as L1, runs locally on zone state. | +| ValidatorConfig (legacy) | `0xCCCC…0000` | **Unchanged** — same implementation as L1, runs locally on zone state. | +| ValidatorConfigV2 | `0xCCCC…0001` | **Unchanged** — same implementation as L1, runs locally on zone state. | +| AccountKeychain | `0xAAAA…0000` | **Unchanged** — same implementation as L1, runs locally on zone state. | | AddressRegistry | `0xFDC0…0000` | **Not registered** — the address has no zone precompile implementation. | | SignatureVerifier | `0x5165…0000` | **Not registered** — the address has no zone precompile implementation. | From 904f87ad27119d4e8f3574076ad27517f02d8012 Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Wed, 15 Apr 2026 16:46:51 +0000 Subject: [PATCH 4/4] docs: fix precompile chart discrepancies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ValidatorConfig/V2: marked as 'Not registered' (they aren't loaded in the zone's precompile_lookup — zones don't run validators) - ZoneTxContext: fix description — exposes currentTxHash for authenticated withdrawals, not 'the current L1 block' Co-Authored-By: 0xKitsune <77890308+0xKitsune@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d9207-8009-731f-8a88-7153f275beb3 --- docs/ZONES.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ZONES.md b/docs/ZONES.md index 3271e3518..607c56b6c 100644 --- a/docs/ZONES.md +++ b/docs/ZONES.md @@ -489,8 +489,8 @@ Zones inherit the Tempo L1 EVM but replace, disable, or pass through each precom | TipFeeManager | `0xfeec…0000` | **Present** — the precompile is still registered, but its liquidity pools are not used by transactions. The zone executor overrides `validatorTokens` to match each transaction's fee token, so the FeeAMM swap path is bypassed and fees are collected directly in the user's token. | | StablecoinDEX | `0xdec0…0000` | **Disabled** — not registered on zones, so the address behaves like an empty account. Users on zones can trade on the StablecoinDEX on Tempo via the bridge. | | NonceManager | `0x4E4F…0000` | **Unchanged** — same implementation as L1, runs locally on zone state. | -| ValidatorConfig (legacy) | `0xCCCC…0000` | **Unchanged** — same implementation as L1, runs locally on zone state. | -| ValidatorConfigV2 | `0xCCCC…0001` | **Unchanged** — same implementation as L1, runs locally on zone state. | +| ValidatorConfig (legacy) | `0xCCCC…0000` | **Not registered** — zones do not run validators, so the precompile is not loaded. | +| ValidatorConfigV2 | `0xCCCC…0001` | **Not registered** — zones do not run validators, so the precompile is not loaded. | | AccountKeychain | `0xAAAA…0000` | **Unchanged** — same implementation as L1, runs locally on zone state. | | AddressRegistry | `0xFDC0…0000` | **Not registered** — the address has no zone precompile implementation. | | SignatureVerifier | `0x5165…0000` | **Not registered** — the address has no zone precompile implementation. | @@ -500,7 +500,7 @@ Zones inherit the Tempo L1 EVM but replace, disable, or pass through each precom | Precompile | Address | Description | |------------|---------|-------------| | TempoStateReader | `0x1c00…0004` | Reads L1 contract storage from zone contracts via the L1 state cache. | -| ZoneTxContext | `0x1c00…0005` | Provides zone-specific transaction context (e.g. the current L1 block). | +| ZoneTxContext | `0x1c00…0005` | Exposes the hash of the currently executing zone transaction (`currentTxHash`), used by ZoneOutbox for authenticated withdrawals. | | ChaumPedersenVerify | `0x1c00…0100` | Verifies DLOG equality proofs for ECDH key exchange (encrypted deposits). | | AesGcmDecrypt | `0x1c00…0101` | AES-256-GCM authenticated decryption (encrypted deposit payloads). |