Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 7ee2415

Browse files
valentinfernandez1Valentin Fernandez
andauthored
Backport Zombienet and CI testing (#194)
* zombienet refactor and ci fix * swap-storage removed from CI * ci fix * CI fix --------- Co-authored-by: Valentin Fernandez <[email protected]>
1 parent 141571e commit 7ee2415

File tree

6 files changed

+193
-11
lines changed

6 files changed

+193
-11
lines changed

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
Altogether those technologies enable an array of exciting cross-chain applications & services:
1616

17-
![XCM use cases](xcm-use-cases.png)
17+
![XCM use cases](/docs/media/xcm-use-cases.png)
1818

1919

2020
This repository contains the source code of **Trappist**, a feature-rich parachain for exploring and learning about cross-chain applications and services, along with a script to run a complete local multi-chain environment that includes:
@@ -25,7 +25,7 @@ This repository contains the source code of **Trappist**, a feature-rich paracha
2525

2626
All these pre-configured to allow cross-chain communication via XCM messages on HRMP channels.
2727

28-
![Trappist topology](trappist-topology.png)
28+
![Trappist topology](/docs/media/trappist-topology.png)
2929

3030
### Why "Trappist" ?
3131

@@ -55,15 +55,15 @@ First, complete the [basic Rust setup instructions](./docs/rust-setup.md).
5555

5656
Use the following command to build the Trappist collator binary:
5757

58-
```
58+
```bash
5959
cargo b -r --features with-trappist-runtime
6060
cargo b -r --no-default-features --features with-stout-runtime --target-dir target_stout
61-
6261
```
6362

64-
Alternatively, run
65-
`bash ./scripts/build_runtimes.sh` .
66-
63+
Alternatively, run:
64+
```bash
65+
./scripts/build_runtimes.sh
66+
```
6767

6868
### XCM Playground via Zombienet
6969

@@ -72,16 +72,22 @@ Create a `bin` directory into the root of this repository and place the followin
7272
- `polkadot-parachain` (which you will build from [cumulus](https://github.com/paritytech/cumulus))
7373

7474
Download the [latest release of zombienet](https://github.com/paritytech/zombienet/releases/) into the root of this repository and make it executable:
75-
```
75+
```bash
7676
$ chmod +x zombienet-linux # OR
7777
$ chmod +x zombienet-macos
7878
```
7979

8080
Then, start the **Trappist** playground with:
81+
```bash
82+
./zombienet-linux -p native spawn ./zombienet/trappist_rococo.toml
8183
```
82-
./zombienet-linux -p native spawn xcm-playground.toml
84+
You can also run:
85+
```bash
86+
# To start Trappist and Stout together
87+
./zombienet-linux -p native spawn ./zombienet/full_network.toml
88+
# To only run stout
89+
./zombienet-linux -p native spawn ./zombienet/stout_rococo.toml
8390
```
84-
8591
### Integration Tests
8692
[parachains-integration-tests](https://github.com/paritytech/parachains-integration-tests) is a tool meant for XCM message execution in a locally spawned network. Tests are written as YAML files and converted into [Mocha](https://mochajs.org/) tests with [Chai](https://www.chaijs.com/) assertions.
8793

@@ -99,5 +105,4 @@ cd xcm-simulator && cargo test --release tests::; cd ..
99105
```
100106

101107
## License
102-
103108
Trappist is licensed under [Apache 2](LICENSE).

docs/media/trappist-topology.png

56.6 KB
Loading

docs/media/xcm-use-cases.png

46 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ default_command = "./bin/polkadot"
2121
validator = true
2222
extra_args = [ "-lparachain=debug" ]
2323

24+
[[relaychain.nodes]]
25+
name = "dave"
26+
validator = true
27+
extra_args = [ "-lparachain=debug" ]
28+
2429
[[parachains]]
2530
id = 1000
2631
add_to_genesis = true

zombienet/stout_rococo.toml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[settings]
2+
timeout = 1000
3+
4+
[relaychain]
5+
chain = "rococo-local"
6+
default_command = "./bin/polkadot"
7+
8+
[[relaychain.nodes]]
9+
name = "alice"
10+
validator = true
11+
ws_port = 9900
12+
extra_args = [ "-lparachain=debug" ]
13+
14+
[[relaychain.nodes]]
15+
name = "bob"
16+
validator = true
17+
extra_args = [ "-lparachain=debug" ]
18+
19+
[[relaychain.nodes]]
20+
name = "charlie"
21+
validator = true
22+
extra_args = [ "-lparachain=debug" ]
23+
24+
[[relaychain.nodes]]
25+
name = "dave"
26+
validator = true
27+
extra_args = [ "-lparachain=debug" ]
28+
29+
[[parachains]]
30+
id = 1000
31+
add_to_genesis = true
32+
cumulus_based = true
33+
chain = "statemine-local"
34+
35+
[[parachains.collators]]
36+
name = "statemine-collator01"
37+
command = "./bin/polkadot-parachain"
38+
ws_port = 9910
39+
args = ["--log=xcm=trace,pallet-assets=trace"]
40+
41+
[[parachains.collators]]
42+
name = "statemine-collator02"
43+
command = "./bin/polkadot-parachain"
44+
ws_port = 9911
45+
args = ["--log=xcm=trace,pallet-assets=trace"]
46+
47+
[[parachains]]
48+
id = 3000
49+
add_to_genesis = true
50+
cumulus_based = true
51+
chain = "stout-local"
52+
53+
[[parachains.collators]]
54+
name = "stout-collator01"
55+
command = "./target_stout/release/stout-collator"
56+
ws_port = 9930
57+
args = ["--log=xcm=trace,pallet-assets=trace"]
58+
59+
[[parachains.collators]]
60+
name = "stout-collator02"
61+
command = "./target_stout/release/stout-collator"
62+
ws_port = 9931
63+
args = ["--log=xcm=trace,pallet-assets=trace"]
64+
65+
[types.Header]
66+
number = "u64"
67+
parent_hash = "Hash"
68+
post_state = "Hash"
69+
70+
[[hrmp_channels]]
71+
sender = 1000
72+
recipient = 3000
73+
max_capacity = 8
74+
max_message_size = 512
75+
76+
[[hrmp_channels]]
77+
sender = 3000
78+
recipient = 1000
79+
max_capacity = 8
80+
max_message_size = 512
81+
82+
[[hrmp_channels]]
83+
sender = 1836
84+
recipient = 3000
85+
max_capacity = 8
86+
max_message_size = 512
87+
88+
[[hrmp_channels]]
89+
sender = 3000
90+
recipient = 1836
91+
max_capacity = 8
92+
max_message_size = 512

zombienet/trappist_rococo.toml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
[settings]
2+
timeout = 1000
3+
4+
[relaychain]
5+
chain = "rococo-local"
6+
default_command = "./bin/polkadot"
7+
8+
[[relaychain.nodes]]
9+
name = "alice"
10+
validator = true
11+
ws_port = 9900
12+
extra_args = [ "-lparachain=debug" ]
13+
14+
[[relaychain.nodes]]
15+
name = "bob"
16+
validator = true
17+
extra_args = [ "-lparachain=debug" ]
18+
19+
[[relaychain.nodes]]
20+
name = "charlie"
21+
validator = true
22+
extra_args = [ "-lparachain=debug" ]
23+
24+
[[relaychain.nodes]]
25+
name = "dave"
26+
validator = true
27+
extra_args = [ "-lparachain=debug" ]
28+
29+
[[parachains]]
30+
id = 1000
31+
add_to_genesis = true
32+
cumulus_based = true
33+
chain = "statemine-local"
34+
35+
[[parachains.collators]]
36+
name = "statemine-collator01"
37+
command = "./bin/polkadot-parachain"
38+
ws_port = 9910
39+
args = ["--log=xcm=trace,pallet-assets=trace"]
40+
41+
[[parachains.collators]]
42+
name = "statemine-collator02"
43+
command = "./bin/polkadot-parachain"
44+
ws_port = 9911
45+
args = ["--log=xcm=trace,pallet-assets=trace"]
46+
47+
[[parachains]]
48+
id = 1836
49+
add_to_genesis = true
50+
cumulus_based = true
51+
chain = "trappist-local"
52+
53+
[[parachains.collators]]
54+
name = "trappist-collator01"
55+
command = "./target/release/trappist-collator"
56+
ws_port = 9920
57+
args = ["--log=xcm=trace,pallet-assets=trace"]
58+
59+
[[parachains.collators]]
60+
name = "trappist-collator02"
61+
command = "./target/release/trappist-collator"
62+
ws_port = 9921
63+
args = ["--log=xcm=trace,pallet-assets=trace"]
64+
65+
[types.Header]
66+
number = "u64"
67+
parent_hash = "Hash"
68+
post_state = "Hash"
69+
70+
[[hrmp_channels]]
71+
sender = 1000
72+
recipient = 1836
73+
max_capacity = 8
74+
max_message_size = 512
75+
76+
[[hrmp_channels]]
77+
sender = 1836
78+
recipient = 1000
79+
max_capacity = 8
80+
max_message_size = 512

0 commit comments

Comments
 (0)