> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/zh/kuai-su-ru-men/key-concepts.md).

# 关键概念

面向开发者的 Solana 与 Rome EVM 基础术语——program、account、PDA、CPI、SPL 代币，以及原子执行与迭代执行。

构建 Rome 协议所需的基本术语和概念。

## Solana 概念

**程序** — 相当于 Solana 上的智能合约。程序是部署在链上的无状态可执行体。Rome EVM 本身就是一个 Solana 程序。

**账户** — Solana 上的所有状态都存储在账户中。每个账户都有所有者（程序）、余额（lamports）和数据。与 Ethereum 不同，代码和状态存储在不同的账户中。

**PDA（程序派生地址）** — 由种子和程序 ID 派生出的确定性地址。PDA 使程序能够在没有私钥的情况下“拥有”账户。Rome 使用 PDA 将 Ethereum 地址映射到 Solana 账户。

**CPI（跨程序调用）** — 一个 Solana 程序在同一笔交易中调用另一个程序。Rome EVM 合约正是通过这种方式与 Jupiter、Kamino、SPL Token 以及其他 Solana 程序交互。

**SPL Token** — Solana 的标准代币程序。相当于 Ethereum 上的 ERC-20。Solana 上的所有同质化代币（USDC、SOL 等）都是 SPL 代币。

**Token-2022** — 下一代 SPL 代币程序，支持 Transfer Hooks、Confidential Transfers 和 Permanent Delegates 等扩展。

**Transfer Hook** — Token-2022 的一种扩展，会在每次 `transfer_checked` 调用时触发一个程序。

**ATA（关联代币账户）** — 为特定钱包 + 铸币对生成的确定性代币账户。每个用户对其持有的每种代币都拥有一个 ATA。

**Lamports** — SOL 的最小单位。1 SOL = 1,000,000,000 lamports（10^9）。

**计算单元（CU）** — Solana 上相当于 Ethereum gas 的概念。每笔交易都有计算预算（默认约 20 万 CU，最大约 140 万 CU）。操作会消耗 CU。

## Rome 概念

**Rome EVM 程序** — 包含 EVM 字节码解释器的 Solana 程序。每个环境都会部署到特定的程序 ID。

**链 ID** — Rome 上的每个应用都有自己的 EVM chain ID。这会创建彼此隔离的 EVM 环境，并共享同一底层 Solana 状态。

**原子执行（VmAt）** — 完全在一笔 Solana 交易内执行的 EVM 交易。用于大多数操作。

**迭代执行（VmIt）** — 被拆分为多笔 Solana 交易的 EVM 交易，每一步会尽可能装入在一笔 Solana 交易计算预算内可容纳的操作码（自适应，而非固定数量）。用于像 BN254 pairing 这类计算密集型操作。

**持有者账户** — 一个链上缓冲区，用于存储超过 4 KB 的 Solana（v1）交易大小限制的大型 EVM 交易（最高 80 KB）。由 SDK 透明管理。

**StateHolder** — 一个链上账户，用于在迭代执行步骤之间存储序列化的 VM 状态。

**Rome 代理** — 将 Ethereum API 调用转换为 Solana 交易的 JSON-RPC 服务器（端口 9090）。你的 MetaMask 和 Hardhat 会连接到这里。

**Hercules** — 监控 Solana 上 Rome EVM 事件并生成兼容 Ethereum 的区块数据的区块索引器。

**支付者** — 代表 EVM 用户签名并支付 Solana 交易费用的 Solana 密钥对。由 Proxy 通过 payer 池进行管理。

## 代币概念

**SPL\_ERC20 / SPL\_ERC20\_cached** — 在 Rome EVM 内表示某个 SPL 代币的 ERC-20 包装合约。对于钱包，包装合约会直接从底层 SPL 代币账户读取余额。由合约持有的代币则存放在包装合约自身的托管代币账户中，并记录在包装合约的存储中（参见 [集成 Solana 程序](https://docs.rome.builders/zh/kai-fa-zhe-zhi-nan/integrate-solana-program.md)）。

**ERC20SPLFactory** — 一个工厂合约，可为任意 SPL 代币部署包装合约。

**注册表** — 规范包装合约、gas 代币和桥接配置都在链下的 [rome-protocol/registry](https://github.com/rome-protocol/rome-registry)中进行维护；链上没有代币注册表合约。这样可确保每个资产都映射到一个唯一的规范 SPL mint。

## 预编译合约

**标准 Ethereum 预编译合约** — ecrecover (0x01)、SHA-256 (0x02)、RIPEMD-160 (0x03)、identity (0x04)、modexp (0x05)、BN254 ecAdd/ecMul/ecPairing (0x06-0x08)、Blake2f (0x09)。

**系统预编译合约** (`0xFF...07`）— 在 Solidity 中进行 PDA 派生和 base58 转换。

**CpiProgram 预编译合约** (`0xFF...08`）— 跨程序调用（`invoke` / `invoke_signed`）以及跨状态读取快捷方式。

**HelperProgram 预编译合约** (`0xFF...09`）— ATA/PDA 创建、SPL 转账以及 gas↔lamports 转换；这是用户通过 PDA 签名的 SPL 操作的主要接口。

**Withdraw 预编译合约** (`0x42...16`）— 将 SOL 或 SPL 代币从 EVM 提回 Solana。

一个缓存轨道系列（`0xff…04/05/06/0b`）为这些操作提供 CU 高效读取；合约会始终一致地使用同一轨道。

## 交易类型

Rust SDK 构建三种类型的交易。Rome 会在 Solana 上结算每一种。

**一笔 EVM 交易（`RheaTx`)** — 在一条 Rome 链上的单笔 EVM 交易。最常见的类型。

**多笔 EVM 交易（`RemusTx`)** — 在不同 Rome 链上的 EVM 交易，一起在一笔 Solana 交易中执行。若任一失败，则全部回滚。

**EVM 交易加 Solana 指令（`RomulusTx`)** — 将 EVM 交易和原生 Solana 指令放入同一笔原子性 Solana 交易中，因此 Solidity 与 Solana 程序要么一起执行，要么都不执行。

## 下一步

* [执行模型](https://docs.rome.builders/zh/he-xin-gai-nian/execution-model.md) — 深入解析 EVM 交易如何在 Solana 上执行
* [代币互操作](https://docs.rome.builders/zh/he-xin-gai-nian/token-interop.md) — ERC-20 与 SPL 代币如何交互
* [约束](https://docs.rome.builders/zh/he-xin-gai-nian/constraints.md) —— 重要限制和边界


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/zh/kuai-su-ru-men/key-concepts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
