-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XChainBridge Docs #2305
XChainBridge Docs #2305
Conversation
Link check report. 619960 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/ |
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this mention a sidechain as an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to mention it here, since we've got examples in the parent sidechains page.
Link check report. 619930 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't get all the way through this large diff, but I spotted a few things that could use some attention in the first few sections. Largely it looks good though.
|
||
| Field Name | JSON Type | Required? | Description | | ||
|------------|-----------|-----------|-------------| | ||
| `Host` | `string` | Yes | The IP address of the witness server for RPC requests. **Note:** This doesn't accept URLs | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question about the Host
of the above table, although bigger question:
Is it necessary to define these separately? Couldn't we just call them both an "Endpoint Object" and have the top-level table say that both fields take an Endpoint Object as specified below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer these spilt since they are pointing to different endpoints that serve different functions.
content/references/protocol/ledger-data/ledger-entry-types/bridge.md
Outdated
Show resolved
Hide resolved
content/references/protocol/ledger-data/ledger-entry-types/bridge.md
Outdated
Show resolved
Hide resolved
content/references/protocol/ledger-data/ledger-entry-types/bridge.md
Outdated
Show resolved
Hide resolved
Link check report. 619940 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/ |
Link check report. 619946 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/ |
Co-authored-by: Rome Reginelli <[email protected]>
Link check report. 619952 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/ |
1 similar comment
Link check report. 619952 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing that really should be resolved is the use of the term IOU for tokens. It would require a change to our style guidelines.
@@ -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. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devnet is treated as the locking chain, while this sidechain is the issuing chain.
|
||
_(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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one is the locking chain and the other is the issuing chain. [Italicize the words being defined]
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...assets into trust. The door account....
## How Do Bridges Work? | ||
|
||
At a high-level, bridges enable cross-chain transactions through these steps: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The four items are not parallel. You start out in second person for items 1 and 2, then move to third person for 3 and 4. I'd name the actor in items 1 and 2 ("The issuing chain creates a cross-chain claim ID"). If that's not accurate, identifying the actual actor in a similar way will make the 4 lines parallel.
--- | ||
html: witness-servers.html | ||
parent: xrpl-sidechains.html | ||
blurb: A witness server is a light-weight server that witnesses and signs transactions between the XRP Ledger and another chain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lightweight [one word]
| Field | JSON Type | Internal Type | Required? | Description | | ||
|:--------------------|:----------|:------------------|:----------|:----------------| | ||
| `IssuingChainDoor` | `string` | `ACCOUNT` | Yes | The door account on the issuing chain. For an XRP-XRP bridge, this must be the genesis account (the account that is created when the network is first started, which contains all of the XRP). | | ||
| `IssuingChainIssue` | `Issue` | `ISSUE` | Yes | The asset that is minted and burned on the issuing chain. For an IOU-IOU bridge, the issuer of the asset must be the door account on the issuing chain, to avoid supply issues. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IOU-IOU
| Field | JSON Type | Internal Type | Required? | Description | | ||
|:-------------------------|:------------------|:------------------|:----------|-------------| | ||
| `Flags` | `number` | `UINT32` | Yes | Specifies the flags for this transaction. | | ||
| `MinAccountCreateAmount` | `Currency Amount` | `AMOUNT` | No | The minimum amount, in XRP, required for a `XChainAccountCreateCommit` transaction. If this is not present, the `XChainAccountCreateCommit` transaction will fail. This field can only be present on XRP-XRP bridges. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If ... not present.. transaction fails.
| Field | JSON Type | Internal Type | Required? | Description | | ||
|:--------------------|:----------|:------------------|:----------|:----------------| | ||
| `IssuingChainDoor` | `string` | `ACCOUNT` | Yes | The door account on the issuing chain. For an XRP-XRP bridge, this must be the genesis account (the account that is created when the network is first started, which contains all of the XRP). | | ||
| `IssuingChainIssue` | `Issue` | `ISSUE` | Yes | The asset that is minted and burned on the issuing chain. For an IOU-IOU bridge, the issuer of the asset must be the door account on the issuing chain, to avoid supply issues. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IOU-IOU
labels: | ||
- Interoperability | ||
--- | ||
# Set Up an IOU-IOU Bridge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oy. If this goes forward, seriously, we have to change the guidance on the use of the term IOU.
--- | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage guidelines say we're trying to get away from the term IOU (though I personally like it). Safe to remove it here.
- Interoperability | ||
--- | ||
# Witness Servers | ||
[[Source]](https://github.com/seelabs/xbridge_witness "Source") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this repository be moved to XRPLF in the future?
Adding docs for 2.0 release.
Updated branch from #2277 to avoid merge conflicts.