Skip to content

Commit

Permalink
Merge pull request #2305 from XRPLF/xchain-bridge-docs
Browse files Browse the repository at this point in the history
XChainBridge Docs
  • Loading branch information
oeggert authored Jan 10, 2024
2 parents 00111ab + 3a4a117 commit 2594aa3
Show file tree
Hide file tree
Showing 29 changed files with 2,303 additions and 8 deletions.
29 changes: 24 additions & 5 deletions content/@i18n/ja/resources/known-amendments.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ labels:

| 名前 | 登場 | ステータス |
|:----------------------------------|:-----------|:------------------------------------|
| [XChainBridge][] | v2.0.0 | [投票中: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") |
| [AMM][] | v1.12.0 | [投票中: 2023-09-06](https://xrpl.org/blog/2023/rippled-1.12.0.html "BADGE_80d0e0") |
| [Clawback][] | v1.12.0 | [投票中: 2023-09-06](https://xrpl.org/blog/2023/rippled-1.12.0.html "BADGE_80d0e0") |
| [XRPFees][] | v1.10.0 | [投票中: 2023-03-14](https://xrpl.org/blog/2023/rippled-1.10.0.html "BADGE_80d0e0") |
Expand Down Expand Up @@ -82,7 +83,6 @@ labels:
| 名前 | ステータス | 追加情報 |
|:----------------------------------|:------------------------------------------|:-------------------------------|
| [Hooks][] | [開発中: 未定]( "BADGE_LIGHTGREY") | [XRPL Hooks](https://hooks.xrpl.org/) |
| [XChainBridge][] | [開発中: 未定]( "BADGE_LIGHTGREY") | [XLS-38d](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-38d-XChainBridge/README.md) [ドキュメント](https://opensource.ripple.com/docs/xls-38d-cross-chain-bridge/cross-chain-bridges/) |
| [OwnerPaysFee][] | [開発中: 未定]( "BADGE_LIGHTGREY") | |

**注記:** このリストは手動で更新されています。もしあなたがAmendmentに取り組んでいて、その変更をテストするためのテストネットワークを持っているなら、このページを編集して開発中のamendmentをこのリストに追加することができます。XRP Ledgerへの貢献についての詳細は、[XRP Ledgerのコードへの貢献](contribute-code-flow.html)をご覧ください。
Expand Down Expand Up @@ -193,11 +193,30 @@ Clawbackはデフォルトでは無効になっています。Clawbackを使用
| Amendment | XChainBridge |
|:-------------|:-----------------|
| Amendment ID | C98D98EE9616ACD36E81FDEB8D41D349BF5F1B41DD64A0ABC1FE9AA5EA267E9C |
| Status | 開発中 |
| デフォルトの投票(最新の安定版) | いいえ |
| Amendment前の機能は廃止? | いいえ |
| Status | Open for Voting |
| Default Vote (Latest stable release) | No |
| Pre-amendment functionality retired? | No |

Adds cross-chain bridges, enabling the transfer of digital assets between networks, such as Mainnet and a sidechain.

Adds new transactions:

- XChainAccountCreateCommit - Create a new account for a witness server to submit transactions on an issuing chain..
- XChainAddAccountCreateAttestation - Provide an attestation that an account was created for a witness server to use.
- XChainAddClaimAttestation - Provide an attestation that assets were locked on a locking chain.
- XChainClaim - Claim assets on the destination chain.
- XChainCommit - Locks assets on the locking chain.
- XChainCreateBridge - Create a bridge ledger object.
- XChainCreateClaimID - Create a new cross-chain claim ID that is used for a cross-chain transfer.
- XChainModifyBridge - Modify the parameters of a bridge.

Adds new ledger entry types:

- Bridge - A single cross-chain bridge that connects the XRP Ledger with another blockchain.
- XChainOwnedClaimID - A cross-chain transfer of value that includes information of the account on the source chain that locks or burns the funds on the source chain.
- XChainOwnedCreateAccountClaimID - Collects attestations for creating an account via a cross-chain transfer.

メインネットとサイドチェーンなど異なるネットワーク間でアセットを同期させるための「クロスチェーンブリッジ」を追加します。標準規格: [XLS-38d Cross-Chain Bridge](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-38d-XChainBridge/README.md)
Adds several new transaction result codes.


### CryptoConditions
Expand Down
229 changes: 229 additions & 0 deletions content/_img-sources/serialization-xchainbridge.uxf
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.2">
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>770</x>
<y>240</y>
<w>310</w>
<h>30</h>
</coordinates>
<panel_attributes>Issuer AccountID (160 bits)
lt=.</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>480</x>
<y>240</y>
<w>280</w>
<h>30</h>
</coordinates>
<panel_attributes>Currency code (160 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>460</x>
<y>90</y>
<w>400</w>
<h>160</h>
</coordinates>
<panel_attributes>lt=..</panel_attributes>
<additional_attributes>10.0;140.0;380.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>1080</x>
<y>90</y>
<w>30</w>
<h>160</h>
</coordinates>
<panel_attributes>lt=..</panel_attributes>
<additional_attributes>10.0;140.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>50</x>
<y>30</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>XChainBridge Format</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>50</x>
<y>60</y>
<w>1050</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>580</x>
<y>200</y>
<w>240</w>
<h>30</h>
</coordinates>
<panel_attributes>STIssue Format</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>470</x>
<y>230</y>
<w>620</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>100</x>
<y>70</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>Locking chain door (160 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>320</x>
<y>70</y>
<w>250</w>
<h>30</h>
</coordinates>
<panel_attributes>Locking Chain Issue</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>60</x>
<y>70</y>
<w>40</w>
<h>30</h>
</coordinates>
<panel_attributes>0x14</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>100</x>
<y>120</y>
<w>270</w>
<h>40</h>
</coordinates>
<panel_attributes>Door account length prefixes (8 bits)
Always 0x14</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>60</x>
<y>90</y>
<w>60</w>
<h>70</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0;40.0;50.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>580</x>
<y>70</y>
<w>40</w>
<h>30</h>
</coordinates>
<panel_attributes>0x14</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>360</x>
<y>90</y>
<w>250</w>
<h>70</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>230.0;10.0;230.0;50.0;10.0;50.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>620</x>
<y>70</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>Issuing chain door (160 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>840</x>
<y>70</y>
<w>250</w>
<h>30</h>
</coordinates>
<panel_attributes>Issuing Chain Issue</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>770</x>
<y>260</y>
<w>60</w>
<h>70</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0;40.0;50.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>810</x>
<y>290</y>
<w>270</w>
<h>30</h>
</coordinates>
<panel_attributes>Omitted if the currency code is all 0's</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLNote</id>
<coordinates>
<x>170</x>
<y>210</y>
<w>260</w>
<h>80</h>
</coordinates>
<panel_attributes>*Note:*
Unlike in Object and Array fields, the nested STIssue types here do not begin with a Field ID.
bg=yellow
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
</diagram>
1 change: 1 addition & 0 deletions content/_snippets/rippled-api-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"Tickets",
"TickSize",
"TrustSetAuth",
"XChainBridge",
"XRPFees"
] %}

Expand Down
1 change: 1 addition & 0 deletions content/concepts/networks-and-servers/parallel-networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ To help members of the XRP Ledger community interact with XRP Ledger technology
| Testnet | Stable releases | An "alternate universe" network that acts as a testing ground for software built on the XRP Ledger, without impacting production XRP Ledger users and without risking real money. The [amendment status](known-amendments.html) of the Testnet is intended to closely mirror the Mainnet, although slight variations in timing may occur due to the unpredictable nature of decentralized systems. |
| Devnet | Beta releases | A preview of coming attractions, where unstable changes to the core XRP Ledger software may be tested out. Developers can use this altnet to interact with and learn about planned new XRP Ledger features and amendments that are not yet enabled on the Mainnet. |
| [Hooks V3 Testnet](https://hooks-testnet-v3.xrpl-labs.com/) | [Hooks server](https://github.com/XRPL-Labs/xrpld-hooks) | A preview of on-chain smart contract functionality using [hooks](https://xrpl-hooks.readme.io/). |
| Sidechain-Devnet | Beta releases | A sidechain to test cross-chain bridge features. Devnet is treated as the locking chain and this sidechain is the issuing chain.<br>Library support:<br>- [xrpl.js 2.12.0](https://www.npmjs.com/package/xrpl/v/2.12.0)<br>- [xrpl-py 2.4.0](https://pypi.org/project/xrpl-py/2.4.0/)<br>**Note**: You can also use the [`xbridge-cli`](https://github.com/XRPLF/xbridge-cli) commandline tool to set up a cross-chain bridge on your local machine. |

Each altnet has its own separate supply of test XRP, which is [given away for free](xrp-testnet-faucet.html) to parties interested in experimenting with the XRP Ledger and developing applications and integrations. Test XRP does not have real-world value and is lost when the network is reset.

Expand Down
45 changes: 45 additions & 0 deletions content/concepts/xrpl-sidechains/cross-chain-bridges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
html: cross-chain-bridges.html
parent: xrpl-sidechains.html
blurb: Cross-chain bridges for the XRP Ledger enable value in the form of XRP and other tokens (IOUs) to move efficiently between blockchains.
status: not_enabled
labels:
- Blockchain
- Interoperability
---
# Cross-Chain Bridges

_(Requires the [XChainBridge amendment][] :not_enabled:)_

Cross-chain bridges enable you to move XRP and tokens between the XRP Ledger and other blockchains. When referring to the blockchains connected by a bridge, one is the locking chain and the other the issuing chain.

A locking chain is where the digital asset originates from. These assets are locked in a trust when sent across a bridge to an issuing chain.

An issuing chain is an independent ledger with its own consensus algorithm and transaction types and rules. A wrapped version of the digital asset is minted and burned, depending on if an asset is received or sent from the locking chain.

**Note:** Bridges utilize special _door accounts_ when moving assets cross-chain. The door account on a locking chain is used to put assets into trust, and the door account on an issuing chain is used to issue wrapped assets.

Both the locking and issuing chains operate as parallel networks with independent nodes and validators. They rely on independent [witness servers](witness-servers.html) to watch transactions between the two chains and attest that assets have moved into specifically designated accounts.


## How Do Bridges Work?

At a high-level, bridges enable cross-chain transactions through these steps:

1. Create a cross-chain claim ID on the issuing chain. A cross-chain claim ID represents one transfer of value between blockchains.
2. Submit a commit transaction on the locking chain, putting the assets in a trust. The transaction includes the cross-chain claim ID and reward for witness servers.

**Note:** Witness servers monitor transactions on both chains. They provide attestations, or signed messages, to verify a transaction occurred. There are attestations for `XChainCommit` and `XChainAccountCreateCommit` transactions.

3. Witness servers provide attestations to the issuing chain, saying the assets were locked on the locking chain.
4. When there are enough signatures to reach quorum, the assets are released on the issuing chain to the destination account.

**Note:** In some cases, such as deposit authorization being enabled, you'll need to submit a transaction claim for the transferred assets on the issuing chain.

5. Rewards are distributed to the witness servers' accounts on the issuing chain.


<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}
Loading

0 comments on commit 2594aa3

Please sign in to comment.