Skip to content

Commit

Permalink
markdownlint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Mar 10, 2025
1 parent 506279a commit 6102a2d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
24 changes: 16 additions & 8 deletions bridges/snowbridge/pallets/inbound-queue-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,32 @@ Reads messages from Ethereum and sends them to intended destination on Polkadot,
## Architecture Overview

### Message Flow
**1. Ethereum Gateway Event:** A message is first emitted by a GatewayProxy contract on Ethereum in an OutboundMessageAccepted event. This event contains:
**1. Ethereum Gateway Event:** A message is first emitted by a GatewayProxy contract on Ethereum in an OutboundMessageAccepted
event. This event contains:
- A nonce (for replay protection).
- Information about the originating address, asset(s), and XCM payload.
- Relayer fee and execution fee (both in Ether).
This event is emitted when the `v2_registerToken` and `v2_sendMessage` is called on Ethereum.

**2. Relayer Submits Proof:** A relayer gathers the event proof (containing the Ethereum event log and the proofs required - receipts proof and execution header proof) and calls the `submit` extrinsic of this pallet.
**2. Relayer Submits Proof:** A relayer gathers the event proof (containing the Ethereum event log and the proofs required:
receipts proof and execution header proof) and calls the `submit` extrinsic of this pallet.

**3. Verification:** The supplied proof is verified by an on-chain Verifier (configured in the runtime as the EthereumBeaconClient). The verifier checks that the header containing the message is valid. If verification fails, the submission is rejected.
**3. Verification:** The supplied proof is verified by an on-chain Verifier (configured in the runtime as the EthereumBeaconClient).
The verifier checks that the header containing the message is valid. If verification fails, the submission is rejected.

**4. Message Conversion:** Once verified, the message data is translated into XCM via a MessageConverter implementation. This translation includes extracting payload details, XCM instructions, and bridging asset references.
**4. Message Conversion:** Once verified, the message data is translated into XCM via a MessageConverter implementation.
This translation includes extracting payload details, XCM instructions, and bridging asset references.

**5. XCM Dispatch:** The resulting XCM message is dispatched to the target AssetHub parachain for further processing. Depending on the `xcm` provided in the payload, more messages may be sent to parachains after AssetHub.
**5. XCM Dispatch:** The resulting XCM message is dispatched to the target AssetHub parachain for further processing. Depending
on the `xcm` provided in the payload, more messages may be sent to parachains after AssetHub.

**6. Relayer Reward:** The relayer is rewarded with Ether (the relayer_fee portion), paid out by the configured RewardPayment handler, which accumulates rewards against a relayer account, which may be claimed.
**6. Relayer Reward:** The relayer is rewarded with Ether (the relayer_fee portion), paid out by the configured RewardPayment
handler, which accumulates rewards against a relayer account, which may be claimed.

### Key Components
#### Verifier
A trait-based component (snowbridge_inbound_queue_primitives::Verifier) responsible for verifying Ethereum events and proofs. The implementation for the verifier is the Ethereum client.
A trait-based component (snowbridge_inbound_queue_primitives::Verifier) responsible for verifying Ethereum events and proofs.
The implementation for the verifier is the Ethereum client.

#### Message Converter
Translates the Ethereum-provided message data (Message) into XCM instructions. The default implementation uses logic in MessageToXcm.
Expand All @@ -40,7 +47,8 @@ The pallet provides the following public extrinsics:

**1. Message Submission: `submit`**

Primary extrinsic for inbound messages. Relayers call this with a proof of the Gateway event from Ethereum. The process is described in [message-flow](#message-flow).
Primary extrinsic for inbound messages. Relayers call this with a proof of the Gateway event from Ethereum. The process
is described in [message-flow](#message-flow).

```
pub fn submit(
Expand Down
3 changes: 2 additions & 1 deletion bridges/snowbridge/pallets/system-v2/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Ethereum System V2

This pallet is part of BridgeHub. Certain extrinsics in this pallet (like `register_token` and `add_tip`) will be called from the System Frontend pallet on AssetHub.
This pallet is part of BridgeHub. Certain extrinsics in this pallet (like `register_token` and `add_tip`) will be called
from the System Frontend pallet on AssetHub.
3 changes: 2 additions & 1 deletion bridges/snowbridge/pallets/system-v2/runtime-api/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Ethereum System Runtime API V2

Provides an API for looking up an agent ID on Ethereum. An agent ID is a unique mapping to an Agent contract on Ethereum which acts as the sovereign account for the Location.
Provides an API for looking up an agent ID on Ethereum. An agent ID is a unique mapping to an Agent contract on Ethereum
which acts as the sovereign account for the Location.
4 changes: 3 additions & 1 deletion bridges/snowbridge/primitives/verification/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Verification Primitives

Defines traits and types for verifying event logs, transaction receipt proofs, and execution proofs, ensuring secure cross-chain message delivery. It provides validation mechanisms for Ethereum logs and proof structures to maintain the integrity of cross-chain communication.
Defines traits and types for verifying event logs, transaction receipt proofs, and execution proofs, ensuring secure
cross-chain message delivery. It provides validation mechanisms for Ethereum logs and proof structures to maintain the
integrity of cross-chain communication.

0 comments on commit 6102a2d

Please sign in to comment.