Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
a8ae048a
Commit
a8ae048a
authored
4 years ago
by
Hernando Castano
Committed by
Bastian Köcher
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add correct Docker commands in README (#580)
* Add correct Docker commands in README * Split long line
parent
63e2655c
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bridges/README.md
+53
-18
53 additions, 18 deletions
bridges/README.md
with
53 additions
and
18 deletions
bridges/README.md
+
53
−
18
View file @
a8ae048a
...
...
@@ -101,7 +101,7 @@ There are 3 ways to run the bridge, described below:
- building or using Docker images for each individual component,
- running a Docker Compose setup (recommended).
###
Building
###
Using the Source
First you'll need to build the bridge nodes and relay. This can be done as follows:
...
...
@@ -115,41 +115,76 @@ cargo build -p substrate-relay
### Running
To run a simple dev network you'll can use the scripts located in
[the `scripts` folder](./scripts). Since the relay connects to
both Substrate chains it must be run
last.
[the `
deployments/local-
scripts` folder](./
deployments/local-
scripts). Since the relay
er
connects to
both Substrate chains it must be run
last.
```
bash
# In `parity-bridges-common` folder
./deployments/local-scripts/run-rialto-bridge-node.sh
./deployments/local-scripts/run-millau-bridge-node.sh
./deployments/local-scripts/run-millau-to-rialto-relay.sh
./deployments/local-scripts/run-rialto-to-millau-relay.sh
```
At this point you should see the relayer submitting
block
s from the Millau Substrate chain to the
Rialto Substrate chain
and vice-versa
.
At this point you should see the relayer submitting
header
s from the Millau Substrate chain to the
Rialto Substrate chain.
### Local Docker Build
If you want to make a Docker container using your local source files you can run the following
command at the top level of the repository:
### Local Docker Setup
```
bash
docker build . -t local/rialto-bridge-node --build-arg PROJECT=rialto-bridge-node
docker build . -t local/millau-bridge-node --build-arg PROJECT=millau-bridge-node
docker build . -t local/substrate-relay --build-arg PROJECT=substrate-relay
```
To get up and running quickly you can use published Docker images for the bridge nodes and relayer.
The images are published on [Docker Hub](https://hub.docker.com/u/paritytech).
You can then
run the
ne
two
rk as follow
s:
To run the dev network we first
run the two
bridge node
s:
```
bash
docker run -it local/rialto-bridge-node --dev --tmp
docker run -it local/millau-bridge-node --dev --tmp
docker run -it local/substrate-relay
docker run -p 30333:30333 -p 9933:9933 -p 9944:9944
\
-it paritytech/rialto-bridge-node --dev --tmp
\
--rpc-cors=all --unsafe-rpc-external --unsafe-ws-external
docker run -p 30334:30333 -p 9934:9933 -p 9945:9944
\
-it paritytech/millau-bridge-node --dev --tmp
\
--rpc-cors=all --unsafe-rpc-external --unsafe-ws-external
```
Notice that the `docker run` command will accept all the normal Substrate flags. For local
development you should at minimum run with the `--dev` flag or else no blocks will be produced.
Then we need to initialize and run the relayer:
```
bash
docker run --network=host -it
\
paritytech/substrate-relay initialize-rialto-headers-bridge-in-millau
\
--millau-host localhost
\
--millau-port 9945
\
--rialto-host localhost
\
--rialto-port 9944
\
--millau-signer //Alice
docker run --network=host -it
\
paritytech/substrate-relay rialto-headers-to-millau
\
--millau-host localhost
\
--millau-port 9945
\
--rialto-host localhost
\
--rialto-port 9944
\
--millau-signer //Bob
\
```
You should now see the relayer submitting headers from the Millau chain to the Rialto chain.
If you don't want to use the published Docker images you can build images yourself. You can do this
by running the following commands at the top level of the repository.
```
bash
# In `parity-bridges-common` folder
docker build . -t local/rialto-bridge-node --build-arg PROJECT=rialto-bridge-node
docker build . -t local/millau-bridge-node --build-arg PROJECT=millau-bridge-node
docker build . -t local/substrate-relay --build-arg PROJECT=substrate-relay
```
_Note: Building the node images will take a long time, so make sure you have some coffee handy._
Once you have the images built you can use them in the previous commands by replacing
`paritytech/<component_name>` with `local/<component_name>` everywhere.
### Full Network Docker Compose Setup
For a more sophisticated deployment which includes bidirectional header sync, message passing,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment