> 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/an-quan/known-limitations.md).

# 已知限制

当前 Rome EVM 的约束及其影响——不支持的操作码、存储账户布局、CU 上限、CPI 深度以及预言机限制。

如实记录 Rome 协议当前的限制及其影响。

## 执行限制

**不支持 SELFDESTRUCT。** 该操作码没有处理器，因此执行它的合约会中止整个交易（见下文），而不是仅回滚单个调用帧。

**Rome 未实现的操作码会中止整个交易。** 解释器没有为该字节提供处理器，因此交易最终以 `IncompatibleVersionEVM(opcode)`结束，它所做的任何操作都不会被提交，且失败会传递给发送方，而不是被调用方合约吞掉。

**没有按操作码划分的 gas 计费表。** 传递给 `CALL`, `DELEGATECALL`, `STATICCALL` 和 `CREATE` 中的 gas 值仅为兼容 ABI 而被接受，但不会被强制执行——被调用方会使用调用方剩余的全部预算运行，并且没有 2300 gas 的补贴。基于补贴的重入保护（`transfer()` / `send()`）在 Rome 上无效；请使用显式重入锁以及 checks-effects-interactions 模式。

**Modexp（0x05）已禁用。** 一次调用会以 `big_mod_exp 调用已禁用` 直到 Solana 启用 `big_mod_exp` syscall。

**每个存储账户有 256 个存储槽。** 合约存储分布在多个 Solana 账户中，每个账户有 256 个槽。存储占用较大的合约会使用多个账户，这会影响 CU 成本。

**每笔原子交易约可使用 140 万个计算单元。** 超出单个 Solana 交易预算的工作会回退到迭代执行（拆分为多笔交易）。某些操作仅支持原子执行，无法以迭代方式运行——尤其是 legacy-track CPI（`CpiProhibitedInIterativeTx`；cached-track 的效果会分阶段处理，并且可以迭代执行）。

**CPI 深度限制为 4。** 过深嵌套的 CPI 调用将失败。请将合约设计为浅层调用树。

## 预言机限制

**没有历史轮次数据。** Oracle Gateway 适配器仅支持 `latestRoundData()`。通过 `getRoundData(roundId)` 查询历史价格会回滚。

**解析器偏移量会根据当前布局进行校验。** Pyth 和 Switchboard 的账户数据使用字节偏移进行解析。如果 Pyth 或 Switchboard 更改其账户布局，在重新验证偏移量之前，适配器会返回错误数据。

## 工具限制

**不支持以太坊风格的交易追踪。** `debug_traceTransaction` 和 `trace_*` 不受支持。唯一的追踪方法是 `debug_traceRomeTransaction`，它会将把多个调用打包为一个批次的交易拆分为其子调用和 CPI。普通交易返回 `null`。对于其他情况，请使用 `eth_call` 以及 [通过浏览器](/zh/rome-shang-de-ying-yong/via.md) （它会显示交易背后的 Solana 指令）进行调试。参见 [JSON-RPC](/zh/can-kao/json-rpc.md).

**`eth_getLogs` 有范围上限。** 公链会拒绝过宽的区块范围（错误 `-32005`）；请限制查询范围。参见 [JSON-RPC](/zh/can-kao/json-rpc.md).

## 基础设施限制

**单一运营方模式。** 每个 Rome 部署都由单一实体（payer pool 运营方）负责运行。不存在去中心化的运营者集合。

**迭代模式锁定。** 在迭代执行期间，账户会被锁定几秒钟，这可能会在高频使用的账户上造成争用。

## 接下来

* [负责任披露](/zh/an-quan/responsible-disclosure.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/an-quan/known-limitations.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.
