Skip to content

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.

@MarcoPolo MarcoPolo merged commit 636b916 into marco/gossipsub-extensions Aug 7, 2025
@MarcoPolo MarcoPolo deleted the marco/test-extension branch August 7, 2025 21:12
@github-project-automation github-project-automation bot moved this from Triage to Done in libp2p Specs Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants