-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2305 from XRPLF/xchain-bridge-docs
XChainBridge Docs
- Loading branch information
Showing
29 changed files
with
2,303 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=<<-</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=<<-</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=<<-</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,6 +252,7 @@ | |
"Tickets", | ||
"TickSize", | ||
"TrustSetAuth", | ||
"XChainBridge", | ||
"XRPFees" | ||
] %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' %} |
Oops, something went wrong.