Skip to content
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

Merged
merged 7 commits into from
Jan 10, 2024
Merged

XChainBridge Docs #2305

merged 7 commits into from
Jan 10, 2024

Conversation

oeggert
Copy link
Collaborator

@oeggert oeggert commented Dec 15, 2023

Adding docs for 2.0 release.

Updated branch from #2277 to avoid merge conflicts.

Copy link

Link check report. 619960 links checked.
Success! No broken links found.

Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/

Style Report


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.
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link

github-actions bot commented Jan 4, 2024

Link check report. 619930 links checked.
Success! No broken links found.

Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/

Style Report

@tequdev tequdev added the needs japanese translation PRs with English changes that need to be added/updated in the Japanese translation of the site label Jan 4, 2024
Copy link
Collaborator

@mDuo13 mDuo13 left a 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.

content/concepts/xrpl-sidechains/witness-servers.md Outdated Show resolved Hide resolved
content/concepts/xrpl-sidechains/cross-chain-bridges.md Outdated Show resolved Hide resolved
content/concepts/xrpl-sidechains/cross-chain-bridges.md Outdated Show resolved Hide resolved
content/concepts/xrpl-sidechains/witness-servers.md Outdated Show resolved Hide resolved
content/concepts/xrpl-sidechains/witness-servers.md Outdated Show resolved Hide resolved

| 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 |
Copy link
Collaborator

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?

Copy link
Collaborator Author

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/concepts/xrpl-sidechains/xrpl-sidechains.md Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jan 9, 2024

Link check report. 619940 links checked.
Success! No broken links found.

Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/

Style Report

Copy link

github-actions bot commented Jan 9, 2024

Link check report. 619946 links checked.
Success! No broken links found.

Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/

Style Report

@oeggert oeggert requested a review from mDuo13 January 10, 2024 00:17
Copy link

Link check report. 619952 links checked.
Success! No broken links found.

Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/

Style Report

1 similar comment
Copy link

Link check report. 619952 links checked.
Success! No broken links found.

Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/xchain-bridge-docs/

Style Report

@oeggert oeggert merged commit 2594aa3 into master Jan 10, 2024
3 of 4 checks passed
@oeggert oeggert deleted the xchain-bridge-docs branch January 10, 2024 01:09
Copy link
Contributor

@DennisDawson DennisDawson left a 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. |
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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:

Copy link
Contributor

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.
Copy link
Contributor

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. |
Copy link
Contributor

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. |
Copy link
Contributor

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. |
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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")
Copy link
Contributor

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?

@tequdev tequdev removed the needs japanese translation PRs with English changes that need to be added/updated in the Japanese translation of the site label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants