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

Snippets indicating completeness problems in Triton-vm #46

Open
Sword-Smith opened this issue Jun 15, 2023 · 5 comments
Open

Snippets indicating completeness problems in Triton-vm #46

Sword-Smith opened this issue Jun 15, 2023 · 5 comments

Comments

@Sword-Smith
Copy link
Contributor

Proving and verifying execution of these snippets fail. This is most likely a problem in Triton-VM

    hashing::sample_indices::tests::new_prop_test
    hashing::sample_indices::tests::sample_indices_benchmark_safe
    hashing::sample_indices::tests::sample_indices_benchmark_unsafe
    mmr::calculate_new_peaks_from_append::tests::calculate_new_peaks_from_append_benchmark
    mmr::calculate_new_peaks_from_append::tests::calculate_new_peaks_from_append_test_safe_lists
    mmr::load_from_secret_in_then_verify::tests::load_from_secret_in_then_verify_benchmark_safe_lists
    mmr::load_from_secret_in_then_verify::tests::load_from_secret_in_then_verify_benchmark_unsafe_lists
    mmr::load_from_secret_in_then_verify::tests::load_from_secret_in_then_verify_test_safe_lists
    mmr::load_from_secret_in_then_verify::tests::load_from_secret_in_then_verify_test_unsafe_lists
    mmr::verify_from_memory::auth_path_verify_from_memory_tests::mmra_ap_verify_many_leafs
    mmr::verify_from_memory::auth_path_verify_from_memory_tests::mmra_ap_verify_test_pbt
    mmr::verify_from_memory::auth_path_verify_from_memory_tests::mmra_ap_verify_test_two
    mmr::verify_from_memory::auth_path_verify_from_memory_tests::verify_from_memory_benchmark_safe_lists
    mmr::verify_from_memory::auth_path_verify_from_memory_tests::verify_from_memory_benchmark_unsafe_lists
    mmr::verify_from_memory::auth_path_verify_from_memory_tests::verify_from_memory_test_safe_list
    mmr::verify_from_memory::auth_path_verify_from_memory_tests::verify_from_memory_test_unsafe_list

To verify the failure of the proving/verification of any snippet in this list, execute the following command in your terminal:

MY_COMPUTER_HAS_NOTHING_BETTER_TO_DO=1 cargo t <name-of-test> -- --nocapture
@Sword-Smith
Copy link
Contributor Author

Sword-Smith commented Jun 15, 2023

The smallest test case I've found that shows the completeness error in Triton-VM is the test mmra_append_test_three_leaves_safe. But some more digging should be done to get to the bottom of this, as that's still a quite big program with an execution trace length of 542.

Error from Triton-VM shows that the error is in codeword 243:

  Codeword 241 has degree  5118. Must be of maximal degree  8191.
  Codeword 242 has degree  3071. Must be of maximal degree  8191.
! Codeword 243 has degree 32767. Must be of maximal degree  8191.
  Codeword 244 has degree  5118. Must be of maximal degree  8191.
  Codeword 245 has degree  5118. Must be of maximal degree  8191.

The equivalent program using unsafe lists succeeds, so the problem is probably in an instruction that's present in the safe list implementation but not in the unsafe list implementation.

@Sword-Smith
Copy link
Contributor Author

One bug identified and upgraded to issue and PR in Triton-VM:
TritonVM/triton-vm#205

@Sword-Smith
Copy link
Contributor Author

Sword-Smith commented Jun 16, 2023

These snippets are still failing:

    hashing::sample_indices::tests::new_prop_test
    hashing::sample_indices::tests::sample_indices_benchmark_safe
    hashing::sample_indices::tests::sample_indices_benchmark_unsafe


@Sword-Smith Sword-Smith reopened this Jun 16, 2023
@Sword-Smith
Copy link
Contributor Author

These snippets are still failing:

    hashing::sample_indices::tests::new_prop_test
    hashing::sample_indices::tests::sample_indices_benchmark_safe
    hashing::sample_indices::tests::sample_indices_benchmark_unsafe

Addressed in Triton VM RP: TritonVM/triton-vm#208

Sword-Smith added a commit that referenced this issue Jun 17, 2023
I was bug related to #46 and TritonVM/triton-vm#205
and expanded on some tests. These expansions did not reveal the problem,
but I think they test the list behavior more thoroughly, so we keep
them.
@jan-ferdinand
Copy link
Member

Are there still any snippets for which proving & verifying fails?

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

No branches or pull requests

2 participants