Some changes are not shown.
For a faster browsing experience, only 20 of 211+ files are shown. Download one of the files below to see all changes.
bin/runtime-common/src/mock.rs
deleted
100644 → 0
34.8 KiB
docs/bridge-relayers-deregister.png
deleted
100644 → 0
9.88 KiB
docs/bridge-relayers-register.png
deleted
100644 → 0
49.8 KiB
docs/complex-relay.html
deleted
100644 → 0
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Complex Relay</title> | ||
</head> | ||
<body> | ||
<h1>Complex Relay</h1> | ||
<p> | ||
Both Source Chain and Target Chains have Bridge Messages pallets deployed. They also have required | ||
finality pallets deployed - we don't care about finality type here - they can be either Bridge GRANDPA, | ||
or Bridge Parachains finality pallets, or any combination of those.<br/> | ||
</p> | ||
<p> | ||
There are 4-6 relayer subprocesses inside the Complex Relayer. They include two message relayers, | ||
serving the lane in both directions and 2-4 Complex Relayers (depending on the finality type of Source | ||
and Target Chains).<br/> | ||
</p> | ||
<p> | ||
The following diagram shows the way the complex relayer serves the lane in single direction. Everything | ||
below may be applied to the opposite direction if you'll swap the Source and Target Chains. | ||
</p> | ||
<div class="mermaid"> | ||
sequenceDiagram | ||
participant Source Chain | ||
participant Complex Relayer | ||
participant Target Chain | ||
Note right of Source Chain: Finalized: 480, Target Finalized: 50, Sent Messages: 42, Confirmed Messages: 42 | ||
Note left of Target Chain: Finalized: 60, Source Finalized: 420, Received Messages: 42 | ||
Source Chain ->> Source Chain: someone Sends Message 43 | ||
Source Chain ->> Source Chain: Import and Finalize Block 481 | ||
Source Chain ->> Complex Relayer: notes new outbound message 43 at Source Chain Block 481 | ||
Note right of Complex Relayer: can't deliver message 43, Source Chain Block 481 is not relayed | ||
Complex Relayer ->> Complex Relayer: asks on-demand Finality Relayer to relay Source Chain Block 481 | ||
Source Chain ->> Complex Relayer: Read Finality Proof of Block 481 | ||
Complex Relayer ->> Target Chain: Submit Finality Proof of Block 481 | ||
Target Chain ->> Target Chain: Import and Finalize Block 61 | ||
Note left of Target Chain: Finalized: 61, Source Finalized: 481, Received Messages: 42 | ||
Source Chain ->> Complex Relayer: Read Proof of Message 43 at Block 481 | ||
Complex Relayer ->> Target Chain: Submit Proof of Message 43 at Block 481 | ||
Target Chain ->> Target Chain: Import and Finalize Block 62 | ||
Note left of Target Chain: Finalized: 62, Source Finalized: 481, Received Messages: { rewarded: 42, messages-relayer-account: [43] } | ||
Target Chain ->> Complex Relayer: notes new unrewarded relayer at Target Chain Block 62 | ||
Note right of Complex Relayer: can't relay delivery confirmations because Target Chain Block 62 is not relayed | ||
Complex Relayer ->> Complex Relayer: asks on-demand Finality Relayer to relay Target Chain Block 62 | ||
Target Chain ->> Complex Relayer: Read Finality Proof of Block 62 | ||
Complex Relayer ->> Source Chain: Submit Finality Proof of Block 62 | ||
Source Chain ->> Source Chain: Import and Finalize Block 482 | ||
Note right of Source Chain: Finalized: 482, Target Finalized: 62, Confirmed Messages: 42 | ||
Target Chain ->> Complex Relayer: Read Proof of Message 43 Delivery at Block 62 | ||
Complex Relayer ->> Source Chain: Submit Proof of Message 43 Delivery at Block 612 | ||
Source Chain ->> Source Chain: rewards messages-relayer-account for delivering message [43] | ||
Source Chain ->> Source Chain: prune delivered message 43 from runtime storage | ||
Note right of Source Chain: Finalized: 482, Target Finalized: 61, Confirmed Messages: 43 | ||
Source Chain ->> Source Chain: someone Sends Message 44 | ||
Source Chain ->> Source Chain: Import and Finalize Block 483 | ||
Source Chain ->> Complex Relayer: notes new outbound message 44 at Source Chain Block 483 and new confirmed message 43 | ||
Note right of Complex Relayer: can't deliver message 44, Source Chain Block 483 is not relayed | ||
Complex Relayer ->> Complex Relayer: asks on-demand Finality Relayer to relay Source Chain Block 483 | ||
Source Chain ->> Complex Relayer: Read Finality Proof of Block 483 | ||
Complex Relayer ->> Target Chain: Submit Finality Proof of Block 483 | ||
Target Chain ->> Target Chain: Import and Finalize Block 63 | ||
Note left of Target Chain: Finalized: 63, Source Finalized: 483, Received Messages: { rewarded: 42, messages-relayer-account: [43] } | ||
Source Chain ->> Complex Relayer: Read Proof of Message 44 and Proof of Message 43 reward at Block 483 | ||
Complex Relayer ->> Target Chain: Submit Proof of Message 44 and Proof of Message 43 reward at Block 483 | ||
Target Chain ->> Target Chain: Import and Finalize Block 64 | ||
Note left of Target Chain: Finalized: 64, Source Finalized: 483, Received Messages: { rewarded: 43, messages-relayer-account: [44] }--> | ||
</div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"></script> | ||
<script>mermaid.initialize({startOnLoad: true})</script> | ||
</body> | ||
</html> |
docs/grandpa-finality-relay.html
deleted
100644 → 0
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>GRANDPA Finality Relay</title> | ||
</head> | ||
<body> | ||
<h1>GRANDPA Finality Relay</h1> | ||
<p> | ||
Source Chain is running GRANDPA Finality Gadget. Bridge GRANDPA finality pallet is deployed at | ||
Target Chain runtime. Relayer is configured to relay Source Chain finality to Target Chain. | ||
</p> | ||
<div class="mermaid"> | ||
sequenceDiagram | ||
participant Source Chain | ||
participant Relayer | ||
participant Target Chain | ||
Note left of Source Chain: Best: 500, Finalized: 480, Authorities Set Index: 42 | ||
Note right of Target Chain: Uninitialized | ||
Source Chain ->> Relayer: Read Initialization Data | ||
Relayer ->> Target Chain: Initialize Bridge GRANDPA Finality Pallet | ||
Note right of Target Chain: Finalized: 480, Authorities Set Index: 42 | ||
Source Chain ->> Source Chain: Import Block 501 | ||
Source Chain ->> Source Chain: Import Block 502 | ||
Source Chain ->> Source Chain: Finalize Block 495 | ||
Source Chain ->> Relayer: Read Finality Proof of Block 495 | ||
Relayer ->> Target Chain: Finality Proof of Block 495 | ||
Note right of Target Chain: Finalized: 495, Authorities Set Index: 42 | ||
Source Chain ->> Source Chain: Import Block 503 that changes Authorities Set to 43 | ||
Source Chain ->> Source Chain: Finalize Block 500 | ||
Note left of Relayer: Relayer Misses Finality Notification for Block 500 | ||
Source Chain ->> Source Chain: Import Block 504 | ||
Source Chain ->> Source Chain: Finalize Mandatory Block 503 | ||
Source Chain ->> Source Chain: Finalize Block 504 | ||
Source Chain ->> Relayer: Read Finality Proof of Mandatory Block 503 | ||
Relayer ->> Target Chain: Finality Proof of Block 503 | ||
Note right of Target Chain: Finalized: 503, Authorities Set Index: 43 | ||
</div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"></script> | ||
<script>mermaid.initialize({startOnLoad: true})</script> | ||
</body> | ||
</html> |
docs/high-level-overview.md
deleted
100644 → 0
docs/messages-relay.html
deleted
100644 → 0
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Messages Relay</title> | ||
</head> | ||
<body> | ||
<h1>Messages Relay</h1> | ||
<p> | ||
Both Source Chain and Target Chains have Bridge Messages pallets deployed. They also have required | ||
finality pallets deployed - we don't care about finality type here - they can be either Bridge GRANDPA, | ||
or Bridge Parachains finality pallets, or any combination of those. | ||
</p> | ||
<p> | ||
Finality Relayer represents two actual relayers - one relays Source Chain Finality to Target Chain. | ||
And another one relays Target Chain Finality to Source Chain. | ||
</p> | ||
<div class="mermaid"> | ||
sequenceDiagram | ||
participant Source Chain | ||
participant Finality Relayer | ||
participant Messages Relayer | ||
participant Target Chain | ||
Note right of Source Chain: Finalized: 480, Target Finalized: 50, Sent Messages: 42, Confirmed Messages: 42 | ||
Note left of Target Chain: Finalized: 60, Source Finalized: 420, Received Messages: 42 | ||
Source Chain ->> Source Chain: someone Sends Message 43 | ||
Source Chain ->> Source Chain: Import and Finalize Block 481 | ||
Source Chain ->> Messages Relayer: notes new outbound message 43 at Source Chain Block 481 | ||
Note right of Messages Relayer: can't deliver message 43, Source Chain Block 481 is not relayed | ||
Source Chain ->> Finality Relayer: Read Finality Proof of Block 481 | ||
Finality Relayer ->> Target Chain: Submit Finality Proof of Block 481 | ||
Target Chain ->> Target Chain: Import and Finalize Block 61 | ||
Note left of Target Chain: Finalized: 61, Source Finalized: 481, Received Messages: 42 | ||
Source Chain ->> Messages Relayer: Read Proof of Message 43 at Block 481 | ||
Messages Relayer ->> Target Chain: Submit Proof of Message 43 at Block 481 | ||
Target Chain ->> Target Chain: Import and Finalize Block 62 | ||
Note left of Target Chain: Finalized: 62, Source Finalized: 481, Received Messages: { rewarded: 42, messages-relayer-account: [43] } | ||
Target Chain ->> Messages Relayer: notes new unrewarded relayer at Target Chain Block 62 | ||
Note right of Messages Relayer: can't relay delivery confirmations because Target Chain Block 62 is not relayed | ||
Target Chain ->> Finality Relayer: Read Finality Proof of Block 62 | ||
Finality Relayer ->> Source Chain: Submit Finality Proof of Block 62 | ||
Source Chain ->> Source Chain: Import and Finalize Block 482 | ||
Note right of Source Chain: Finalized: 482, Target Finalized: 62, Confirmed Messages: 42 | ||
Target Chain ->> Messages Relayer: Read Proof of Message 43 Delivery at Block 62 | ||
Messages Relayer ->> Source Chain: Submit Proof of Message 43 Delivery at Block 612 | ||
Source Chain ->> Source Chain: rewards messages-relayer-account for delivering message [43] | ||
Source Chain ->> Source Chain: prune delivered message 43 from runtime storage | ||
Note right of Source Chain: Finalized: 482, Target Finalized: 61, Confirmed Messages: 43 | ||
Source Chain ->> Source Chain: someone Sends Message 44 | ||
Source Chain ->> Source Chain: Import and Finalize Block 483 | ||
Source Chain ->> Messages Relayer: notes new outbound message 44 at Source Chain Block 483 and new confirmed message 43 | ||
Note right of Messages Relayer: can't deliver message 44, Source Chain Block 483 is not relayed | ||
Source Chain ->> Finality Relayer: Read Finality Proof of Block 483 | ||
Finality Relayer ->> Target Chain: Submit Finality Proof of Block 483 | ||
Target Chain ->> Target Chain: Import and Finalize Block 63 | ||
Note left of Target Chain: Finalized: 63, Source Finalized: 483, Received Messages: { rewarded: 42, messages-relayer-account: [43] } | ||
Source Chain ->> Messages Relayer: Read Proof of Message 44 and Proof of Message 43 reward at Block 483 | ||
Messages Relayer ->> Target Chain: Submit Proof of Message 44 and Proof of Message 43 reward at Block 483 | ||
Target Chain ->> Target Chain: Import and Finalize Block 64 | ||
Note left of Target Chain: Finalized: 64, Source Finalized: 483, Received Messages: { rewarded: 43, messages-relayer-account: [44] } | ||
</div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"></script> | ||
<script>mermaid.initialize({startOnLoad: true})</script> | ||
</body> | ||
</html> |
docs/parachains-finality-relay.html
deleted
100644 → 0
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Parachains Finality Relay</title> | ||
</head> | ||
<body> | ||
<h1>Parachains Finality Relay</h1> | ||
<p> | ||
Source Relay Chain is running GRANDPA Finality Gadget. Source Parachain is a parachain of the Source | ||
Relay Chain. Bridge GRANDPA finality pallet is deployed at Target Chain runtime and is "connected" | ||
to the Source Relay Chain. Bridge Parachains finality pallet is deployed at Target Chain and is | ||
configured to track the Source Parachain. GRANDPA Relayer is configured to relay Source Relay Chain | ||
finality to Target Chain. Parachains Relayer is configured to relay Source Parachain headers finality | ||
to Target Chain. | ||
</p> | ||
<div class="mermaid"> | ||
sequenceDiagram | ||
participant Source Parachain | ||
participant Source Relay Chain | ||
participant GRANDPA Relayer | ||
participant Parachains Relayer | ||
participant Target Chain | ||
Note left of Source Parachain: Best: 125 | ||
Note left of Source Relay Chain: Finalized: 500, Best Parachain at Finalized: 120 | ||
Note right of Target Chain: Best Relay: 480, Best Parachain: 110 | ||
Source Parachain ->> Source Parachain: Import Block 126 | ||
Source Parachain ->> Source Relay Chain: Receives the Parachain block 126 | ||
Source Relay Chain ->> Source Relay Chain: Import block 501 | ||
Source Relay Chain ->> Source Relay Chain: Finalize block 501 | ||
Note left of Source Relay Chain: Finalized: 501, Best Parachain at Finalized: 126 | ||
Source Relay Chain ->> Parachains Relayer: notes new Source Parachain Block 126 | ||
Note left of Parachains Relayer: can't relay Source Parachain Block 126, because it requires at least Source Relay Block 501 at Target Chain | ||
Source Relay Chain ->> Source Relay Chain: Import block 502 | ||
Source Relay Chain ->> Source Relay Chain: Finalize block 502 | ||
Source Relay Chain ->> GRANDPA Relayer: read GRANDPA Finality Proof of Block 502 | ||
GRANDPA Relayer ->> Target Chain: submit GRANDPA Finality Proof of Block 502 | ||
Note right of Target Chain: Best Relay: 502, Best Parachain: 110 | ||
Target Chain ->> Parachains Relayer: notes finalized Source Relay Block 502 at Target Chain | ||
Source Relay Chain ->> Parachains Relayer: read Parachain Finality Proof at Relay Block 502 | ||
Parachains Relayer ->> Target Chain: submit Parachain Finality Proof at Relay Block 502 | ||
Note right of Target Chain: Best Relay: 502, Best Parachain: 126 | ||
</div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"></script> | ||
<script>mermaid.initialize({startOnLoad: true})</script> | ||
</body> | ||
</html> |
docs/polkadot-kusama-bridge.html
deleted
100644 → 0
docs/running-relayer.md
deleted
100644 → 0