-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from kroma-network/feat/implement-fibonacci-c…
…ircuits test: implement fibonacci circuits
- Loading branch information
Showing
16 changed files
with
3,859 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
load("//bazel:tachyon_cc.bzl", "tachyon_cc_library", "tachyon_cc_unittest") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
COMMON_TEST_DATA_DEPS = [ | ||
"//tachyon/zk/plonk/examples:circuit_test_data", | ||
"//tachyon/zk/plonk/examples:circuit_test_type_traits", | ||
"//tachyon/zk/plonk/examples:point", | ||
] | ||
|
||
COMMON_TEST_DEPS = [ | ||
"//tachyon/zk/plonk/examples:circuit_test", | ||
"//tachyon/zk/plonk/layout/floor_planner:simple_floor_planner", | ||
"//tachyon/zk/plonk/layout/floor_planner/v1:v1_floor_planner", | ||
] | ||
|
||
tachyon_cc_library( | ||
name = "fibonacci1_circuit", | ||
hdrs = ["fibonacci1_circuit.h"], | ||
deps = ["//tachyon/zk/plonk/constraint_system:circuit"], | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "fibonacci1_circuit_test_data", | ||
testonly = True, | ||
hdrs = ["fibonacci1_circuit_test_data.h"], | ||
deps = COMMON_TEST_DATA_DEPS, | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "fibonacci2_circuit", | ||
hdrs = ["fibonacci2_circuit.h"], | ||
deps = ["//tachyon/zk/plonk/constraint_system:circuit"], | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "fibonacci2_circuit_test_data", | ||
testonly = True, | ||
hdrs = ["fibonacci2_circuit_test_data.h"], | ||
deps = COMMON_TEST_DATA_DEPS, | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "fibonacci3_circuit", | ||
hdrs = ["fibonacci3_circuit.h"], | ||
deps = [ | ||
":is_zero_chip", | ||
"//tachyon/zk/plonk/constraint_system:circuit", | ||
], | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "fibonacci3_circuit_test_data", | ||
testonly = True, | ||
hdrs = ["fibonacci3_circuit_test_data.h"], | ||
deps = COMMON_TEST_DATA_DEPS, | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "is_zero_chip", | ||
hdrs = ["is_zero_chip.h"], | ||
deps = [ | ||
"//tachyon/zk/expressions:expression_factory", | ||
"//tachyon/zk/plonk/constraint_system", | ||
"//tachyon/zk/plonk/layout:region", | ||
], | ||
) | ||
|
||
tachyon_cc_unittest( | ||
name = "fibonacci1_circuit_test", | ||
testonly = True, | ||
srcs = ["fibonacci1_circuit_test.cc"], | ||
deps = COMMON_TEST_DEPS + [ | ||
"fibonacci1_circuit_test_data", | ||
":fibonacci1_circuit", | ||
], | ||
) | ||
|
||
tachyon_cc_unittest( | ||
name = "fibonacci2_circuit_test", | ||
testonly = True, | ||
srcs = ["fibonacci2_circuit_test.cc"], | ||
deps = COMMON_TEST_DEPS + [ | ||
"fibonacci2_circuit_test_data", | ||
":fibonacci2_circuit", | ||
], | ||
) | ||
|
||
tachyon_cc_unittest( | ||
name = "fibonacci3_circuit_test", | ||
testonly = True, | ||
srcs = ["fibonacci3_circuit_test.cc"], | ||
deps = COMMON_TEST_DEPS + [ | ||
"fibonacci3_circuit_test_data", | ||
":fibonacci3_circuit", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Fibonacci Circuits Test | ||
|
||
## Acknowledgements | ||
|
||
The three circuits and single chip originally come from the [halo2-examples](https://github.com/icemelon/halo2-examples/tree/6b8676487635169367e085a44e3b73c56290883f/src/fibonacci) repository by [icemelon](https://github.com/icemelon), demonstrating four different circuit designs for the Fibonacci sequence. `example4.rs` had not been implemented as it requires a larger evaluation domain for testing. | ||
|
||
## License | ||
|
||
As of [#279](https://github.com/kroma-network/tachyon/pull/279), the [halo2-examples](https://github.com/icemelon/halo2-examples/tree/6b8676487635169367e085a44e3b73c56290883f/src/fibonacci) repository does not specify a license. Consequently, the legal permissions for using, modifying, and distributing this code are unclear. So please consider the licensing status of this code as pending. |
Oops, something went wrong.