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

feat: Implement Column annotations for MockProver debugging #706

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Commits on Jan 10, 2023

  1. feat: Add name_column to Layouter & RegionLayouter

    This adds the trait-associated function `name_column` in order to enable
    the possibility of the Layouter to store annotations aobut the colums.
    
    This function does nothing for all the trait implementors (V1,
    SimpleFloor, Assembly....) except for the `MockProver`. Which is
    responsible of storing a map that links within a `Region` index, the
    `column::Metadata` to the annotation `String`.
    CPerezz committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    e620642 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c79040e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4a470fe View commit details
    Browse the repository at this point in the history
  4. feat: Add lookup column annotations

    This adds the fn `annotate_lookup_column` for `ConstraintSystem` which
    allows to carry annotations for the lookup columns declared for a
    circuit within a CS.
    CPerezz committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    81a8c7b View commit details
    Browse the repository at this point in the history
  5. feat: Add Lookup TableColumn annotations

    This allows to annotate lookup `TableColumn`s and print it's annotation
    within the `assert_satisfied` fn.
    
    This has required to change the `ConstraintSystem::lookup_annotations`
    to have keys as `metadata::Column` rather than `usize` as otherwise it's
    impossible within the `emitter` scope to distinguish between regular
    advice columns (local to the Region) and fixed columns which come from
    `TableColumn`s.
    CPerezz committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    68aeaf4 View commit details
    Browse the repository at this point in the history
  6. fix: Customly derive PartialEq for metadata::Region

    This allows to ignore the annotation map of the metadata::Region so that
    is easier to match against `VerifyFailure` errors in tests.
    CPerezz committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    a2e8ada View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5b31fdd View commit details
    Browse the repository at this point in the history
  8. fix: Update Debug & Display for VerifyFailure

    It was necessary to improve the `prover.verify` output also. To do so,
    this required auxiliary types which are obfuscated to any other part of the lib
    but that are necessary in order to be able to inject the Column names inside of
    the `Column` section itself.
    This also required to re-implement manually `Debug` and `Display` for this enum.
    
    This closes zcash#705
    CPerezz committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    c7aeb66 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3882cf9 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c8d9244 View commit details
    Browse the repository at this point in the history
  11. fix: Address review comments

    Address some leftover TO-DOs & apply code simplifications for nested if
    let Some() blocks.
    CPerezz committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    3b70fe7 View commit details
    Browse the repository at this point in the history
  12. fix: StackOverflow caused by Debug recursive call

    For the `VerifyFailure::ConstraintNotSatisfied` case we want to customly
    impl the `Debug` call so that we can print the annotations within the
    `VirtualCell`s.
    
    If we hit any other case of `VerifyFailure` we basically send it to
    print and be handled by (ideally Display).
    
    The issue is that the call was forwarded to `Debug` impl again which
    ended up in an infinite recursive call to the `Debug` method.
    See: privacy-scaling-explorations#109 (comment)
    
    This is solved by calling `Display` if we hit a case that is not
    `ConstraintNotSatisfied`.
    CPerezz committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    22e3504 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3cfbc09 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2023

  1. Configuration menu
    Copy the full SHA
    f5dd587 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2023

  1. Configuration menu
    Copy the full SHA
    23a4051 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    120bc23 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ac194ac View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6c38b03 View commit details
    Browse the repository at this point in the history
  5. update: Changelog

    CPerezz committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    5f956cc View commit details
    Browse the repository at this point in the history
  6. fix: intra doc-links

    CPerezz committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    6505547 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    084a64b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    83c0c72 View commit details
    Browse the repository at this point in the history