Skip to content

Gossipsub: test extension #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: marco/gossipsub-extensions
Choose a base branch
from

Conversation

MarcoPolo
Copy link
Contributor

for interop testing

@ppopth
Copy link
Contributor

ppopth commented Jul 7, 2025

I'm not sure what you are testing with this extension. What is your assert clause?

@MarcoPolo
Copy link
Contributor Author

We should see the (empty) test extension being sent and received.

Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

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

Is there a reason this cannot be a test vector under the extensions spec?

@MarcoPolo
Copy link
Contributor Author

Is there a reason this cannot be a test vector under the #684?

My understanding of test vectors comes from using them in deterministic functions. For example, given some input a certain hash function should return some output. What would a test vector look like for this?

Another point is that the Extensions spec doesn't need to know about this extension at all (except as a registry of code points). This is the first example of an extension, and we don't need to treat it differently than any future extension.

@MarcoPolo MarcoPolo marked this pull request as ready for review July 9, 2025 23:14
@MarcoPolo
Copy link
Contributor Author

We have two implementations of this in Rust and Go :)

@raulk
Copy link
Member

raulk commented Jul 9, 2025

My point is that this isn't useful as a standalone spec. And if the only reason it exists is for testing another spec, it should be a test harness under that spec, accompanied by the relevant test vectors.

@MarcoPolo
Copy link
Contributor Author

Is the difference whether this is inlined in the extensions file or a separate file? I'd argue it's a better example if it's a separate file like any other extension would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

3 participants