Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
62 changes: 62 additions & 0 deletions .github/workflows/gossipsub-interop-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Gossipsub Interoperability Tests (PR)

on:
pull_request:
paths:
- 'gossipsub-interop/**'
- '.github/workflows/gossipsub-interop-pr.yml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: gossipsub-interop/go-libp2p/go.mod
cache: true

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install Shadow simulator
run: |
# Install Shadow dependencies
sudo apt-get update
sudo apt-get install -y \
cmake \
findutils \
libclang-dev \
libc-dbg \
libglib2.0-0 \
libglib2.0-dev \
make \
netbase \
python3 \
python3-networkx \
xz-utils

# Build and install Shadow v3.3.0 from source
git clone --depth 1 --branch v3.3.0 https://github.com/shadow/shadow.git shadow-simulator
cd shadow-simulator
git checkout v3.3.0
./setup build --clean
./setup install
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Run gossipsub interop tests
working-directory: gossipsub-interop
run: make test
8 changes: 4 additions & 4 deletions gossipsub-interop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ test:
@uv run run.py --node_count 8 --composition "rust-and-go" --scenario "partial-messages-chain" && uv run checks/partial_messages.py latest --count 16

@echo "Testing fanout"
@uv run run.py --node_count 8 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/
@uv run run.py --node_count 8 --seed 1 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/
@uv run run.py --node_count 8 --seed 2 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/
@uv run run.py --node_count 8 --seed 3 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/
uv run run.py --node_count 8 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/
uv run run.py --node_count 8 --seed 1 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/
uv run run.py --node_count 8 --seed 2 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/
uv run run.py --node_count 8 --seed 3 --composition "rust-and-go" --scenario "partial-messages-fanout" && uv run checks/partial_messages.py latest/

test-go:
# Testing partial messages
Expand Down
2 changes: 2 additions & 0 deletions gossipsub-interop/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ def random_network_mesh(
target = random.randint(0, node_count - 1)
if target == node_id:
continue
if target in connections[node_id] or node_id in connections[target]:
continue
connections[node_id].add(target)
connections[target].add(node_id)

Expand Down
21 changes: 21 additions & 0 deletions gossipsub-interop/rust-libp2p/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions gossipsub-interop/rust-libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ features = [
"yamux",
]
# version = "0.56.0"
# git = "https://github.com/jxs/rust-libp2p/"
# branch = "gossipsub-partial-messages"
path = "../../../rust-libp2p/libp2p"
git = "https://github.com/jxs/rust-libp2p/"
branch = "gossipsub-partial-messages"
# path = "../../../rust-libp2p/libp2p"

[dependencies.libp2p-gossipsub]
# git = "https://github.com/jxs/rust-libp2p/"
# branch = "gossipsub-partial-messages"
path = "../../../rust-libp2p/protocols/gossipsub"
git = "https://github.com/jxs/rust-libp2p/"
branch = "gossipsub-partial-messages"
# path = "../../../rust-libp2p/protocols/gossipsub"
features = ["partial_messages"]
Loading