Skip to content

feat(gossipsub-interop): add topic-streams HoL scenario - #860

Open
MarcoPolo wants to merge 1 commit into
masterfrom
marco/topic-streams-hol-7082
Open

MarcoPolo wants to merge 1 commit into
masterfrom
marco/topic-streams-hol-7082

Conversation

@MarcoPolo

Copy link
Copy Markdown
Contributor

Add a Shadow scenario that publishes a 1MiB message then a 1KiB message on different topics, and a log-timestamp check that the small message is not head-of-line blocked. Wire the go binary to the topic-streams pubsub fork (libp2p/specs#729) with WithTopicStreams enabled.

Test will fail if a message is HoL blocked.

Add a Shadow scenario that publishes a 1MiB message then a 1KiB message
on different topics, and a log-timestamp check that the small message is
not head-of-line blocked. Wire the go binary to the topic-streams pubsub
fork (libp2p/specs#729) with WithTopicStreams enabled.
Comment on lines +161 to +167
if small_ts < large_ts:
print(
f" [OK] node{nid}: small at {small_ts.isoformat()} "
f"before large at {large_ts.isoformat()} "
f"(small led by {delta.total_seconds():.3f}s)"
)
else:

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.

Is it safe to assume that the small message will arrive always before the large message here? Because topic stream should let messages progress independently so this arrival order IMO is not guaranteed.

Makes me wonder if this test should force the large message transfer to be throtled, while the small message is sent and verify the small message arrived (since large transfer would be still incomplete)

Comment on lines +27 to +53
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description=(
"Validate that the small message arrived before the large message "
"on every non-publisher node (no cross-topic HoL blocking)."
)
)
parser.add_argument(
"shadow_output",
help="Path to the Shadow output directory (the one containing the hosts/ folder).",
)
parser.add_argument(
"--large-id",
default=LARGE_MESSAGE_ID,
help=f"Message id of the large message (default: {LARGE_MESSAGE_ID}).",
)
parser.add_argument(
"--small-id",
default=SMALL_MESSAGE_ID,
help=f"Message id of the small message (default: {SMALL_MESSAGE_ID}).",
)
parser.add_argument(
"--publisher",
default=PUBLISHER_NODE_ID,
help=f"Node id of the publisher to exclude (default: {PUBLISHER_NODE_ID}).",
)
return parser.parse_args()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think we need a cli for the test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants