Skip to content
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

Portal Spec Test Runner #736

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Portal Spec Test Runner #736

wants to merge 13 commits into from

Conversation

acolytec3
Copy link
Collaborator

@acolytec3 acolytec3 commented Feb 20, 2025

This adds a new test script for running the portal-spec-test test vectors, currently hardcoded to run the hive test vectors.

Since these tests are simple content key -> content value vectors, this can easily be expanded to run any of the spec tests by simply reading in all the yaml files from the portal-spec-test package and then attempting to store them with the appropriate network class.

TODO:

  • Expand the logic to read all subdirectories of the portal-spec-test repo and then parse each yaml file and try to decode its content keys and values
  • Add network specific test execution functions based on the test metadata
    • Take the existing store code snippet and make it specific for History network tests.
    • Parse test metadata (e.g. directory names, test comments, etc) to determine which network to use
  • Add appropriate setup and teardown logic to load each file individually (to ensure we don't have OOM issues)

@ScottyPoi
Copy link
Collaborator

We should use this to replace all tests like https://github.com/ethereumjs/ultralight/blob/446a66cae81bd6d287efc71a2cc81b74cb301b51/packages/portalnetwork/test/wire/types.spec.ts where we have the test vectors hardcoded.

@ScottyPoi ScottyPoi force-pushed the portal-spec-test-runner branch from 996083e to 6eb22c9 Compare February 20, 2025 23:13
Base automatically changed from remove-proof-union to master February 21, 2025 15:32
@acolytec3 acolytec3 force-pushed the portal-spec-test-runner branch from 6eb22c9 to 05773a7 Compare February 21, 2025 15:35
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.

2 participants