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: value extractor #37

Merged
merged 134 commits into from
Aug 28, 2024
Merged

feat: value extractor #37

merged 134 commits into from
Aug 28, 2024

Conversation

lonerapier
Copy link
Collaborator

@lonerapier lonerapier commented Aug 17, 2024

Able to extract string from arbitrary depth JSON

Improvements possible to parser and extractor

  • parser should handle data length more than actual length (forgot what this means lmao)
  • build parser state and then run extractor
  • remove ValueLen, don't think it's needed
  • remove depth
  • decide whether you want generalisation or performance (low constraints)
  • currently extractor circuit can’t extract array-only JSON, i.e. if keys are 0.0
  • extract complete array
  • how-to readme and explanation docs

@lonerapier lonerapier marked this pull request as ready for review August 28, 2024 11:16
Copy link
Contributor

@Autoparallel Autoparallel left a comment

Choose a reason for hiding this comment

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

Looking good! Awaiting final changes.

circuits/interpreter.circom Outdated Show resolved Hide resolved
Comment on lines 108 to 109
/// Checks current byte is at depth greater than specified `depth`
/// and returns whether next key-value pair starts.
Copy link
Contributor

Choose a reason for hiding this comment

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

bit confused about this comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmm, let me add more details

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added more details in comment

circuits/language.circom Show resolved Hide resolved
circuits/test/extractor.test.ts Outdated Show resolved Hide resolved
src/bin/codegen.rs Outdated Show resolved Hide resolved
circuits/utils/array.circom Show resolved Hide resolved
circuits/test/extractor.test.ts Outdated Show resolved Hide resolved
@Autoparallel Autoparallel self-requested a review August 28, 2024 21:40
Copy link
Contributor

@Autoparallel Autoparallel left a comment

Choose a reason for hiding this comment

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

Looks good to me. Let's finish up the merge conflicts then I'll merge. We'll catch any issues later on as this looks good enough to cook with and I want to unblock the end-to-end flow.

@lonerapier lonerapier force-pushed the temp-fetcher branch 2 times, most recently from 01c7faf to b8f1e30 Compare August 28, 2024 22:07
@lonerapier lonerapier merged commit 6a48ff5 into main Aug 28, 2024
0 of 2 checks passed
@lonerapier lonerapier deleted the temp-fetcher branch September 11, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants