# 4.3 跨链

DxChain Bridge采用亚马逊云科技的Nitro Enclave技术在Ethereum和DxChain之间构建了一个快速、安全、费用低的跨链桥。跨链桥（DxBridge）将由Nitro Enclave和可信任的节点Warden组成，利用Nitro Enclave构建隔离执行环境，防止跨链桥运营商的中心化干扰。这种设计模式在不牺牲系统安全性的前提下，一定程度上减少了跨链交易的繁琐步骤。

DxBridge主要由两个部分组成：

* Nitro Enclave：亚马逊云科技的可信执行环境（TEE: Trusted Execution Environment）解决方案，通过创建一个隔离空间，用户可以在隔离的安全环境中使用并处理私钥，同时阻止父实例上的用户、应用程序查看和获取这些密钥。
* 一组看守人（Wardens）：交易的第三方检索者和验证者。Warden主要负责检索DxChain和Ethereum链，并向Nitro Enclave提交需要处理的合法交易。首先，Warden会寻找已成功向Ethereum钱包发送的进链交易或从DxChain调取的出链交易。交易必须确保转账资金里拥有足够的资金用于支付相关费用，包含转账本身所需的汽油费以及跨链费用，否则交易将被拒绝，Warden也不会检索到这些交易。Nitro Enclave需要一定数量的Warden同时提交相同的交易，跨链桥才会在另一条链上发送对应的交易，通过提供私钥碎片并提交合法交易。

<figure><img src="/files/ORqGToncpvSN1txXWYLW" alt=""><figcaption><p>图5：跨链桥流程</p></figcaption></figure>

Nitro Enclave可直接和Warden通讯以获取链上事件并且发送交易。交易中所有地址的私钥均为初始化时产生的主私钥衍生而来，没有任何一方可以获取这个主私钥。主私钥使用Shamir秘密分享算法将私钥碎片分发给Warden，并在分享的过程使用TLS通讯校验身份。重启时，Nitro Enclave会通过TLS连接向Warden索要私钥碎片以重新计算主私钥，生成新的私钥碎片后再次分发给Warden。此外，确认已被桥处理的交易会在本地进行备份。


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dxchain.gitbook.io/dxchain-wiki/zhong-wen-she-qu/dxchain-v3-ji-shu-wen-dang/4.-ji-shu-de-she-ji-yuan-li-yu-jia-gou/4.3-kua-lian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
