Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ console-ui/playwright/.cache/
# Specs for zombienet (need to be fresh)
zombienet/bulletin-westend-spec.json
zombienet/bulletin-paseo-spec.json
zombienet/bulletin-polkadot-spec.json
17 changes: 16 additions & 1 deletion examples/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ bulletin-parachain-zombienet-start test_dir runtime="bulletin-westend-runtime":
elif [ "{{ runtime }}" = "bulletin-paseo-runtime" ]; then
SPEC_SCRIPT="create_bulletin_paseo_spec.sh"
ZOMBIENET_TOML="zombienet/bulletin-paseo-local.toml"
elif [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
SPEC_SCRIPT="create_bulletin_polkadot_spec.sh"
ZOMBIENET_TOML="zombienet/bulletin-polkadot-local.toml"
else
echo "❌ Unhandled runtime: {{ runtime }}"
exit 1
Expand Down Expand Up @@ -227,6 +230,10 @@ PASEO_PEER1_ID := "12D3KooWKjTeRJH8nMcFytc7qTTCQy7JrFgiZFr7iUjd1aPEBn8v"
PASEO_PEER1_PORT := "10001"
PASEO_PEER2_ID := "12D3KooWM8qgmWsh9ddbdX3kqR7W8tWuh62zhsdpwfs81eSnQuaH"
PASEO_PEER2_PORT := "12347"
POLKADOT_PEER1_ID := "12D3KooWGgRm1jr8y5qKQYBAvjwfufdSVTLUnzeJacFdUmR8Sqvt"
POLKADOT_PEER1_PORT := "10001"
POLKADOT_PEER2_ID := "12D3KooWMbdwf9fEURv6BAAEBXM3raYDdcWCZYfiZA4eZHaFjYPd"
POLKADOT_PEER2_PORT := "12347"


# Download and install Kubo IPFS binary
Expand Down Expand Up @@ -299,6 +306,8 @@ ipfs-kubo-start test_dir runtime: ipfs-kubo-install
PEERS='[{"ID":"{{ WESTEND_PEER1_ID }}","Addrs":["/ip4/127.0.0.1/tcp/{{ WESTEND_PEER1_PORT }}/ws"]},{"ID":"{{ WESTEND_PEER2_ID }}","Addrs":["/ip4/127.0.0.1/tcp/{{ WESTEND_PEER2_PORT }}/ws"]}]'
elif [ "{{ runtime }}" = "bulletin-paseo-runtime" ]; then
PEERS='[{"ID":"{{ PASEO_PEER1_ID }}","Addrs":["/ip4/127.0.0.1/tcp/{{ PASEO_PEER1_PORT }}/ws"]},{"ID":"{{ PASEO_PEER2_ID }}","Addrs":["/ip4/127.0.0.1/tcp/{{ PASEO_PEER2_PORT }}/ws"]}]'
elif [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
PEERS='[{"ID":"{{ POLKADOT_PEER1_ID }}","Addrs":["/ip4/127.0.0.1/tcp/{{ POLKADOT_PEER1_PORT }}/ws"]},{"ID":"{{ POLKADOT_PEER2_ID }}","Addrs":["/ip4/127.0.0.1/tcp/{{ POLKADOT_PEER2_PORT }}/ws"]}]'
else
echo "❌ Unhandled runtime: {{ runtime }}"
exit 1
Expand Down Expand Up @@ -430,6 +439,8 @@ ipfs-start test_dir runtime: _check-docker
PEERS="[{\"ID\":\"{{ WESTEND_PEER1_ID }}\",\"Addrs\":[\"${PEER_ADDR}/tcp/{{ WESTEND_PEER1_PORT }}/ws\"]},{\"ID\":\"{{ WESTEND_PEER2_ID }}\",\"Addrs\":[\"${PEER_ADDR}/tcp/{{ WESTEND_PEER2_PORT }}/ws\"]}]"
elif [ "{{ runtime }}" = "bulletin-paseo-runtime" ]; then
PEERS="[{\"ID\":\"{{ PASEO_PEER1_ID }}\",\"Addrs\":[\"${PEER_ADDR}/tcp/{{ PASEO_PEER1_PORT }}/ws\"]},{\"ID\":\"{{ PASEO_PEER2_ID }}\",\"Addrs\":[\"${PEER_ADDR}/tcp/{{ PASEO_PEER2_PORT }}/ws\"]}]"
elif [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
PEERS="[{\"ID\":\"{{ POLKADOT_PEER1_ID }}\",\"Addrs\":[\"${PEER_ADDR}/tcp/{{ POLKADOT_PEER1_PORT }}/ws\"]},{\"ID\":\"{{ POLKADOT_PEER2_ID }}\",\"Addrs\":[\"${PEER_ADDR}/tcp/{{ POLKADOT_PEER2_PORT }}/ws\"]}]"
else
echo "❌ Unhandled runtime: {{ runtime }}"
exit 1
Expand Down Expand Up @@ -494,7 +505,7 @@ setup-services test_dir runtime ipfs_mode="kubo-docker": npm-install
#!/usr/bin/env bash
set -e

if [ "{{ runtime }}" = "bulletin-westend-runtime" ] || [ "{{ runtime }}" = "bulletin-paseo-runtime" ]; then
if [ "{{ runtime }}" = "bulletin-westend-runtime" ] || [ "{{ runtime }}" = "bulletin-paseo-runtime" ] || [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
just bulletin-parachain-zombienet-start "{{ test_dir }}" "{{ runtime }}"
else
echo "❌ Unhandled runtime: {{ runtime }} specified!"
Expand Down Expand Up @@ -591,6 +602,8 @@ run-test-authorize-and-store test_dir runtime mode="ws" ws_url="ws://127.0.0.1:1
PARACHAIN_CHAINSPEC_PATH="{{ test_dir }}/bulletin-westend-collator-2/cfg/westend-local-1010.json"
elif [ "{{ runtime }}" = "bulletin-paseo-runtime" ]; then
PARACHAIN_CHAINSPEC_PATH="{{ test_dir }}/bulletin-paseo-collator-2/cfg/westend-local-1501.json"
elif [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
PARACHAIN_CHAINSPEC_PATH="{{ test_dir }}/bulletin-polkadot-collator-2/cfg/westend-local-1010.json"
else
echo "❌ Unhandled runtime: {{ runtime }}"
exit 1
Expand Down Expand Up @@ -800,6 +813,8 @@ run-authorize-and-store runtime mode="ws" ipfs_mode="kubo-docker": npm-install
PARACHAIN_CHAINSPEC_PATH="$TEST_DIR/bulletin-westend-collator-2/cfg/westend-local-1010.json"
elif [ "{{ runtime }}" = "bulletin-paseo-runtime" ]; then
PARACHAIN_CHAINSPEC_PATH="$TEST_DIR/bulletin-paseo-collator-2/cfg/westend-local-1501.json"
elif [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
PARACHAIN_CHAINSPEC_PATH="$TEST_DIR/bulletin-polkadot-collator-2/cfg/westend-local-1010.json"
else
echo "❌ Unhandled runtime: {{ runtime }}"
exit 1
Expand Down
59 changes: 59 additions & 0 deletions scripts/create_bulletin_polkadot_spec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash
#
# Build the bulletin-polkadot runtime WASM from the Polkadot Fellows
# `runtimes` repo and generate the chain spec used by the local zombienet
# config.
#
# The runtime is not part of this Cargo workspace, so we clone the upstream
# repository at a configurable ref and build it out-of-tree.
#
# Override the source via env vars (defaults track Fellows PR #1170):
# FELLOWS_RUNTIMES_REPO - git URL (default: bkontur/runtimes fork)
# FELLOWS_RUNTIMES_REF - branch / tag / sha (default: bko-bulletin-stage1)
# FELLOWS_RUNTIMES_DIR - local checkout dir (default: target/fellows-runtimes)

set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"

FELLOWS_RUNTIMES_REPO="${FELLOWS_RUNTIMES_REPO:-https://github.com/bkontur/runtimes.git}"
FELLOWS_RUNTIMES_REF="${FELLOWS_RUNTIMES_REF:-bko-bulletin-stage1}"
FELLOWS_RUNTIMES_DIR="${FELLOWS_RUNTIMES_DIR:-$ROOT_DIR/target/fellows-runtimes}"
Comment thread
x3c41a marked this conversation as resolved.
Outdated

mkdir -p "$(dirname "$FELLOWS_RUNTIMES_DIR")"

if [ ! -d "$FELLOWS_RUNTIMES_DIR/.git" ]; then
echo "📥 Cloning $FELLOWS_RUNTIMES_REPO into $FELLOWS_RUNTIMES_DIR..."
git clone --filter=blob:none "$FELLOWS_RUNTIMES_REPO" "$FELLOWS_RUNTIMES_DIR"
else
echo "♻️ Reusing existing checkout at $FELLOWS_RUNTIMES_DIR"
git -C "$FELLOWS_RUNTIMES_DIR" remote set-url origin "$FELLOWS_RUNTIMES_REPO"
fi

echo "🔀 Fetching ref: $FELLOWS_RUNTIMES_REF..."
git -C "$FELLOWS_RUNTIMES_DIR" fetch --depth 1 origin "$FELLOWS_RUNTIMES_REF"
git -C "$FELLOWS_RUNTIMES_DIR" checkout -q FETCH_HEAD

echo "🔨 Building bulletin-polkadot-runtime..."
(cd "$FELLOWS_RUNTIMES_DIR" && cargo build --release -p bulletin-polkadot-runtime)

WASM_PATH="$FELLOWS_RUNTIMES_DIR/target/release/wbuild/bulletin-polkadot-runtime/bulletin_polkadot_runtime.compact.compressed.wasm"
if [ ! -f "$WASM_PATH" ]; then
echo "❌ Expected WASM not found at: $WASM_PATH"
exit 1
fi

cd "$ROOT_DIR"

chain-spec-builder create \
-p 1010 \
-c westend \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

westend?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, per @bkontur comment below: for now westend is ok. we will change it to polkadot-local relay later on...

-i bulletin-polkadot \
-n Bulletin \
-t local \
-r "$WASM_PATH" \
named-preset local_testnet

mv chain_spec.json ./zombienet/bulletin-polkadot-spec.json
echo "✅ Wrote ./zombienet/bulletin-polkadot-spec.json"
11 changes: 11 additions & 0 deletions scripts/runtimes-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,16 @@
"pallet_xcm_benchmarks::generic": "templates/xcm-bench-template.hbs",
"pallet_xcm_benchmarks::fungible": "templates/xcm-bench-template.hbs"
}
},
{
"name": "bulletin-polkadot",
"package": "bulletin-polkadot-runtime",
"path": "external/fellows-runtimes/system-parachains/bulletin/bulletin-polkadot",
Comment thread
x3c41a marked this conversation as resolved.
Outdated
"uris": [],
Comment thread
x3c41a marked this conversation as resolved.
Outdated
"integration_tests": true,
"external_runtime": {
"repo": "https://github.com/bkontur/runtimes.git",
"ref": "bko-bulletin-stage1"
Comment thread
x3c41a marked this conversation as resolved.
Outdated
}
}
]
67 changes: 67 additions & 0 deletions zombienet/bulletin-polkadot-local.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# To run the network, execute the following command:
#
# cd <root dir>
# ./scripts/create_bulletin_polkadot_spec.sh
# POLKADOT_BINARY_PATH=~/local_bridge_testing/bin/polkadot POLKADOT_PARACHAIN_BINARY_PATH=~/local_bridge_testing/bin/polkadot-parachain zombienet -p native spawn ./zombienet/bulletin-polkadot-local.toml

[settings]
node_spawn_timeout = 240

[relaychain]
default_command = "{{POLKADOT_BINARY_PATH}}"
default_args = ["-lruntime=debug,xcm=trace"]
chain = "westend-local"

[[relaychain.nodes]]
name = "alice"
validator = true
p2p_port = 30333
rpc_port = 9942
balance = 2000000000000

[[relaychain.nodes]]
name = "bob"
validator = true
p2p_port = 30433
rpc_port = 9943
balance = 2000000000000

[[parachains]]
id = 1010
chain_spec_path = "./zombienet/bulletin-polkadot-spec.json"
cumulus_based = true

[[parachains.collators]]
name = "bulletin-polkadot-collator-1"
command = "{{POLKADOT_PARACHAIN_BINARY_PATH}}"
validator = true
p2p_port = 10001
rpc_port = 10000
args = [
"--ipfs-server",
"--pool-kbytes 65536",
"-lparachain=info,runtime=debug,xcm=trace,sub-libp2p::bitswap=trace,runtime::transaction-storage=trace",
# Embedded relay chain args (after "--"):
# Use -:--port to exclude zombienet's auto-generated --port flag,
# then provide --listen-addr to bind only on 127.0.0.1 (avoids litep2p
# IPv6 dual-stack crash on macOS and prevents 0.0.0.0 exposure).
"--",
"--listen-addr=/ip4/127.0.0.1/tcp/10003/ws",
"-:--port",
]

[[parachains.collators]]
name = "bulletin-polkadot-collator-2"
command = "{{POLKADOT_PARACHAIN_BINARY_PATH}}"
validator = true
p2p_port = 12347
rpc_port = 12346
args = [
"--ipfs-server",
"--pool-kbytes 65536",
"-lparachain=info,runtime=debug,xcm=trace,bitswap=trace,sub-libp2p::bitswap=trace,runtime::transaction-storage=trace",
# Embedded relay chain args (after "--"):
"--",
"--listen-addr=/ip4/127.0.0.1/tcp/12349/ws",
"-:--port",
]
Loading