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/zstd witgen compressed block #1092

Merged
merged 179 commits into from
Feb 15, 2024

Conversation

darth-cy
Copy link

Description

Generate witness rows for zstd decompression circuit for a zstd-compressed block

Issue Link

[link issue here]

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Contents

  • [item]

Rationale

[design decisions and extended information]

How Has This Been Tested?

[explanation]


How to fill a PR description

Please give a concise description of your PR.

The target readers could be future developers, reviewers, and auditors. By reading your description, they should easily understand the changes proposed in this pull request.

MUST: Reference the issue to resolve

Single responsability

Is RECOMMENDED to create single responsibility commits, but not mandatory.

Anyway, you MUST enumerate the changes in a unitary way, e.g.

This PR contains:
- Cleanup of xxxx, yyyy
- Changed xxxx to yyyy in order to bla bla
- Added xxxx function to ...
- Refactored ....

Design choices

RECOMMENDED to:

  • What types of design choices did you face?
  • What decisions you have made?
  • Any valuable information that could help reviewers to think critically

@darth-cy darth-cy marked this pull request as draft January 18, 2024 19:08
Copy link

@roynalnaruto roynalnaruto left a comment

Choose a reason for hiding this comment

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

review in progress. Posting some comments

Copy link

@roynalnaruto roynalnaruto left a comment

Choose a reason for hiding this comment

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

Decompression circuit passing witness until tag=ZstdBlockLstream

@roynalnaruto roynalnaruto marked this pull request as ready for review February 15, 2024 12:04
@roynalnaruto roynalnaruto merged commit b90fe9c into feat/zstd-witgen Feb 15, 2024
23 checks passed
@roynalnaruto roynalnaruto deleted the feat/zstd-witgen-compressed-block branch February 15, 2024 12:04
noel2004 pushed a commit that referenced this pull request Apr 17, 2024
* reconsolidate messy code on working branch

* correct huffman header processing

* correct jump table

* huffman code direct representation

* reserve huffman header decoding

* jump table correction

* correct jump table type

* delimitation of bitstream for accumulation witness

* Finish decoding bitstreams

* Add lstream decoding witness rows

* Add witness rows for huffman bitstream decoding

* remove constant from merge

* Restore default witness value for correction

* Remove decoded from FSE Huffman

* correct jump table witness

* Modify direct rep

* correct fse witness

* adjust test

* Verify FSE interleaved decoding

* tag fix

* Remove accuracy log from auxiliary table

* Consolidate huffman weights subroutine into one tag

* correct size format parsing

* add huffman code routine for recovering bitstring

* remove imports

* Add bitstream decoding test

* complete unit test coverage of literal decoding

* remove direct representation of huffman code

* correct witness generation

* Correct witness values

* Correct idx incremental block

* Correct tag next

* Correct tag_idx

* Correct tag value accumulator

* Correct huffman data byte offset

* Correct witness values

* Remove import

* Correct comments on decoding constants

* Introduce tag_rlc

* Correct multiplier for tag

* Clean up and consolidate working example circuit assignment test

* Assignment correction

* Add column assignments

* Organize constraint blocks

* Recover constraints

* Recover constraints

* Add tag change assignment

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Adjust constraint blocks

* Reassign comparator

* Recover constraints

* Recover constraints

* Recover constraints

* Correct Constraints

* Correct constraints

* Correct constraints

* Annotate test data

* Resolve merge issues

* Examine constraints

* Assign lstream config

* Recover constraints

* Recover constraints

* Recover constraints

* Add more bitstream witnesses

* Recover constraints

* Recover constraints

* Remove comments

* Correct tag_rlc_acc constraint and assignment

* Correct tag_rlc constraints and assignment

* Correct tag_rlc constraint and assignments:

* Recover constraints

* Adjust huffman code idx

* Revert "Adjust huffman code idx"

This reverts commit d8b5107.

* Correct byte delimitation in the test

* Recover constraints

* Recover constraints

* Assign block gadget

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Correct tag value acc again

* Recover constraints

* Correct decoding constraints

* Correct assignment for fcs

* Rand power correction

* Correct constraints

* Correct fcs

* Correct block header

* Correct tag lookup

* Recover constraint

* Recover constraint

* Recover constraints

* Recover constraint

* Correct lookup

* Correct witness values

* Bitstream decoder idx transition fix

* Correct FSE processing

* Cover fse section in bitstream transition

* Correct Value RLC

* format

* Add FSE decoding

* Add more assignments

* Complete witness fix

* Correct size calculation

* Correct bit boundary assignment

* Correct FSE counting

* Correct FSE transition

* Correct accuracy log bit reading

* Recover constraints

* Recover constraints

* Recover constraints

* Recover constraints

* Assign into bitstream accumulation for spanned

* Recover lookups

* Construct contained bitstreams

* Recdover lookups

* Recover lookups

* Remove debug flags

* Correct n_acc for FSE

* LiteralHeader decomposition

* Add dummy row

* Restore state

* FSE initial condition

* Remove debug flags

* Correct constraint

* Assign fse table

* Recover lookup

* Recover lookup

* Recover lookup

* Recover lookup

* Add comments

* Recover constraint

* Remove debug flag

* assignment to LiteralsHeaderTable

* introduce is_nil for bitstream_decoder that is set when no bits are read

* todo: debug

* Add comment

* Remove comment

* Correct bit boundaries reconstruction

* Adjust constraints

* Correct bitstring accumulation constraints

* Fix fse table lookup

* Add conditions to fix lookups

* Remove debug flag

* Correct branch assignment

* Remove debug flag

* Organize constraints

* fmt

* fmt again

* literals header lookup fix

* clippy

* clippy

* clippy

* Clippy

* clippy

* decoded literals table | refactor tables module

---------

Co-authored-by: Rohit Narurkar <[email protected]>
Co-authored-by: Rohit Narurkar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants