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

Fix generator for transaction_pool tests #16285

Open
wants to merge 1 commit into
base: compatible
Choose a base branch
from

Conversation

georgeee
Copy link
Member

@georgeee georgeee commented Oct 24, 2024

Problem: previous generator was modifying zkapp commands after computing call forest hashes, which essentially rendered transactions incorrect, though didn't fail the test immediately.

Solution: rearrange modifications so that call forest hashes are computed after modifications to account updates take place.

While the issue didn't cause any test to fail, after some unrelated change some tests of transaction_pool started failing. Another branch will also contain a "regression" unit tests that fails before the fix and succeeds after. That regression tests will essentially recompute call forest hashes and compare them to original hashes.

Explain how you tested your changes:

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? None

Problem: previous generator was modifying zkapp commands after computing
call forest hashes, which essentially rendered transactions incorrect,
though didn't fail the test immediately.

Solution: rearrangem modifications so that call forest hashes are
computed after modifications to account updates take place.

While the issue didn't cause any test to fail, after some unrelated
change some tests of transaction_pool started failing. Another branch
will also contain a "regression" unit tests that fails before the fix
and succeeds after. That regression tests will essentially recompute
call forest hashes and compare them to original hashes.
@georgeee georgeee requested a review from a team as a code owner October 24, 2024 16:25
georgeee added a commit that referenced this pull request Oct 24, 2024
This a regression test for mk_zkapp_commands_single_block: before the
fix (that will be delivered as part of PR #16285) arrived, it was
failing, and is passing after the fix.

Along with testing the generator, it also checks the invariant
`Fn.compose of_wire to_wire = ident`.
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.

1 participant