cargo lock
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Add automatic cleanup to start-ci command to guarantee reproducible CI environment. The command now checks for running nodes and executes docker compose down -v before building and starting. This ensures CI runs are always deterministic by: - Removing stale containers and volumes - Forcing fresh peer identity generation - Preventing state pollution between runs Simplifies CI workflow to single command: just start-ci && just test-ci
Three critical fixes to P2P testing infrastructure:
1. init-bootstrap: Detect both Generated and Loaded keypair messages
- Previously only matched Generated new keypair with Peer ID:
- Now handles Loaded keypair with Peer ID: for persistent volumes
- Fixes bootstrap discovery after first run when keypairs exist
2. test-pubsub-propagation: Fix bash arithmetic causing premature exit
- Changed ((RECEIVED_COUNT++)) to RECEIVED_COUNT=1
- With set -euo pipefail, post-increment returned 0 causing exit code 1
- Test now correctly reports all 5 nodes receiving messages
3. CI workflow: Add bootstrap init and message propagation test
- start-ci now runs init-bootstrap to sync peer IDs
- test-ci now includes test-pubsub-propagation for end-to-end verification
- Ensures CI validates actual PubSub message delivery, not just infrastructure
These changes enable reliable CI testing of P2P features with proper
bootstrap configuration and functional validation of message propagation
across all 6 nodes.
PubSub messages were published successfully but never received because the doc-sync module was missing the hermes:ipfs/event.on-topic handler. The runtime dispatches PubSub messages as OnTopicEvent, but the module only exported hermes:doc-sync/event. Additionally, docker-compose.yml has hardcoded bootstrap peer IDs that become stale when volumes are deleted, causing [wrong peer id] errors. Changes: - Add hermes:ipfs/event export and on-topic handler to doc-sync module - Add detailed PubSub logging throughout publish/receive path - Add init-bootstrap command to sync docker-compose.yml after volume deletion - Document PR#694 persistent keypairs (already working, just needed docs) - Clarify when init-bootstrap is needed (after clean, not after restart)
PubSub was publishing successfully but messages weren't being received because the doc-sync module was missing the hermes:ipfs/event.on-topic handler. The system dispatches OnTopicEvent but the module only exported hermes:doc-sync/event, not hermes:ipfs/event. Changes: - Add hermes:ipfs/event export to doc-sync module world definition - Implement on-topic event handler with detailed logging - Add comprehensive logging throughout PubSub publish path - Enhance error reporting in doc_sync host publish function - Update p2p-testing justfile with parallel module packaging - Add test-pubsub-propagation recipe for end-to-end testing - Update docker-compose bootstrap peers with current peer IDs The on-topic handler now logs all received PubSub messages with topic, size, and message preview, making it easy to verify propagation across the 6-node test mesh. Root cause: Mismatch between dispatched event (OnTopicEvent calling hermes:ipfs/event.on-topic) and module exports (only hermes:doc-sync/event). Messages were successfully published and routed by Gossipsub but dropped at the module boundary due to missing handler.
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
- Auto-subscribe all nodes to documents.new topic on startup to form
Gossipsub mesh (requires mesh_n=6 peers for optimal operation)
- Add nodes 4-6 to reach minimum Gossipsub mesh size
- Fix DHT provider check to accept local node in isolated networks
- Extend DHT provider timeout and add detailed logging
- Document why 6 nodes are required in README and justfile
This allows PubSub publish to succeed by ensuring the topic mesh is
formed before any POST requests, and relaxes DHT provider requirements
for small test networks where nodes don't replicate content proactively.
- Add comprehensive documentation to justfile header and commands - Reduce README from 327 to 56 lines (points to justfile) - Remove legacy shell scripts directory (consolidated into justfile) - Remove obsolete files (.env.bootstrap, docker-compose.yml.backup) All documentation now in justfile with organized sections, inline comments, and detailed help command. README provides quick start only
justfile Implements core P2P infrastructure improvements: - Persistent IPFS keypairs (~/.hermes/ipfs/keypair) for stable peer IDs - Bootstrap retry logic (10s interval, 10 max) for automatic reconnection - Port 4001 listening configuration for P2P connections - Comprehensive justfile with 17 commands (build, test, monitor) - PubSub testing command verifying Gossipsub v1.2 and peer connections - Updated docker-compose.yml with persistent peer IDs Dependencies: - hermes-ipfs updated to feat/hermes-ipfs-persistent-keypair branch Verified on 3-node Docker setup with full mesh connectivity.
Bumps [wasmprinter](https://github.com/bytecodealliance/wasm-tools) from 0.240.0 to 0.242.0. - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) --- updated-dependencies: - dependency-name: wasmprinter dependency-version: 0.242.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Enable custom P2P bootstrap configuration for multi-node testing: - Add IPFS_BOOTSTRAP_PEERS environment variable support for custom peer lists - Update bootstrap() to accept optional custom peers parameter - Add initialize-p2p.sh script to extract peer IDs and generate bootstrap config - Update hermes-ipfs dependency from 0.0.6 to 0.0.8 This allows nodes in Docker environments to bootstrap to each other instead of public IPFS nodes, enabling isolated P2P testing.
Bumps [wasmprinter](https://github.com/bytecodealliance/wasm-tools) from 0.240.0 to 0.242.0. - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) --- updated-dependencies: - dependency-name: wasmprinter dependency-version: 0.242.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: bkioshn <[email protected]>