Skip to content

Commit 398d483

Browse files
authored
update spec links to docs.megaeth.com/spec and add mega-evme doc links (#24)
1 parent 7e0f519 commit 398d483

13 files changed

Lines changed: 43 additions & 34 deletions

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ When a PR creation is requested, the agent should:
106106
- **One sentence, one line.**
107107
When writing Markdown files, put each sentence on a separate line.
108108
This improves diff readability and makes reviews easier.
109-
- **Cross-link to the EVM spec with absolute GitBook URLs.**
109+
- **Cross-link to the EVM spec with absolute URLs.**
110110
The EVM spec is maintained in the mega-evm repo and synced into a separate GitBook space — it does not exist as a file in this repo.
111-
Use absolute URLs: `[Dual Gas Model](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/dual-gas-model)`.
111+
Use absolute URLs with the base `https://docs.megaeth.com/spec/`: `[Dual Gas Model](https://docs.megaeth.com/spec/megaevm/dual-gas-model)`.
112+
EVM pages use the `megaevm/` prefix (not `evm/`), system contracts use `system-contracts/`.
112113
- **Keep commit messages simple.**
113114
No co-author information or "generated with" footers.

docs/AGENTS.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,20 @@ Use relative paths from the current file: `[Connect](../user/connect.md)` or `[E
102102
### To the EVM Specification
103103

104104
The EVM spec is maintained in the [mega-evm repo](https://github.com/megaeth-labs/mega-evm) and synced into a separate GitBook space.
105-
Use absolute URLs:
106-
`[Dual Gas Model](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/dual-gas-model)`.
105+
Use absolute URLs with the base `https://docs.megaeth.com/spec/`:
106+
`[Dual Gas Model](https://docs.megaeth.com/spec/megaevm/dual-gas-model)`.
107+
EVM pages use the `megaevm/` prefix (not `evm/`), system contracts use `system-contracts/`.
108+
109+
### To the mega-evme Documentation
110+
111+
The mega-evme tool docs are hosted at `https://docs.megaeth.com/mega-evme`.
112+
Use absolute URLs: `[mega-evme](https://docs.megaeth.com/mega-evme)`.
107113

108114
### Direction rule
109115

110116
- **User docs → Developer docs**: "For technical details, see [Developer Docs](dev/overview.md)."
111-
- **Developer docs → EVM Spec**: "For the formal specification, see [Dual Gas Model](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/dual-gas-model)."
117+
- **Developer docs → EVM Spec**: "For the formal specification, see [Dual Gas Model](https://docs.megaeth.com/spec/megaevm/dual-gas-model)."
118+
- **Developer docs → mega-evme**: "For the full command reference, see [mega-evme](https://docs.megaeth.com/mega-evme)."
112119
- **EVM Spec → nothing**: The spec is self-contained. It never links to user or developer docs.
113120

114121
## Content Reuse

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ MegaETH is a high-performance Ethereum L2 with ~10ms block times and real-time t
3838
<tr>
3939
<td><strong>Specification</strong></td>
4040
<td>Formal protocol spec — EVM behavior, gas model, system contracts, and upgrade history.</td>
41-
<td><a href="https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/">Specification</a></td>
41+
<td><a href="https://docs.megaeth.com/spec/">Specification</a></td>
4242
</tr>
4343
</tbody>
4444
</table>

docs/dev/AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ For every concept that has a formal spec in `mega-evm/docs/`:
3636
1. **Summarize** the practical implications (1-3 paragraphs)
3737
2. **Include** a key values table if applicable
3838
3. **Add** code examples showing how to work with it
39-
4. **Link** to the spec: "For the formal specification, see [Dual Gas Model](https://docs.megaeth.com/evm-spec/evm/dual-gas-model)."
39+
4. **Link** to the spec: "For the formal specification, see [Dual Gas Model](https://docs.megaeth.com/spec/megaevm/dual-gas-model)."
4040

4141
Example pattern:
4242

@@ -55,7 +55,7 @@ Use `eth_estimateGas` on a MegaETH RPC endpoint for accurate gas estimates.
5555
Do not attempt to compute gas costs manually.
5656
{% endhint %}
5757

58-
For the complete storage gas schedule, see the [formal specification](https://docs.megaeth.com/evm-spec/evm/dual-gas-model).
58+
For the complete storage gas schedule, see the [formal specification](https://docs.megaeth.com/spec/megaevm/dual-gas-model).
5959
```
6060

6161
## Code Sample Rules

docs/dev/execution/gas-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,5 @@ See [Resource Limits](resource-limits.md) for the full limits table, enforcement
130130

131131
- [Resource Limits](resource-limits.md) — per-transaction and per-block resource ceilings
132132
- [EVM Differences](overview.md) — full list of behavioral differences from Ethereum
133-
- [Dual Gas Model (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/dual-gas-model) — formal specification of compute gas and storage gas
134-
- [Resource Accounting (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/resource-accounting) — how counters are tracked per opcode
133+
- [Dual Gas Model (spec)](https://docs.megaeth.com/spec/megaevm/dual-gas-model) — formal specification of compute gas and storage gas
134+
- [Resource Accounting (spec)](https://docs.megaeth.com/spec/megaevm/resource-accounting) — how counters are tracked per opcode

docs/dev/execution/overview.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ Reading volatile data — `block.timestamp`, `block.number`, oracle storage, or
4343
This ensures transactions with external dependencies yield quickly and don't block parallel execution.
4444

4545
For the full list of triggers, best practices for structuring contracts around this cap, and Solidity examples, see [Volatile Data Access](volatile-data.md).
46-
For the formal specification, see [Gas Detention](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/gas-detention).
46+
For the formal specification, see [Gas Detention](https://docs.megaeth.com/spec/megaevm/gas-detention).
4747

4848
## Increased Contract Size Limit
4949

5050
MegaETH supports contracts up to **512 KB** in size, increased from 24 KB in Ethereum.
51-
For the formal specification, see [Contract Limits](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/contract-limits).
51+
For the formal specification, see [Contract Limits](https://docs.megaeth.com/spec/megaevm/contract-limits).
5252

5353
## `SELFDESTRUCT` with EIP-6780 Semantics
5454

5555
The `SELFDESTRUCT` opcode follows [EIP-6780](https://eips.ethereum.org/EIPS/eip-6780) semantics.
5656
It only destroys a contract when called within the same transaction that created the contract.
5757
In all other cases, `SELFDESTRUCT` behaves as a simple Ether transfer without destroying the contract or clearing its storage.
58-
For the formal specification, see [SELFDESTRUCT](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/selfdestruct).
58+
For the formal specification, see [SELFDESTRUCT](https://docs.megaeth.com/spec/megaevm/selfdestruct).
5959

6060
## No Storage Gas Refund for SSTORE Resets
6161

@@ -78,7 +78,7 @@ The parent call frame retains 2% instead of ~1.6%, so subcalls receive slightly
7878
Review any patterns that rely on precise gas forwarding calculations.
7979
{% endhint %}
8080

81-
For the formal specification, see [Gas Forwarding](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/gas-forwarding).
81+
For the formal specification, see [Gas Forwarding](https://docs.megaeth.com/spec/megaevm/gas-forwarding).
8282

8383
## Precompile Gas Overrides
8484

@@ -90,11 +90,11 @@ Two precompiles have adjusted gas costs:
9090
| KZG Point Evaluation | `0x0A` | 100,000 gas (2× the standard Prague cost of 50,000) |
9191
| ModExp | `0x05` | [EIP-7883](https://eips.ethereum.org/EIPS/eip-7883) gas schedule (raises the cost floor for large-exponent calls) |
9292

93-
For the formal specification, see [Precompiles](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/precompiles).
93+
For the formal specification, see [Precompiles](https://docs.megaeth.com/spec/megaevm/precompiles).
9494

9595
## Related Pages
9696

9797
- [Gas Model](gas-model.md) — full dual gas model and resource limits
9898
- [System Contracts](system-contracts.md) — native oracle interface and high-precision timestamp
9999
- [Volatile Data Access](volatile-data.md) — compute gas cap on volatile data reads
100-
- [EVM Specification](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/overview) — formal normative specification
100+
- [EVM Specification](https://docs.megaeth.com/spec/megaevm/overview) — formal normative specification

docs/dev/execution/resource-limits.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Note: "Unlimited" means no dedicated per-block limit exists for that resource, b
3434

3535
For Data Size, KV Updates, and State Growth, block-level usage is the sum of usage across all transactions in the block.
3636

37-
For formal definitions of resource limits and accounting, see [Resource Limits (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/resource-limits) and [Resource Accounting (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/resource-accounting).
37+
For formal definitions of resource limits and accounting, see [Resource Limits (spec)](https://docs.megaeth.com/spec/megaevm/resource-limits) and [Resource Accounting (spec)](https://docs.megaeth.com/spec/megaevm/resource-accounting).
3838

3939
## Enforcement
4040

@@ -50,7 +50,7 @@ The block builder stops adding transactions once the block's cumulative gas or D
5050

5151
### During execution
5252

53-
**Compute Gas**, **Data Size**, **KV Updates**, and **State Growth** are enforced while the transaction runs (see [formal spec](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/resource-limits)).
53+
**Compute Gas**, **Data Size**, **KV Updates**, and **State Growth** are enforced while the transaction runs (see [formal spec](https://docs.megaeth.com/spec/megaevm/resource-limits)).
5454

5555
**Per-transaction**: when a transaction exceeds any of these four limits:
5656

@@ -76,5 +76,5 @@ Since Compute Gas is a component of total gas, and each transaction's total gas
7676
- [Gas Model](gas-model.md) — compute gas, storage gas, and the bucket multiplier
7777
- [Gas Estimation](../send-tx/gas-estimation.md) — estimate gas correctly and avoid common errors
7878
- [EVM Differences](overview.md) — full list of behavioral differences from Ethereum
79-
- [Resource Limits (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/resource-limits) — formal specification of limit enforcement
80-
- [Resource Accounting (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/resource-accounting) — how counters are tracked per opcode
79+
- [Resource Limits (spec)](https://docs.megaeth.com/spec/megaevm/resource-limits) — formal specification of limit enforcement
80+
- [Resource Accounting (spec)](https://docs.megaeth.com/spec/megaevm/resource-accounting) — how counters are tracked per opcode

docs/dev/execution/system-contracts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,6 @@ Addresses and interfaces are subject to change before release.
137137
## Related Pages
138138

139139
- [Volatile Data Access](volatile-data.md) — compute gas cap, best practices for reading volatile data
140-
- [System Contracts (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/system-contracts/overview) — formal specification of the system contract registry
141-
- [Oracle (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/system-contracts/oracle) — underlying oracle contract that powers the High-Precision Timestamp and other services
142-
- [KeylessDeploy (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/system-contracts/keyless-deploy) — keyless deployment sandbox and validation rules
140+
- [System Contracts (spec)](https://docs.megaeth.com/spec/system-contracts/overview) — formal specification of the system contract registry
141+
- [Oracle (spec)](https://docs.megaeth.com/spec/system-contracts/oracle) — underlying oracle contract that powers the High-Precision Timestamp and other services
142+
- [KeylessDeploy (spec)](https://docs.megaeth.com/spec/system-contracts/keyless-deploy) — keyless deployment sandbox and validation rules

docs/dev/execution/volatile-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Under the current absolute model, the same transaction would have only 5M remain
2424

2525
This change removes the penalty for accessing volatile data late in a transaction's execution.
2626
Under relative detention, reading volatile data **as late as possible** becomes a valid optimization — see [Best Practices](#best-practices).
27-
For the formal definition, see [Gas Detention](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/gas-detention).
27+
For the formal definition, see [Gas Detention](https://docs.megaeth.com/spec/megaevm/gas-detention).
2828

2929
</details>
3030

@@ -109,7 +109,7 @@ function processWithTimestamp(uint256[] calldata items) external {
109109
```
110110

111111
Under the current absolute cap, read order makes no difference — the 20M ceiling applies to total compute gas regardless.
112-
For the formal definition, see [Gas Detention](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/gas-detention).
112+
For the formal definition, see [Gas Detention](https://docs.megaeth.com/spec/megaevm/gas-detention).
113113

114114
</details>
115115

@@ -118,4 +118,4 @@ For the formal definition, see [Gas Detention](https://app.gitbook.com/o/iBzILuN
118118
- [EVM Differences](overview.md) — full list of MegaEVM behavioral differences
119119
- [Gas Estimation](../send-tx/gas-estimation.md) — estimate gas correctly on MegaETH
120120
- [Debugging Transactions](../send-tx/debugging.md) — trace gas consumption with mega-evme
121-
- [Gas Detention (spec)](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/gas-detention) — formal specification of the gas detention mechanism
121+
- [Gas Detention (spec)](https://docs.megaeth.com/spec/megaevm/gas-detention) — formal specification of the gas detention mechanism

docs/dev/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Write error handling for rollbacks of preconfirmed blocks.
4242
### What is the contract size limit?
4343

4444
512 KB, rather than Ethereum's 24 KB.
45-
See the [Contract Limits specification](https://app.gitbook.com/o/iBzILuNyLtuxU3vUEuPe/s/apRp1sxFYuGhHAo7Y2Pz/evm/contract-limits) for details.
45+
See the [Contract Limits specification](https://docs.megaeth.com/spec/megaevm/contract-limits) for details.
4646

4747
## Transaction Lifecycle & Txpool
4848

0 commit comments

Comments
 (0)