11# How to Run
22
3+ ## Using ` just `
4+
5+ ### Run prerequisites
6+
7+ It's only needed once after checkout or when dependencies change:
8+ - ` just build `
9+ - ` just npm-install `
10+
11+ ### Run full workflow example
12+ - ` just authorize-and-store papi ` - for PAPI,
13+ - ` just authorize-and-store pjs ` - for PJS.
14+
15+ #### Run individual commands for manual testing
16+ - ` just ipfs-init ` - Initialize IPFS (if needed),
17+ - ` just ipfs-start ` - Start IPFS daemon,
18+ - ` just ipfs-connect ` - Connect to IPFS nodes,
19+ - ` just bulletin-zombienet-start ` - Start zombienet,
20+ - ` just ipfs-reconnect-start ` - Start IPFS reconnect script,
21+ - ` just papi-generate ` - Generate PAPI descriptors,
22+ - ` just run-example papi ` - Run example with PAPI or PJS,
23+ - ` just stop-services ` - Stop all services
24+
25+ ## Manually
26+
327
428``` shell
529cd polkadot-bulletin-chain # make you are inside the project directory for the following steps
630```
731
8- ## Download Zombienet
32+ ### Download Zombienet
933
1034``` shell
1135OS=" $( uname -s) "
@@ -29,7 +53,7 @@ wget "https://github.com/paritytech/zombienet/releases/download/v1.3.133/${zb_bi
2953chmod +x " ${zb_bin} "
3054```
3155
32- ## Run Kubo
56+ ### Run Kubo
3357
3458#### Execute Locally
3559
@@ -51,7 +75,7 @@ docker run -d --name ipfs-node -v ipfs-data:/data/ipfs -p 4001:4001 -p 8080:8080
5175docker logs -f ipfs-node
5276```
5377
54- ## Run Bulletin Solochain with ` --ipfs-server `
78+ ### Run Bulletin Solochain with ` --ipfs-server `
5579
5680``` shell
5781# Bulletin Solochain
@@ -63,7 +87,7 @@ cargo build --release -p polkadot-bulletin-chain
6387POLKADOT_BULLETIN_BINARY_PATH=./target/release/polkadot-bulletin-chain \
6488 ./$( ls zombienet-* -* ) -p native spawn ./zombienet/bulletin-polkadot-local.toml
6589
66- # ## Connect IPFS Nodes
90+ # ### Connect IPFS Nodes
6791
6892` ` ` shell
6993# Uses Kubo
@@ -86,9 +110,9 @@ docker exec -it ipfs-node ipfs swarm connect /ip4/172.17.0.1/tcp/12347/ws/p2p/12
86110./scripts/ipfs-reconnect-solo.sh
87111```
88112
89- ## Run Bulletin (Westend) Parachain with ` --ipfs-server `
113+ ### Run Bulletin (Westend) Parachain with ` --ipfs-server `
90114
91- ### Prerequisites
115+ #### Prerequisites
92116
93117``` shell
94118mkdir -p ~ /local_bridge_testing/bin
@@ -114,7 +138,7 @@ cp target/release/polkadot-parachain ~/local_bridge_testing/bin
114138# polkadot-parachain 1.20.2-165ba47dc91 or higher
115139```
116140
117- ### Launch Parachain
141+ #### Launch Parachain
118142
119143``` shell
120144# Bulletin Parachain (Westend)
@@ -124,7 +148,7 @@ POLKADOT_BINARY_PATH=~/local_bridge_testing/bin/polkadot \
124148 ./$( ls zombienet-* -* ) -p native spawn ./zombienet/bulletin-westend-local.toml
125149```
126150
127- ### Connect IPFS Nodes
151+ #### Connect IPFS Nodes
128152
129153``` shell
130154# Uses Kubo
@@ -147,19 +171,19 @@ docker exec -it ipfs-node ipfs swarm connect /ip4/172.17.0.1/tcp/12347/ws/p2p/12
147171./scripts/ipfs-reconnect-westend.sh
148172```
149173
150- ## Trigger Authorize, Store and IPFS Get
174+ ### Trigger Authorize, Store and IPFS Get
151175
152- ### Example for Simple Authorizing and Store
176+ #### Example for Simple Authorizing and Store
153177
154- #### Using Legacy @polkadot/api (PJS)
178+ ##### Using Legacy @polkadot/api (PJS)
155179```
156180cd examples
157181npm install
158182
159183node authorize_and_store.js
160184```
161185
162- #### Using Modern PAPI (Polkadot API)
186+ ##### Using Modern PAPI (Polkadot API)
163187``` bash
164188cd examples
165189npm install
@@ -175,7 +199,7 @@ npm run papi:update
175199node authorize_and_store_papi.js
176200```
177201
178- ### Example for Multipart / Chunked Content / Big Files
202+ #### Example for Multipart / Chunked Content / Big Files
179203
180204The code stores one file, splits it into chunks, and then uploads those chunks to Bulletin.
181205
0 commit comments