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

Substrate bridge documentation #44

Merged
merged 59 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3ee3b1f
First contributions
bgodlin May 30, 2023
4b463a2
Bridge documentation MVP
bgodlin May 31, 2023
92d1df2
Apply suggestions from code review
bgodlin May 31, 2023
c5bb989
Merge branch 'develop' into 7-substrate-bridge-documentation
f33r0 Jun 9, 2023
dcb9ec1
Merge branch 'develop' into 7-substrate-bridge-documentation
f33r0 Jun 9, 2023
b0ac60c
Merge branch 'develop' into 7-substrate-bridge-documentation
bgodlin Jun 21, 2023
2345d8e
Added TODOs, status check guide
bgodlin Jun 21, 2023
824849d
Update hashi.md
tarmovannas Jun 26, 2023
750c162
Merge branch 'develop' into 7-substrate-bridge-documentation
bgodlin Jul 6, 2023
70ff68d
Merge branch 'develop' into 7-substrate-bridge-documentation
bgodlin Aug 15, 2023
112f70f
Establish HRMP channel article added
bgodlin Aug 15, 2023
1d31164
Prettified Code!
bgodlin Aug 15, 2023
9e7573f
Apply suggestions from code review
bgodlin Aug 17, 2023
b242583
Update establishing-hrmp-channel.md
bgodlin Aug 17, 2023
c1b500a
Merge pull request #136 from sora-xor/135-adding-hrmp-channel-establi…
bgodlin Aug 18, 2023
84d7050
Merge branch 'develop' into 7-substrate-bridge-documentation
bgodlin Oct 6, 2023
c0481ea
Changes applied
bgodlin Oct 6, 2023
52b12d9
Prettified Code!
bgodlin Oct 6, 2023
ebc6fa9
Fixed dead links
bgodlin Oct 9, 2023
2c1dee3
Apply the suggestion for src/establishing-hrmp-channel.md
bgodlin Oct 9, 2023
9eb5b65
Apply the suggestion for src/establishing-hrmp-channel.md
bgodlin Oct 9, 2023
425b93f
Apply the suggestion for src/establishing-hrmp-channel.md
bgodlin Oct 9, 2023
0b28f98
Apply the suggestion for src/interoperability.md
bgodlin Oct 9, 2023
974c5f6
Apply the suggestion for src/interoperability.md
bgodlin Oct 9, 2023
b2cb69e
Prettified Code!
bgodlin Oct 9, 2023
c95419b
Apply formatting changes
bgodlin Oct 9, 2023
dd372d2
Apply the suggestion for src/substrate-bridge.md
bgodlin Oct 9, 2023
f5d09e7
Apply the suggestion for src/substrate-bridge.md
bgodlin Oct 9, 2023
b16e653
Apply the suggestion for src/substrate-bridge.md
bgodlin Oct 9, 2023
76dd12f
Apply the suggestion for src/substrate-bridge.md
bgodlin Oct 9, 2023
d9641fb
Apply the suggestion for src/substrate-bridge.md
bgodlin Oct 9, 2023
3b52ad7
Prettified Code!
bgodlin Oct 9, 2023
0df38d5
Merge branch '7-substrate-bridge-documentation' of https://github.com…
bgodlin Oct 9, 2023
8b97858
Formatted `config.mts`
bgodlin Oct 9, 2023
8351d67
Added Description for Bridge Type Differences
bgodlin Oct 12, 2023
18410c8
Changed Colors on the Component Diagram
bgodlin Oct 12, 2023
3f63407
Applied Improvements to `Parachain to SORA` flow
bgodlin Oct 12, 2023
308d1d4
Applied Improvements to `SORA to Parachain` flow
bgodlin Oct 12, 2023
5c82db5
Prettified Code!
bgodlin Oct 12, 2023
4fcb7cd
Removed `ethreum-bridge` and it's dependencies
bgodlin Oct 12, 2023
219e99f
Apply suggestions from code review
bgodlin Oct 13, 2023
f878293
Component Diagram Fixed
bgodlin Oct 16, 2023
b39c00a
Update src/interoperability.md
bgodlin Oct 16, 2023
b01e0da
Update src/establishing-hrmp-channel.md
bgodlin Oct 16, 2023
07787a3
Update src/establishing-hrmp-channel.md
bgodlin Oct 16, 2023
5b550df
Update src/establishing-hrmp-channel.md
bgodlin Oct 16, 2023
e5a89b2
Update src/interoperability.md
bgodlin Oct 16, 2023
b407122
Update src/substrate-bridge.md
bgodlin Oct 16, 2023
66469cb
Update src/substrate-bridge.md
bgodlin Oct 16, 2023
2cf7bed
Update src/substrate-bridge.md
bgodlin Oct 16, 2023
984d221
`Github Link` -> `source code`
bgodlin Oct 16, 2023
68061e9
Headings Capitalised
bgodlin Oct 16, 2023
71b66e0
Update src/interoperability.md
bgodlin Oct 17, 2023
a7bdb5c
Prettified Code!
bgodlin Oct 17, 2023
00011f6
**BridgeDataSigner** description changed
bgodlin Oct 23, 2023
9095bec
**MultisigVerifier** Description Changed
bgodlin Oct 23, 2023
d668f09
Added Changes to Guides
bgodlin Oct 23, 2023
ab61572
Prettified Code!
bgodlin Oct 23, 2023
8572595
Update src/substrate-bridge.md
bgodlin Oct 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,15 @@ export default defineConfig({
},
{
text: "Interoperability",
link: "interoperability",
collapsed: true,
items: [
{
text: "EVM",
items: [
{
text: "HASHI",
link: "hashi",
items: [
{
text: "Adding a token",
Expand All @@ -149,10 +151,15 @@ export default defineConfig({
},
],
},
{ text: "Trustless" },
],
},
{ text: "Substrate", items: [{ text: "Become a relayer" }] },
{
text: "Substrate",
link: "substrate-bridge",
items: [
// { text: "Become a relayer" },
],
},
],
},
{ text: "Referral system", link: "/referral" },
Expand Down
Binary file added src/assets/sidechain-token-registration.png

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we renamed substrateBridgeApp to parachainBridgeApp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already addressed

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/substrate-bridge-components-svg.svg
outoftardis marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/substrate-bridge-components.png
outoftardis marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/thischain-token-registration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/token-burn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/transfer-to-parachain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/hashi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# HASHI bridge

This article is about a HASHI bridge - a decentralized two-way bridge connecting SORA and Ethereum. HASHI means bridge in Japanese, and it will be the plumbing that links many different chains, like pipes connecting the world's assets. This bridge was a significant component of the plans for the beta launch of the SORA network in Q1 2021.

## Flows

To move assets from Ethereum to the SORA v2 network, users send their ETH or supported ERC-20 tokens to a bridge contract on Ethereum; then, the user submits proof of the ETH transaction to the SORA network via an extrinsics call.

![](https://miro.medium.com/v2/resize:fit:1100/format:webp/1*YiwUB4-nsN6QE_xjYBcB8A.png)

To move assets from the SORA v2 network to Ethereum, a user needs to send their assets to a designated account on the SORA network, then once grandpa finality is complete, the cryptographic proof of the transaction is submitted to the Ethereum smart contract.

![](https://miro.medium.com/v2/resize:fit:1100/format:webp/1*5QA0OxvpM0yg0djoSPU7rw.png)
15 changes: 15 additions & 0 deletions src/interoperability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Interoperability

## History

The SORA blockchain serves as an ecosystem for robust DeFi projects like SORA's decentralized global economic system and [Polkaswap](./polkaswap), a DEX specifically designed for an interoperable future. In line with this vision, we recognize that blockchain maximalism is no longer viable, and we acknowledge the importance of secure, fast, and efficient asset migration between blockchains.

As an initial step towards achieving this, we have developed the source code for [HASHI](./hashi), a decentralized two-way bridge connecting SORA and Ethereum. In addition to Ethereum, SORA aims to establish connections with various ecosystems. Being built on Substrate, it is advantageous to utilize the built-in cross-chain transfer capabilities to facilitate communication with projects running on the Polkadot and Kusama ecosystems. To achieve this, the [Substrate bridge](./substrate-bridge) was developed.

With multiple bridges already in operation, it becomes necessary to streamline the bridge interface to ensure consistent software components for cross-chain transfers across different heterogeneous blockchains. As a solution, the "Federated Bridge" was created to serve as the gateway between the SORA mainnet and the external world. The term "federated" is used because this bridge inherits certain features from a federated architecture.
bgodlin marked this conversation as resolved.
Show resolved Hide resolved

The federated bridge follows the following workflow; The user initiates a transfer by calling an extrinsic. Upon detecting a new transaction on the source network, each peer signs it with their respective key and registers the signature on the source network. Subsequently, active peers add their signatures to the user's transaction. Once a sufficient number of signatures are gathered, the transaction is forwarded to the target network via relayers. The relayers sign the messages before transmitting them. As a result, only the owner of the peer's private key can initiate this process. The target blockchain then verifies the recipient's compliance with the signature authority based on the consensus mechanism. If the verification is successful, the tokens will be released to the designated transfer agent's address on the new network.
bgodlin marked this conversation as resolved.
Show resolved Hide resolved

## Security

As all bridges are quite technically complex, teams building on the SORA network may want guarantees that there will not be financial loss resulting from any technical difficulties with the bridge. While this will be explained more in a future article, the SORA Parliament will provide insurance for infrastructure that is deemed systemically important to the ecosystem. [Systemically Important Infrastructure (SII)](./social-insurance) will need to concede governance to the SORA Parliament, but in exchange, the Parliament will commit to socialize any losses, in order to give network participants the confidence to use the SORA network. Details will be laid out in a future article.
Loading