@@ -632,155 +632,33 @@ run-authorize-preimage-and-store-papi runtime ws_url="ws://localhost:10000" seed
632632# ============================================================================
633633#
634634# Run store-big-data test against live Bulletin chain deployments.
635- # These require pre-authorized accounts and a local Docker Kubo connected to collators .
635+ # These require pre-authorized accounts.
636636#
637637# Usage:
638638# just run-live-tests-westend <seed>
639639# just run-live-tests-westend <seed> http://127.0.0.1:8283 small
640- # just run-live-tests-paseo <seed>
641- #
642- # Prerequisites for IPFS retrieval:
643- # 1. Start local IPFS: docker run -d --name ipfs-node -p 4011:4011 -p 5011:5011 -p 8283:8283 ipfs/kubo:latest
644- # 2. Connect to Bulletin IPFS nodes: docker exec ipfs-node ipfs swarm connect <multiaddr>
645- # (Get multiaddrs by querying the collators' IPFS peer info)
646640
647641# Live network endpoints
648642WESTEND_RPC := " wss://westend-bulletin-rpc.polkadot.io"
649643PASEO_RPC := " wss://paseo-bulletin-rpc.polkadot.io"
650644
651- # Run store-big-data-live test against a live endpoint
645+ # Run store-big-data test against a live endpoint
652646# Parameters:
653647# ws_url - WebSocket URL of the Bulletin chain node
654648# seed - Account seed phrase (must be pre-authorized on the network)
655- # ipfs_gateway_url - IPFS Gateway URL (default: http://127.0.0.1:8283 for local Docker Kubo )
656- # image_size - Image size preset: small, big32, big64, big96 (default: small for live tests )
649+ # ipfs_gateway_url - IPFS Gateway URL (default: http://127.0.0.1:8283)
650+ # image_size - Image size preset: small, big32, big64, big96 (default: small)
657651_ run-live-tests ws_url seed ipfs_gateway_url ="http : //127.0.0.1:8283" image_size ="small ": npm-install
658652 #!/usr/bin/env bash
659653 set -e
660654 echo " 🌐 Running live tests against: {{ ws_url }} "
661- echo " IPFS Gateway: {{ ipfs_gateway_url }} "
662- echo " Image size: {{ image_size }} "
663-
664655 just papi-generate " {{ ws_url }} "
665-
666- # Check if IPFS peers are configured for live network
667- EXTRA_FLAGS=" "
668- if [ -z " $WESTEND_PEER1_ID" ] || [ -z " $WESTEND_PEER1_ADDR" ]; then
669- echo " "
670- echo " ⚠️ IPFS peer info not configured - running storage-only test."
671- echo " To enable IPFS verification, set WESTEND_PEER1_ID and WESTEND_PEER1_ADDR."
672- echo " "
673- EXTRA_FLAGS=" --skip-ipfs-verify"
674- fi
675-
676- node store_big_data_live.js " {{ ws_url }} " " {{ seed }} " " {{ ipfs_gateway_url }} " " {{ image_size }} " $EXTRA_FLAGS
656+ node store_big_data.js " {{ ws_url }} " " {{ seed }} " " {{ ipfs_gateway_url }} " " {{ image_size }} " --skip-authorize --skip-ipfs-verify
677657
678658# Run live tests against Westend Bulletin
679- # Parameters:
680- # seed - Account seed phrase (must be pre-authorized on the network)
681- # ipfs_gateway_url - IPFS Gateway URL (default: http://127.0.0.1:8283)
682- # image_size - Image size preset: small, big32, big64, big96 (default: small)
683659run-live-tests-westend seed ipfs_gateway_url ="http : //127.0.0.1:8283" image_size ="small ":
684660 just _run-live-tests " {{ WESTEND_RPC }} " " {{ seed }} " " {{ ipfs_gateway_url }} " " {{ image_size }} "
685661
686662# Run live tests against Paseo Bulletin
687- # Parameters:
688- # seed - Account seed phrase (must be pre-authorized on the network)
689- # ipfs_gateway_url - IPFS Gateway URL (default: http://127.0.0.1:8283)
690- # image_size - Image size preset: small, big32, big64, big96 (default: small)
691663run-live-tests-paseo seed ipfs_gateway_url ="http : //127.0.0.1:8283" image_size ="small ":
692664 just _run-live-tests " {{ PASEO_RPC }} " " {{ seed }} " " {{ ipfs_gateway_url }} " " {{ image_size }} "
693-
694- # Setup IPFS for live network testing (starts Docker Kubo)
695- setup-live-ipfs :
696- #!/usr/bin/env bash
697- set -e
698- echo " 🐳 Setting up IPFS for live network testing..."
699-
700- # Stop existing container if running
701- docker stop ipfs-node 2 >/ dev/ null || true
702- docker rm ipfs-node 2 >/ dev/ null || true
703- docker volume rm ipfs-data 2 >/ dev/ null || true
704-
705- # Pull and start fresh kubo container
706- docker pull ipfs/ kubo:latest
707- docker run -d --name ipfs-node -v ipfs-data:/ data/ ipfs -p 4011 :4011 -p 5011 :5011 -p 8283 :8283 ipfs/ kubo:latest
708-
709- echo " Waiting for IPFS to initialize..."
710- sleep 5
711-
712- # Configure for isolated mode (no public DHT)
713- docker exec ipfs-node ipfs bootstrap rm --all
714- docker exec ipfs-node ipfs config --json Routing.Type ' "none"'
715- docker exec ipfs-node ipfs config --json Discovery.MDNS.Enabled false
716-
717- # Restart to apply config
718- docker restart ipfs-node
719- sleep 5
720-
721- docker exec ipfs-node ipfs --version
722- echo " ✅ IPFS ready. Connect to bulletin nodes with:"
723- echo " docker exec ipfs-node ipfs swarm connect <multiaddr>"
724-
725- # Connect IPFS to live Westend Bulletin network
726- # Requires environment variables: WESTEND_PEER1_ID, WESTEND_PEER1_ADDR
727- # Optional: WESTEND_PEER2_ID, WESTEND_PEER2_ADDR
728- connect-live-ipfs-westend :
729- #!/usr/bin/env bash
730- set -e
731-
732- if [ -z " $WESTEND_PEER1_ID" ] || [ -z " $WESTEND_PEER1_ADDR" ]; then
733- echo " ❌ Error: Live Westend peer info not configured."
734- echo " "
735- echo " Please set environment variables:"
736- echo " export WESTEND_PEER1_ID='12D3KooW...'"
737- echo " export WESTEND_PEER1_ADDR='/dns4/collator.example.com/tcp/30333/ws'"
738- echo " "
739- echo " Get these from the Westend Bulletin collator operators."
740- exit 1
741- fi
742-
743- echo " 🔗 Connecting to live Westend Bulletin IPFS nodes..."
744- ADDR1=" ${WESTEND_PEER1_ADDR}/p2p/${WESTEND_PEER1_ID}"
745- echo " Peer 1: $ADDR1"
746- docker exec ipfs-node ipfs swarm connect " $ADDR1" || true
747-
748- if [ -n " $WESTEND_PEER2_ID" ] && [ -n " $WESTEND_PEER2_ADDR" ]; then
749- ADDR2=" ${WESTEND_PEER2_ADDR}/p2p/${WESTEND_PEER2_ID}"
750- echo " Peer 2: $ADDR2"
751- docker exec ipfs-node ipfs swarm connect " $ADDR2" || true
752- fi
753-
754- echo " ✅ IPFS connection attempted. Check with: docker exec ipfs-node ipfs swarm peers"
755-
756- # Start IPFS reconnect script for live Westend network
757- # Requires environment variables: WESTEND_PEER1_ID, WESTEND_PEER1_ADDR
758- ipfs-reconnect-live-westend-start test_dir :
759- #!/usr/bin/env bash
760- set -e
761-
762- if [ -z " $WESTEND_PEER1_ID" ] || [ -z " $WESTEND_PEER1_ADDR" ]; then
763- echo " ❌ Error: Live Westend peer info not configured."
764- exit 1
765- fi
766-
767- echo " 🔄 Starting IPFS reconnect for live Westend..."
768- ROOT_DIR=" {{ justfile_directory () }} /.."
769- cd " $ROOT_DIR"
770- ./ scripts/ ipfs-reconnect-westend-live.sh docker 10 > {{ test_dir }} / ipfs-reconnect-live.log 2 >&1 &
771- cd -
772-
773- RECONNECT_PID=$!
774- echo $RECONNECT_PID > {{ test_dir }} / ipfs-reconnect-live.pid
775- echo " Reconnect PID: $RECONNECT_PID"
776- echo " Log: {{ test_dir }} /ipfs-reconnect-live.log"
777- sleep 2
778-
779- # Teardown IPFS for live network testing
780- teardown-live-ipfs :
781- #!/usr/bin/env bash
782- echo " 🛑 Tearing down IPFS for live testing..."
783- docker stop ipfs-node 2 >/ dev/ null || true
784- docker rm ipfs-node 2 >/ dev/ null || true
785- docker volume rm ipfs-data 2 >/ dev/ null || true
786- echo " ✅ IPFS teardown complete"
0 commit comments