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/benchmark multitier #198

Merged
merged 173 commits into from
Jul 30, 2024
Merged

Feat/benchmark multitier #198

merged 173 commits into from
Jul 30, 2024

Conversation

MonkeyKing-1
Copy link
Contributor

1b row query binary and corresponding benchmark binary

bfan05 and others added 30 commits May 29, 2024 16:49
Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

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

Please refactor all the consume changes to go back to the ownership transfer model

bin/afs/README.md Outdated Show resolved Hide resolved
write_file.cc Outdated Show resolved Hide resolved
make_1b_tree.sh Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
bin/afs-1b/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

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

OK after addressing comments

bin/afs-1b/src/commands/mock/write.rs Outdated Show resolved Hide resolved
bin/afs-1b/src/commands/prove/mod.rs Outdated Show resolved Hide resolved
bin/afs-1b/src/commands/prove/mod.rs Outdated Show resolved Hide resolved
bin/afs-1b/src/commands/prove/mod.rs Outdated Show resolved Hide resolved
bin/afs-1b/src/commands/prove/mod.rs Outdated Show resolved Hide resolved
benchmark/src/commands/multitier_rw/mod.rs Outdated Show resolved Hide resolved
benchmark/README.md Outdated Show resolved Hide resolved
benchmark/README.md Show resolved Hide resolved
@jonathanpwang
Copy link
Contributor

@MonkeyKing-1 please get this merged ASAP

@MonkeyKing-1 MonkeyKing-1 merged commit 6363be7 into main Jul 30, 2024
4 checks passed
@MonkeyKing-1 MonkeyKing-1 deleted the feat/benchmark_multitier branch July 30, 2024 17:13
luffykai pushed a commit that referenced this pull request Dec 13, 2024
* feat: sorted_limbs chip checking each limb less than limb_bits bits

* wip

* feat: completed sorted_limbs chip with tests

* wip

* feat: SortedLimbsChip with LessThan subchip

* feat: less_than subchip refactored

* feat: rename SortedLimbsChip to AssertSortedChip and write LessThanChip tests

* chore: change name of assert sorted chip

* chore: fix names in tests for AssertSortedChip

* chore: address comments

* chore: cleanup

* chore: change MAX from generic to instance field for LessThanChip and AssertSortedChip

* wip: added extra bits to middle chip trace

* wip

* adding connection to IsEqualVec chip

* feat: IsLessThanChip to compare two numbers

* feat: IsLessThanTuple subchip for different limb_bits

* test: added tests for partially and non-allocated pages

* test: added negative tests

* added constraints

* adding comments

* feat: IsLessThanTupleChip subchip in AssertSortedChip

* renaming

* removing TODO comments

* fixing clippy

* Add MVP bin

* Add MVP bin

* chore: renaming to idx and data

* chore: address comments first pass

* chore: moving page_controller inside page_read

* chore: refactor AssertSorted, IsEqual, IsLessThan, and IsLessThanTuple chips

* chore: address comments

* Update cache command

* Refactor cmd line items

* chore: eliminate high dim poly from IsLessThanTupleChip

* chore: fix tests

* chore: address comments for AssertSortedChip

* chore: cleanup AssertSorted

* chore: cleanup

* chore: include roundtrip flatten and from_slice tests

* feat: flatten and from_slice for IO and Aux columns

* wip

* wip

* complete the merge

* apparently there were more diffs

* most of testing infra done

* most of testing infra done

* finish merging again

* feat: write tests for general case

* add btree implementation

* chore: do some refactors

* Mock subcommand + logical interface updates

* Update interface for reading db

* Change interface to read

* Change interface to read

* Add write command

* Add output command for write

* chore: appease clippy (partially)

* Feat/m1 execution air (#66)

* feat: sorted_limbs chip checking each limb less than limb_bits bits

* wip

* feat: completed sorted_limbs chip with tests

* wip

* feat: SortedLimbsChip with LessThan subchip

* feat: less_than subchip refactored

* feat: rename SortedLimbsChip to AssertSortedChip and write LessThanChip tests

* chore: change name of assert sorted chip

* chore: fix names in tests for AssertSortedChip

* chore: address comments

* chore: cleanup

* chore: change MAX from generic to instance field for LessThanChip and AssertSortedChip

* wip: added extra bits to middle chip trace

* wip

* adding connection to IsEqualVec chip

* feat: IsLessThanChip to compare two numbers

* feat: IsLessThanTuple subchip for different limb_bits

* test: added tests for partially and non-allocated pages

* test: added negative tests

* added constraints

* adding comments

* feat: IsLessThanTupleChip subchip in AssertSortedChip

* renaming

* removing TODO comments

* fixing clippy

* chore: renaming to idx and data

* chore: address comments first pass

* chore: moving page_controller inside page_read

* chore: refactor AssertSorted, IsEqual, IsLessThan, and IsLessThanTuple chips

* chore: address comments

* chore: eliminate high dim poly from IsLessThanTupleChip

* chore: fix tests

* chore: address comments for AssertSortedChip

* chore: cleanup AssertSorted

* chore: cleanup

* chore: include roundtrip flatten and from_slice tests

* feat: flatten and from_slice for IO and Aux columns

* wip: final page chip

* remove txt file

* feat: final_page_chip

* feat: integrating all chips for page_read_write

* fixing lib

* using field bits()

* adding extra communication between checker and final chip

* muting clippy

* renaming to AIR

* adding comments

* wip

* wip

* feat: execution air finished

---------

Co-authored-by: bfan <[email protected]>
Co-authored-by: Osama Alkhodairy <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>

* Add print flag to afi command, update readmes

* Update warnings

* wip keygen

* wip: start prove

* Predicate

* wip: prove and verify

* change branches

* Add to_page for Table

* Use btreemap

* Update functions

* Update page to/from

* Update tests

* Add predicate binary

* wip: proof not serializable

* chore: patch stuff

* add serde bounds

* feat: zk commands (not debugged yet)

* update mockdb

* wip: mold into new format

* chore: remove extraneous stuff

* [WIP: query-binary] Merge r/w changes (#69)

* Add is_less_than_bits chip (#60)

* Add is_less_than_bits chip

* Address zlangely's comments

* Remove chip and use from_bool

* Use row_mut

* Add comments explaining comparison_check

* Add alt version of is_less_than_bits chip

* Replace is_less_than_bits with alt version, address comments

* Fix lint issues

* Feat/is less than bits tuple chip (#63)

* Add is_less_than_tuple_bits chip

* Incorporate is_less_than_bits feedback into is_less_than_tuple_bits

* Add is_less_than_tuple_bits chip

* Use match and cmp instead of else if

* Adjust for new is_less_than_bits chip

* chore: remove range_max field from IsLessThanAir and IsLessThanTupleAir (#65)

* chore: derive serialize for proof (#67)

* feat: page read write checker (#45)

* feat: sorted_limbs chip checking each limb less than limb_bits bits

* wip

* feat: completed sorted_limbs chip with tests

* wip

* feat: SortedLimbsChip with LessThan subchip

* feat: less_than subchip refactored

* feat: rename SortedLimbsChip to AssertSortedChip and write LessThanChip tests

* chore: change name of assert sorted chip

* chore: fix names in tests for AssertSortedChip

* chore: address comments

* chore: cleanup

* chore: change MAX from generic to instance field for LessThanChip and AssertSortedChip

* wip: added extra bits to middle chip trace

* wip

* adding connection to IsEqualVec chip

* feat: IsLessThanChip to compare two numbers

* feat: IsLessThanTuple subchip for different limb_bits

* test: added tests for partially and non-allocated pages

* test: added negative tests

* added constraints

* adding comments

* feat: IsLessThanTupleChip subchip in AssertSortedChip

* renaming

* removing TODO comments

* fixing clippy

* chore: renaming to idx and data

* chore: address comments first pass

* chore: moving page_controller inside page_read

* chore: refactor AssertSorted, IsEqual, IsLessThan, and IsLessThanTuple chips

* chore: address comments

* chore: eliminate high dim poly from IsLessThanTupleChip

* chore: fix tests

* chore: address comments for AssertSortedChip

* chore: cleanup AssertSorted

* chore: cleanup

* chore: include roundtrip flatten and from_slice tests

* feat: flatten and from_slice for IO and Aux columns

* wip: final page chip

* remove txt file

* feat: final_page_chip

* feat: integrating all chips for page_read_write

* fixing lib

* using field bits()

* adding extra communication between checker and final chip

* muting clippy

* renaming to AIR

* adding comments

* comment fix

* optimization to one less bus

* comments

* moving old page_controller inside page_read

* updateing comment

* feat: more general FinalPageAir

* making IsEqualVecAuxCols clonable

* enforcing unallocated rows to be zero

* aligning with new less than chip

* using Air::eval instead of SubAir::eval

* fix comment

* removed arguments from load_page for readability

* addressing comments and adding common/ directory with Page struct

---------

Co-authored-by: bfan <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>

* Update to/from page and table tests

* Update tests

* chore: satisfy clippy (#68)

* Fix execution_air test

* Update

---------

Co-authored-by: TlatoaniHJ <[email protected]>
Co-authored-by: bfan05 <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>
Co-authored-by: Osama Alkhodairy <[email protected]>
Co-authored-by: Zach Langley <[email protected]>

* Tmp: remove predicate

* Update readme

* clean up code

* feat: rename chips to airs

* feat: fix duplication attack

* Update commands for newest rows

* feat: migrate to bincode

* finish merge

* feat: add tracing and switch default fri params to log_blowup_factor = 3

* chore: update logging

* Fix readme typo

* Fix clippy warnings

* finish merge

* add afs-1b folder

* Update to handle input byte lengths

* Remove extraneous code

* Revert 9f02efc^..9bad23e

* feat: working query binary

* add config file

* Update logical interface to add byte lengths

* Remove generics from logical-interface

* merging new Offline Checker changes

* merge main

* change page format

* feat: remove btree generics

* feat: binsearch optimization for btree

* feat: add 1b scripting

* wip

* finish merge

* wip: resolve provertracedata cloen issue

* benchmark multitier

* finish changes

* wip

* wip

* wip

* finish merge

* finish merging

* finish cleaning

* move files

* fix cargo.toml

* wip

* wip

* finish requested changes

* fix leaf trace gen

* edit comment

---------

Co-authored-by: bfan <[email protected]>
Co-authored-by: Osama Alkhodairy <[email protected]>
Co-authored-by: Yu Jiang Tham <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>
Co-authored-by: Zach Langley <[email protected]>
Co-authored-by: Yu Jiang Tham <[email protected]>
Co-authored-by: TlatoaniHJ <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Avaneesh-axiom pushed a commit that referenced this pull request Jan 10, 2025
* feat: sorted_limbs chip checking each limb less than limb_bits bits

* wip

* feat: completed sorted_limbs chip with tests

* wip

* feat: SortedLimbsChip with LessThan subchip

* feat: less_than subchip refactored

* feat: rename SortedLimbsChip to AssertSortedChip and write LessThanChip tests

* chore: change name of assert sorted chip

* chore: fix names in tests for AssertSortedChip

* chore: address comments

* chore: cleanup

* chore: change MAX from generic to instance field for LessThanChip and AssertSortedChip

* wip: added extra bits to middle chip trace

* wip

* adding connection to IsEqualVec chip

* feat: IsLessThanChip to compare two numbers

* feat: IsLessThanTuple subchip for different limb_bits

* test: added tests for partially and non-allocated pages

* test: added negative tests

* added constraints

* adding comments

* feat: IsLessThanTupleChip subchip in AssertSortedChip

* renaming

* removing TODO comments

* fixing clippy

* Add MVP bin

* Add MVP bin

* chore: renaming to idx and data

* chore: address comments first pass

* chore: moving page_controller inside page_read

* chore: refactor AssertSorted, IsEqual, IsLessThan, and IsLessThanTuple chips

* chore: address comments

* Update cache command

* Refactor cmd line items

* chore: eliminate high dim poly from IsLessThanTupleChip

* chore: fix tests

* chore: address comments for AssertSortedChip

* chore: cleanup AssertSorted

* chore: cleanup

* chore: include roundtrip flatten and from_slice tests

* feat: flatten and from_slice for IO and Aux columns

* wip

* wip

* complete the merge

* apparently there were more diffs

* most of testing infra done

* most of testing infra done

* finish merging again

* feat: write tests for general case

* add btree implementation

* chore: do some refactors

* Mock subcommand + logical interface updates

* Update interface for reading db

* Change interface to read

* Change interface to read

* Add write command

* Add output command for write

* chore: appease clippy (partially)

* Feat/m1 execution air (#66)

* feat: sorted_limbs chip checking each limb less than limb_bits bits

* wip

* feat: completed sorted_limbs chip with tests

* wip

* feat: SortedLimbsChip with LessThan subchip

* feat: less_than subchip refactored

* feat: rename SortedLimbsChip to AssertSortedChip and write LessThanChip tests

* chore: change name of assert sorted chip

* chore: fix names in tests for AssertSortedChip

* chore: address comments

* chore: cleanup

* chore: change MAX from generic to instance field for LessThanChip and AssertSortedChip

* wip: added extra bits to middle chip trace

* wip

* adding connection to IsEqualVec chip

* feat: IsLessThanChip to compare two numbers

* feat: IsLessThanTuple subchip for different limb_bits

* test: added tests for partially and non-allocated pages

* test: added negative tests

* added constraints

* adding comments

* feat: IsLessThanTupleChip subchip in AssertSortedChip

* renaming

* removing TODO comments

* fixing clippy

* chore: renaming to idx and data

* chore: address comments first pass

* chore: moving page_controller inside page_read

* chore: refactor AssertSorted, IsEqual, IsLessThan, and IsLessThanTuple chips

* chore: address comments

* chore: eliminate high dim poly from IsLessThanTupleChip

* chore: fix tests

* chore: address comments for AssertSortedChip

* chore: cleanup AssertSorted

* chore: cleanup

* chore: include roundtrip flatten and from_slice tests

* feat: flatten and from_slice for IO and Aux columns

* wip: final page chip

* remove txt file

* feat: final_page_chip

* feat: integrating all chips for page_read_write

* fixing lib

* using field bits()

* adding extra communication between checker and final chip

* muting clippy

* renaming to AIR

* adding comments

* wip

* wip

* feat: execution air finished

---------

Co-authored-by: bfan <[email protected]>
Co-authored-by: Osama Alkhodairy <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>

* Add print flag to afi command, update readmes

* Update warnings

* wip keygen

* wip: start prove

* Predicate

* wip: prove and verify

* change branches

* Add to_page for Table

* Use btreemap

* Update functions

* Update page to/from

* Update tests

* Add predicate binary

* wip: proof not serializable

* chore: patch stuff

* add serde bounds

* feat: zk commands (not debugged yet)

* update mockdb

* wip: mold into new format

* chore: remove extraneous stuff

* [WIP: query-binary] Merge r/w changes (#69)

* Add is_less_than_bits chip (#60)

* Add is_less_than_bits chip

* Address zlangely's comments

* Remove chip and use from_bool

* Use row_mut

* Add comments explaining comparison_check

* Add alt version of is_less_than_bits chip

* Replace is_less_than_bits with alt version, address comments

* Fix lint issues

* Feat/is less than bits tuple chip (#63)

* Add is_less_than_tuple_bits chip

* Incorporate is_less_than_bits feedback into is_less_than_tuple_bits

* Add is_less_than_tuple_bits chip

* Use match and cmp instead of else if

* Adjust for new is_less_than_bits chip

* chore: remove range_max field from IsLessThanAir and IsLessThanTupleAir (#65)

* chore: derive serialize for proof (#67)

* feat: page read write checker (#45)

* feat: sorted_limbs chip checking each limb less than limb_bits bits

* wip

* feat: completed sorted_limbs chip with tests

* wip

* feat: SortedLimbsChip with LessThan subchip

* feat: less_than subchip refactored

* feat: rename SortedLimbsChip to AssertSortedChip and write LessThanChip tests

* chore: change name of assert sorted chip

* chore: fix names in tests for AssertSortedChip

* chore: address comments

* chore: cleanup

* chore: change MAX from generic to instance field for LessThanChip and AssertSortedChip

* wip: added extra bits to middle chip trace

* wip

* adding connection to IsEqualVec chip

* feat: IsLessThanChip to compare two numbers

* feat: IsLessThanTuple subchip for different limb_bits

* test: added tests for partially and non-allocated pages

* test: added negative tests

* added constraints

* adding comments

* feat: IsLessThanTupleChip subchip in AssertSortedChip

* renaming

* removing TODO comments

* fixing clippy

* chore: renaming to idx and data

* chore: address comments first pass

* chore: moving page_controller inside page_read

* chore: refactor AssertSorted, IsEqual, IsLessThan, and IsLessThanTuple chips

* chore: address comments

* chore: eliminate high dim poly from IsLessThanTupleChip

* chore: fix tests

* chore: address comments for AssertSortedChip

* chore: cleanup AssertSorted

* chore: cleanup

* chore: include roundtrip flatten and from_slice tests

* feat: flatten and from_slice for IO and Aux columns

* wip: final page chip

* remove txt file

* feat: final_page_chip

* feat: integrating all chips for page_read_write

* fixing lib

* using field bits()

* adding extra communication between checker and final chip

* muting clippy

* renaming to AIR

* adding comments

* comment fix

* optimization to one less bus

* comments

* moving old page_controller inside page_read

* updateing comment

* feat: more general FinalPageAir

* making IsEqualVecAuxCols clonable

* enforcing unallocated rows to be zero

* aligning with new less than chip

* using Air::eval instead of SubAir::eval

* fix comment

* removed arguments from load_page for readability

* addressing comments and adding common/ directory with Page struct

---------

Co-authored-by: bfan <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>

* Update to/from page and table tests

* Update tests

* chore: satisfy clippy (#68)

* Fix execution_air test

* Update

---------

Co-authored-by: TlatoaniHJ <[email protected]>
Co-authored-by: bfan05 <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>
Co-authored-by: Osama Alkhodairy <[email protected]>
Co-authored-by: Zach Langley <[email protected]>

* Tmp: remove predicate

* Update readme

* clean up code

* feat: rename chips to airs

* feat: fix duplication attack

* Update commands for newest rows

* feat: migrate to bincode

* finish merge

* feat: add tracing and switch default fri params to log_blowup_factor = 3

* chore: update logging

* Fix readme typo

* Fix clippy warnings

* finish merge

* add afs-1b folder

* Update to handle input byte lengths

* Remove extraneous code

* Revert 9f02efc^..9bad23e

* feat: working query binary

* add config file

* Update logical interface to add byte lengths

* Remove generics from logical-interface

* merging new Offline Checker changes

* merge main

* change page format

* feat: remove btree generics

* feat: binsearch optimization for btree

* feat: add 1b scripting

* wip

* finish merge

* wip: resolve provertracedata cloen issue

* benchmark multitier

* finish changes

* wip

* wip

* wip

* finish merge

* finish merging

* finish cleaning

* move files

* fix cargo.toml

* wip

* wip

* finish requested changes

* fix leaf trace gen

* edit comment

---------

Co-authored-by: bfan <[email protected]>
Co-authored-by: Osama Alkhodairy <[email protected]>
Co-authored-by: Yu Jiang Tham <[email protected]>
Co-authored-by: Jonathan Wang <[email protected]>
Co-authored-by: Zach Langley <[email protected]>
Co-authored-by: Yu Jiang Tham <[email protected]>
Co-authored-by: TlatoaniHJ <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
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.

6 participants