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

Docs: Add SMT test spec and test fixtures #389

Merged
merged 5 commits into from
Jul 22, 2022

Conversation

bvrooman
Copy link
Contributor

@bvrooman bvrooman commented Jul 11, 2022

Related issues:

This PR adds the SMT test specification and related test fixtures currently living in the fuel-merkle repo to the fuel-specs repo. The fuel-specs repo is the appropriate housing for these documents since they describe universally applicable test outputs and are agnostic to any implementation. Sparse Merkle tree implementations can adhere to the SMT test specifications in fuel-specs to ensure correctness; this includes the fuel-merkle crate and fuel-merkle-sol library.

SMT libraries can include the fuel-specs repo as a git submodule in order to pull in the test fixtures.

In a future PR, I will remove the existing test spec and fixture files from fuel-merkle and specify fuel-specs as a submodule.

@bvrooman bvrooman self-assigned this Jul 11, 2022
@bvrooman bvrooman requested review from adlerjohn and Voxelot July 11, 2022 23:24
@bvrooman bvrooman marked this pull request as ready for review July 11, 2022 23:25
@Voxelot
Copy link
Member

Voxelot commented Jul 11, 2022

would it be more accurate to call these test_vectors instead of fixtures? Fixtures are typically just the environment / setup ingredients for a test rather than the actual SUT and expectations.

@bvrooman
Copy link
Contributor Author

bvrooman commented Jul 12, 2022

Yea, I agree, I think that's a good distinction. I've updated the folder name to test_vectors.

@Voxelot
Copy link
Member

Voxelot commented Jul 14, 2022

Git submodules can be a little tricky to manage sometimes.. Is there a way we could use git hooks to automatically pull these test-vectors into fuel-merkle?

@bvrooman
Copy link
Contributor Author

bvrooman commented Jul 15, 2022

I agree that submodules can be tricky: codebases that uses submodules have to remember to run all the submodule commands, i.e. git submodule init, git submodule update, etc, and clients have to stay on top of updates to the source repo manually.

I can look into alternative solutions, like git hooks. If we can automate pulling in the test vectors, that would be great.

That said, can we get the test vectors into fuel-specs in the meantime? I believe that this step will still need to come first regardless of whichever solution we go with.

@adlerjohn
Copy link
Contributor

Verification is easier than execution after all, so my preference would instead be a CI workflow in fuel-merkle that pulls the test vectors from the latest master of fuel-specs and compares for diffs.

Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

utACK

@bvrooman bvrooman merged commit 464171a into master Jul 22, 2022
@bvrooman bvrooman deleted the bvrooman-docs-add-smt-test-specs branch July 22, 2022 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants