Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cc6820d
Increased tx pool from 20->40 MiB
bkontur Jan 29, 2026
a5833af
WIP: try without `--network host`
bkontur Jan 29, 2026
f1a0d91
WIP: big32 back
bkontur Jan 29, 2026
a47bd99
Wait finalized
bkontur Jan 29, 2026
f5213f8
Revert
bkontur Jan 29, 2026
754fbb8
Try 30MiB
bkontur Jan 29, 2026
3f9a21d
WIP: wrong ip causes disconnects?
bkontur Jan 29, 2026
4a8f219
Fix docker ipfs ips
bkontur Jan 29, 2026
6f94cc1
nit
bkontur Jan 29, 2026
2309753
revert back to host network with 127.0.0.1
bkontur Jan 29, 2026
638d63b
Run first
bkontur Jan 29, 2026
7941d15
Why this is doing difference for Kubo?
bkontur Jan 29, 2026
1434f43
Log connected peers
bkontur Jan 29, 2026
e372aa0
Disabled IPFS dht and discovery
bkontur Jan 29, 2026
4e51325
less logs
bkontur Jan 29, 2026
77451e6
WIP: temporary cache to speed to
bkontur Jan 29, 2026
1988543
wip
bkontur Jan 29, 2026
e410aea
Removed `ws` ?
bkontur Jan 29, 2026
bcc576f
Fix listen-addr
bkontur Jan 29, 2026
e2d5e29
nit
bkontur Jan 29, 2026
7d9a90c
Better IPFS?
bkontur Jan 29, 2026
5053ff0
Nit
bkontur Jan 29, 2026
18d3b9d
One more nit
bkontur Jan 29, 2026
42a7c48
omfg
bkontur Jan 29, 2026
441b705
Refactor DEFAULT_HTTP_IPFS_API and custom ports
bkontur Jan 29, 2026
017c150
Nit
bkontur Jan 29, 2026
e94f864
Very nit
bkontur Jan 29, 2026
509d973
Refactor
bkontur Jan 29, 2026
c31d1d2
Revert
bkontur Jan 29, 2026
5364c5f
Change pool
bkontur Jan 29, 2026
7071579
fmt + revert back to ws
bkontur Jan 29, 2026
20765ca
Restart IPFS?
bkontur Jan 29, 2026
62d465c
big96
bkontur Jan 29, 2026
8a74c5c
Parametrize image size
bkontur Jan 29, 2026
af8652f
Stats
bkontur Jan 29, 2026
fdb849f
Merge remote-tracking branch 'origin/parametrise_tests' into parametr…
bkontur Jan 29, 2026
14c453f
REvert
bkontur Jan 29, 2026
8b0420e
Removed comment
bkontur Jan 29, 2026
b4cd5cf
Last nits
bkontur Jan 30, 2026
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
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ tar -xvzf kubo_v0.38.1_darwin-arm64.tar.gz

```shell
docker pull ipfs/kubo:latest
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs -p 4001:4001 -p 8080:8080 -p 5001:5001 ipfs/kubo:latest
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs -p 4011:4011 -p 8283:8283 -p 5011:5011 ipfs/kubo:latest
docker logs -f ipfs-node
```

Expand Down
4 changes: 2 additions & 2 deletions examples/authorize_and_store_papi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws-provider';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { authorizeAccount, fetchCid, store, TX_MODE_FINALIZED_BLOCK } from './api.js';
import { setupKeyringAndSigners } from './common.js';
import { setupKeyringAndSigners, DEFAULT_IPFS_GATEWAY_URL } from './common.js';
import { logHeader, logConnection, logSuccess, logError, logTestResult } from './logger.js';
import { cidFromBytes } from "./cid_dag_metadata.js";
import { bulletin } from './.papi/descriptors/dist/index.mjs';
Expand All @@ -12,7 +12,7 @@ import { bulletin } from './.papi/descriptors/dist/index.mjs';
const args = process.argv.slice(2);
const NODE_WS = args[0] || 'ws://localhost:10000';
const SEED = args[1] || '//Alice';
const HTTP_IPFS_API = args[2] || 'http://127.0.0.1:8080';
const HTTP_IPFS_API = args[2] || DEFAULT_IPFS_GATEWAY_URL;

async function main() {
await cryptoWaitReady();
Expand Down
4 changes: 2 additions & 2 deletions examples/authorize_and_store_papi_smoldot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createClient } from 'polkadot-api';
import { getSmProvider } from 'polkadot-api/sm-provider';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { authorizeAccount, fetchCid, store } from './api.js';
import { setupKeyringAndSigners, waitForChainReady } from './common.js';
import { setupKeyringAndSigners, waitForChainReady, DEFAULT_IPFS_GATEWAY_URL } from './common.js';
import { logHeader, logConfig, logSuccess, logError, logTestResult } from './logger.js';
import { cidFromBytes } from "./cid_dag_metadata.js";
import { bulletin } from './.papi/descriptors/dist/index.mjs';
Expand Down Expand Up @@ -111,7 +111,7 @@ async function main() {
// Optional parachain chainspec path (only needed for parachains)
const parachainSpecPath = process.argv[3] || null;
// Optional IPFS API URL
const HTTP_IPFS_API = process.argv[4] || 'http://127.0.0.1:8080';
const HTTP_IPFS_API = process.argv[4] || DEFAULT_IPFS_GATEWAY_URL;

logConfig({
'Mode': 'Smoldot Light Client',
Expand Down
4 changes: 2 additions & 2 deletions examples/authorize_preimage_and_store_papi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws-provider';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { authorizeAccount, authorizePreimage, fetchCid, store, TX_MODE_IN_BLOCK, TX_MODE_FINALIZED_BLOCK } from './api.js';
import { setupKeyringAndSigners, getContentHash } from './common.js';
import { setupKeyringAndSigners, getContentHash, DEFAULT_IPFS_GATEWAY_URL } from './common.js';
import { logHeader, logConnection, logSection, logSuccess, logError, logInfo, logTestResult } from './logger.js';
import { cidFromBytes } from "./cid_dag_metadata.js";
import { bulletin } from './.papi/descriptors/dist/index.mjs';
Expand All @@ -12,7 +12,7 @@ import { bulletin } from './.papi/descriptors/dist/index.mjs';
const args = process.argv.slice(2);
const NODE_WS = args[0] || 'ws://localhost:10000';
const SEED = args[1] || '//Alice';
const HTTP_IPFS_API = args[2] || 'http://127.0.0.1:8080';
const HTTP_IPFS_API = args[2] || DEFAULT_IPFS_GATEWAY_URL;

/**
* Run a preimage authorization + store test.
Expand Down
3 changes: 2 additions & 1 deletion examples/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import fs from "fs";
import assert from "assert";

// ---- CONFIG ----
export const HTTP_IPFS_API = 'http://127.0.0.1:8080'; // Local IPFS HTTP gateway
export const DEFAULT_IPFS_API_URL = 'http://127.0.0.1:5011'; // IPFS HTTP API (for ipfs-http-client)
export const DEFAULT_IPFS_GATEWAY_URL = 'http://127.0.0.1:8283'; // IPFS HTTP Gateway (for /ipfs/CID requests)
export const CHUNK_SIZE = 1 * 1024 * 1024; // 1 MiB
// -----------------

Expand Down
117 changes: 72 additions & 45 deletions examples/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -216,24 +216,52 @@ ipfs-start test_dir: _check-docker
#!/usr/bin/env bash
set -e
echo "🐳 Starting IPFS Docker container..."


# Use non-standard ports to avoid conflicts with other IPFS instances
IPFS_SWARM_PORT=4011
IPFS_API_PORT=5011
IPFS_GATEWAY_PORT=8283

# Pull latest kubo image if not present
docker pull ipfs/kubo:latest


# Remove old volume to start fresh (no cached peers)
docker volume rm ipfs-data 2>/dev/null || true

# Determine network mode based on OS
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS - use port mapping
NETWORK_ARGS="-p 4001:4001 -p 8080:8080 -p 5001:5001"
# macOS - use bridge with port mapping
NETWORK_ARGS="-p ${IPFS_SWARM_PORT}:${IPFS_SWARM_PORT} -p ${IPFS_GATEWAY_PORT}:${IPFS_GATEWAY_PORT} -p ${IPFS_API_PORT}:${IPFS_API_PORT}"
else
# Linux (including CI) - use host networking for direct access
NETWORK_ARGS="--network host -p 4001:4001 -p 8080:8080 -p 5001:5001"
# Linux (including CI) - use host networking so container can reach localhost services
NETWORK_ARGS="--network host"
fi
# Start Docker container

# Start container - daemon will init and start
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs $NETWORK_ARGS ipfs/kubo:latest
echo " Container: ipfs-node"
echo " Waiting for container to start..."
echo " Container: ipfs-node (network: $NETWORK_ARGS)"
echo " Waiting for IPFS to initialize..."
sleep 5

# Configure IPFS for isolated mode while daemon is running (config changes take effect on restart)
echo " Configuring isolated mode..."
docker exec ipfs-node ipfs bootstrap rm --all
docker exec ipfs-node ipfs config --json Routing.Type '"none"'
docker exec ipfs-node ipfs config --json Discovery.MDNS.Enabled false
docker exec ipfs-node ipfs config --json Swarm.RelayClient.Enabled false
docker exec ipfs-node ipfs config --json Swarm.RelayService.Enabled false

# Configure custom ports to avoid conflicts with other IPFS instances
echo " Configuring custom ports (swarm: ${IPFS_SWARM_PORT}, api: ${IPFS_API_PORT}, gateway: ${IPFS_GATEWAY_PORT})..."
docker exec ipfs-node ipfs config --json Addresses.Swarm "[\"/ip4/0.0.0.0/tcp/${IPFS_SWARM_PORT}\", \"/ip6/::/tcp/${IPFS_SWARM_PORT}\"]"
docker exec ipfs-node ipfs config Addresses.API "/ip4/0.0.0.0/tcp/${IPFS_API_PORT}"
docker exec ipfs-node ipfs config Addresses.Gateway "/ip4/0.0.0.0/tcp/${IPFS_GATEWAY_PORT}"

# Restart container to apply config changes
echo " Restarting daemon with isolated config..."
docker restart ipfs-node
sleep 5

docker exec ipfs-node ipfs --version

# Bitswap logging
Expand All @@ -253,27 +281,26 @@ ipfs-connect runtime:

# Detect the correct host and protocol for Docker
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS - use dns4/host.docker.internal
# macOS - use dns4/host.docker.internal (bridge network)
PROTOCOL="dns4"
DOCKER_HOST="host.docker.internal"
else
# Linux (with host networking) - use ip4/127.0.0.1
# Linux - use ip4/127.0.0.1 (host network mode)
PROTOCOL="ip4"
DOCKER_HOST="127.0.0.1"
fi

echo " Using Docker host: /$PROTOCOL/$DOCKER_HOST"

# TODO: improve this for multiple runtimes
# Different peer IDs for different runtimes
# Different peer IDs and ports for different runtimes
if [ "{{ runtime }}" = "bulletin-westend-runtime" ]; then
# Westend parachain peer IDs
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/10001/ws/p2p/12D3KooWJKVVNYByvML4Pgx1GWAYryYo6exA68jQX9Mw3AJ6G5gQ || true
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/12347/ws/p2p/12D3KooWJ8sqAYtMBX3z3jy2iM98XGLFVzVfUPtmgDzxXSPkVpZZ || true
# Westend parachain peer IDs (WebSocket ports: 10002, 12348)
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/10002/ws/p2p/12D3KooWJKVVNYByvML4Pgx1GWAYryYo6exA68jQX9Mw3AJ6G5gQ || true
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/12348/ws/p2p/12D3KooWJ8sqAYtMBX3z3jy2iM98XGLFVzVfUPtmgDzxXSPkVpZZ || true
elif [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
# Polkadot solo chain peer IDs
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/10001/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm || true
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/12347/ws/p2p/12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby || true
# Polkadot solo chain peer IDs (WebSocket ports: 10002, 12348)
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/10002/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm || true
docker exec ipfs-node ipfs swarm connect /$PROTOCOL/$DOCKER_HOST/tcp/12348/ws/p2p/12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby || true
else
echo "🐳 Unhandled runtime: {{ runtime }} specified!"
exit 1
Expand Down Expand Up @@ -302,9 +329,9 @@ ipfs-reconnect-start test_dir runtime:
cd "$ROOT_DIR"
# TODO: improve this for multiple runtimes
if [ "{{ runtime }}" = "bulletin-westend-runtime" ]; then
./scripts/ipfs-reconnect-westend.sh docker > {{ test_dir }}/ipfs-reconnect.log 2>&1 &
./scripts/ipfs-reconnect-westend.sh docker 10 > {{ test_dir }}/ipfs-reconnect.log 2>&1 &
elif [ "{{ runtime }}" = "bulletin-polkadot-runtime" ]; then
./scripts/ipfs-reconnect-solo.sh docker > {{ test_dir }}/ipfs-reconnect.log 2>&1 &
./scripts/ipfs-reconnect-solo.sh docker 10 > {{ test_dir }}/ipfs-reconnect.log 2>&1 &
else
echo "🐳 Unhandled runtime: {{ runtime }} specified!"
exit 1
Expand Down Expand Up @@ -393,8 +420,8 @@ stop-services test_dir:
# mode - Connection mode: "ws" (WebSocket RPC node) or "smoldot" (light client)
# ws_url - WebSocket URL (default: ws://localhost:10000, only used in ws mode)
# seed - Account seed phrase or dev seed (default: //Alice, only used in ws mode)
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8080)
run-test-authorize-and-store test_dir runtime mode="ws" ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8080":
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8283)
run-test-authorize-and-store test_dir runtime mode="ws" ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8283":
#!/usr/bin/env bash
set -e

Expand Down Expand Up @@ -426,8 +453,8 @@ run-test-authorize-and-store test_dir runtime mode="ws" ws_url="ws://localhost:1
# test_dir - Test directory where services are running
# ws_url - WebSocket URL of the Bulletin chain node (default: ws://localhost:10000)
# seed - Account seed phrase or dev seed (default: //Alice)
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8080)
run-test-store-chunked-data test_dir ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8080":
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8283)
run-test-store-chunked-data test_dir ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8283":
#!/usr/bin/env bash
set -e
node store_chunked_data.js "{{ ws_url }}" "{{ seed }}" "{{ http_ipfs_api }}"
Expand All @@ -437,8 +464,8 @@ run-test-store-chunked-data test_dir ws_url="ws://localhost:10000" seed="//Alice
# test_dir - Test directory where services are running
# ws_url - WebSocket URL of the Bulletin chain node (default: ws://localhost:10000)
# seed - Account seed phrase or dev seed (default: //Alice)
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5001)
run-test-store-big-data test_dir ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:5001":
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5011)
run-test-store-big-data test_dir ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:5011":
#!/usr/bin/env bash
set -e
node store_big_data.js "{{ ws_url }}" "{{ seed }}" "{{ http_ipfs_api }}"
Expand All @@ -448,8 +475,8 @@ run-test-store-big-data test_dir ws_url="ws://localhost:10000" seed="//Alice" ht
# test_dir - Test directory where services are running
# ws_url - WebSocket URL of the Bulletin chain node (default: ws://localhost:10000)
# seed - Account seed phrase or dev seed (default: //Alice)
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8080)
run-test-authorize-preimage-and-store test_dir ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8080":
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8283)
run-test-authorize-preimage-and-store test_dir ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8283":
#!/usr/bin/env bash
set -e
node authorize_preimage_and_store_papi.js "{{ ws_url }}" "{{ seed }}" "{{ http_ipfs_api }}"
Expand Down Expand Up @@ -488,13 +515,13 @@ run-authorize-and-store runtime mode="ws": npm-install
# Parachain: relay chain (required) + parachain spec (optional)
RELAY_CHAINSPEC_PATH="$TEST_DIR/bob/cfg/westend-local.json"
PARACHAIN_CHAINSPEC_PATH="$TEST_DIR/bulletin-westend-collator-2/cfg/westend-local-2487.json"
node $SCRIPT_NAME "$RELAY_CHAINSPEC_PATH" "$PARACHAIN_CHAINSPEC_PATH" "http://127.0.0.1:8080"
node $SCRIPT_NAME "$RELAY_CHAINSPEC_PATH" "$PARACHAIN_CHAINSPEC_PATH" "http://127.0.0.1:8283"
else # bulletin-polkadot-runtime (solochain)
CHAINSPEC_PATH="$TEST_DIR/bob/cfg/bulletin-polkadot-local.json"
node $SCRIPT_NAME "$CHAINSPEC_PATH" "" "http://127.0.0.1:8080"
node $SCRIPT_NAME "$CHAINSPEC_PATH" "" "http://127.0.0.1:8283"
fi
else
node $SCRIPT_NAME "ws://localhost:10000" "//Alice" "http://127.0.0.1:8080"
node $SCRIPT_NAME "ws://localhost:10000" "//Alice" "http://127.0.0.1:8283"
fi
EXAMPLE_EXIT=$?

Expand All @@ -514,8 +541,8 @@ run-authorize-and-store runtime mode="ws": npm-install
# runtime - Runtime name (e.g., "bulletin-polkadot-runtime", "bulletin-westend-runtime")
# ws_url - WebSocket URL (default: ws://localhost:10000)
# seed - Account seed phrase or dev seed (default: //Alice)
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8080)
run-store-chunked-data runtime ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8080": npm-install
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8283)
run-store-chunked-data runtime ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8283": npm-install
#!/usr/bin/env bash
set -e

Expand Down Expand Up @@ -544,8 +571,8 @@ run-store-chunked-data runtime ws_url="ws://localhost:10000" seed="//Alice" http
# runtime - Runtime name (e.g., "bulletin-polkadot-runtime", "bulletin-westend-runtime")
# ws_url - WebSocket URL (default: ws://localhost:10000)
# seed - Account seed phrase or dev seed (default: //Alice)
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5001)
run-store-big-data runtime ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:5001": npm-install
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5011)
run-store-big-data runtime ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:5011": npm-install
#!/usr/bin/env bash
set -e

Expand Down Expand Up @@ -574,8 +601,8 @@ run-store-big-data runtime ws_url="ws://localhost:10000" seed="//Alice" http_ipf
# runtime - Runtime name (e.g., "bulletin-polkadot-runtime", "bulletin-westend-runtime")
# ws_url - WebSocket URL (default: ws://localhost:10000)
# seed - Account seed phrase or dev seed (default: //Alice)
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8080)
run-authorize-preimage-and-store-papi runtime ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8080": npm-install
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:8283)
run-authorize-preimage-and-store-papi runtime ws_url="ws://localhost:10000" seed="//Alice" http_ipfs_api="http://127.0.0.1:8283": npm-install
#!/usr/bin/env bash
set -e

Expand Down Expand Up @@ -607,15 +634,15 @@ run-authorize-preimage-and-store-papi runtime ws_url="ws://localhost:10000" seed
# Parameters:
# ws_url - WebSocket URL of the Bulletin chain node
# seed - Account seed phrase or dev seed (e.g., "//Alice" or "word1 word2 ...")
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5001 for local Docker Kubo)
run-tests-against ws_url seed http_ipfs_api="http://127.0.0.1:5001": npm-install
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5011 for local Docker Kubo)
run-tests-against ws_url seed http_ipfs_api="http://127.0.0.1:5011": npm-install
#!/usr/bin/env bash
set -e
echo "🌐 Testing against external endpoint: {{ ws_url }}"
just papi-generate "{{ ws_url }}"

# To use local Docker Kubo with external RPC:
# 1. Start local IPFS: docker run -d --name ipfs-node -p 4001:4001 -p 5001:5001 -p 8080:8080 ipfs/kubo:latest
# 1. Start local IPFS: docker run -d --name ipfs-node -p 4011:4011 -p 5011:5011 -p 8283:8283 ipfs/kubo:latest
# 2. Connect to Bulletin IPFS nodes: docker exec ipfs-node ipfs swarm connect <multiaddr>
# (Get multiaddrs from the Bulletin chain's IPFS bootstrap list)

Expand All @@ -624,6 +651,6 @@ run-tests-against ws_url seed http_ipfs_api="http://127.0.0.1:5001": npm-install
# Run store-big-data test against Westend Bulletin
# Parameters:
# seed - Account seed phrase or dev seed (e.g., "//Alice" or "word1 word2 ...")
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5001 for local Docker Kubo)
run-tests-against-westend seed http_ipfs_api="http://127.0.0.1:5001":
# http_ipfs_api - IPFS API URL (default: http://127.0.0.1:5011 for local Docker Kubo)
run-tests-against-westend seed http_ipfs_api="http://127.0.0.1:5011":
just run-tests-against "wss://westend-bulletin-rpc.polkadot.io" "{{ seed }}" "{{ http_ipfs_api }}"
6 changes: 3 additions & 3 deletions examples/native_ipfs_dag_pb_chunked_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws-provider';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { cidFromBytes, buildUnixFSDagPB, convertCid } from './cid_dag_metadata.js';
import { generateTextImage, fileToDisk, filesAreEqual, newSigner, HTTP_IPFS_API } from './common.js';
import { generateTextImage, fileToDisk, filesAreEqual, newSigner, DEFAULT_IPFS_GATEWAY_URL as HTTP_IPFS_API } from './common.js';
import { authorizeAccount, store, storeChunkedFile, fetchCid } from './api.js';
import { bulletin } from './.papi/descriptors/dist/index.mjs';
import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat"
Expand Down Expand Up @@ -62,10 +62,10 @@ async function main() {
// (Other words Bulletin is compatible)
console.log('🧱 DAG stored on Bulletin with CID:', rootCid.toString())
console.log('\n🌐 Try opening in browser:')
console.log(` http://127.0.0.1:8080/ipfs/${rootCid.toString()}`)
console.log(` ${HTTP_IPFS_API}/ipfs/${rootCid.toString()}`)
console.log(" (You'll see binary content since this is an image)")
console.log('')
console.log(` http://127.0.0.1:8080/ipfs/${convertCid(rootCid, 0x55)}`)
console.log(` ${HTTP_IPFS_API}/ipfs/${convertCid(rootCid, 0x55)}`)
console.log(" (You'll see the DAG file itself)")

// Download the content from IPFS HTTP gateway.
Expand Down
Loading
Loading