mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
ebbc4724d0
* Initial commit. CLI which parses RPC urls. * Establish ws connections and make simple RPC requests. * Complete bridge setup. * Process subscription events. * Ctrl-C handler. * Write a bare-bones README and copy in design doc. * Modularize code a little bit. * Communicate with each chain in a separate task. * Parse headers from RPC subscription notifications. * Send (fake) extrinsics across bridge channels. And now it's deadlocked. * Fix deadlock. * Clarify in README that this is not-in-progress. * Move everything into a single folder * Move Substrate relay into appropriate folder * Get the Substrate Relay node compiling * Update Cargo.lock * Use new composite accounts from Substrate * Remove specification document It has been moved to the Wiki on the Github repo. * Update author + remove comments * Use latest master for jsonrpsee Required renaming some stuff (e.g Client -> RawClient) Co-authored-by: Jim Posen <jim.posen@gmail.com>
33 lines
1.2 KiB
Markdown
33 lines
1.2 KiB
Markdown
# Substrate-to-Substrate Bridge Relay
|
|
|
|
The bridge relay is a process that connects to running Substrate nodes and sends data over the Substrate-to-Substrate bridge. The process communicates with the nodes over the JSON-RPC interface and reads data from the relays information required by the `bridge` pallet using runtime calls and writes data to the modules by constructing and submitting extrinsics.
|
|
|
|
For more details, see the [design document](doc/design.md).
|
|
|
|
## Status
|
|
|
|
This is a not-in-progress prototype.
|
|
|
|
## Running in development
|
|
|
|
Run two development Substrate chains:
|
|
|
|
```bash
|
|
> TMPDIR=(mktemp -d)
|
|
> cd $TMPDIR
|
|
> substrate build-spec --dev > red-spec.json
|
|
> cp red-spec.json blue-spec.json
|
|
# Modify the chain spec in an editor so that the genesis hashes of the two chains differ.
|
|
# For example, double one of the balances in '$.genesis.runtime.balances.balances'.
|
|
> substrate --chain red-spec.json --alice --base-path ./red --port 30343 --ws-port 9954
|
|
> substrate --chain blue-spec.json --alice --base-path ./blue --port 30353 --ws-port 9964
|
|
```
|
|
|
|
Now run the bridge relay:
|
|
|
|
```
|
|
> target/release/substrate-bridge --base-path ./relay \
|
|
--rpc-url ws://localhost:9954 \
|
|
--rpc-url ws://localhost:9964
|
|
```
|