-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs for verify_attestation_data_and_proof_finality and weigh_j…
…ustification_and_finalization.
- Loading branch information
1 parent
fb86c0a
commit acb1f37
Showing
3 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
7 changes: 4 additions & 3 deletions
7
vendor/zkllvm-metacraft-circuits/docs/compute_shuffled_index.md
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# Compute shuffled index documentation. | ||
|
||
### *Implementation* | ||
The implementation code of the circuit is under "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits_impl/". | ||
The implementation code of the circuit is under "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits_impl/compute_shuffled_index_impl.h". | ||
This code is used in both the compilation as circuit and as executable. | ||
|
||
### *Circuit build* | ||
In order to build as circuit, we need an entry point marked with the `[[circuit]]` directive. This is done through a wrapper | ||
that uses the implementation code and resides in "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits". Since currently the Crypto3 | ||
that uses the implementation code and resides in "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits/compute_shuffled_index.cpp". Since currently the Crypto3 | ||
library does not implement computation of sha256 on a byte buffer, we use a header only library for the sha256 computations, which has | ||
negative performance consequences. | ||
|
||
### *Executable build + tests* | ||
The implementation code of the circuit is compiled as executable and tested against the input data from | ||
https://github.com/ethereum/consensus-spec-tests.git. The tests reside in "DendrETH/vendor/zkllvm-metacraft-circuits/src/tests/compute_shuffled_index_test/". | ||
For convenience, we have a script that performs all necessary steps to run the test -> "DendrETH/vendor/zkllvm-metacraft-circuits/scripts/compile_and_run_tests.sh". | ||
For convenience, we have a script that performs all necessary steps to run the test -> "DendrETH/vendor/zkllvm-metacraft-circuits/scripts/compile_and_run_tests.sh", which by default runs all tests. We can pass as argument to this script "compute_shuffled_index_test" which will only run the relevant tests. For example, run the script from the main project directory "DendrETH/vendor/zkllvm-metacraft-circuits" as follows: | ||
`./scripts/compile_and_run_tests.sh compute_shuffled_index_test` | ||
It is required that docker is installed on the machine that will run the tests. |
16 changes: 16 additions & 0 deletions
16
...or/zkllvm-metacraft-circuits/docs/verify_attestation_data_and_proof_finality.md
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,16 @@ | ||
# Compute shuffled index documentation. | ||
|
||
### *Implementation* | ||
The implementation code of the circuit is under "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits_impl/verify_attestation_data_impl.h". | ||
This code is used in both the compilation as circuit and as executable. | ||
|
||
### *Circuit build* | ||
In order to build as circuit, we need an entry point marked with the `[[circuit]]` directive. This is done through a wrapper | ||
that uses the implementation code and resides in "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits/verify_attestation_data.cpp". This file also contains the proof_finality logic. | ||
|
||
### *Executable build + tests* | ||
The implementation code of the circuit is compiled as executable and tested against input data extracted from | ||
an Ethereum node. The tests reside in "DendrETH/vendor/zkllvm-metacraft-circuits/src/tests/verify_attestation_data_test". | ||
For convenience, we have a script that performs all necessary steps to run the test -> "DendrETH/vendor/zkllvm-metacraft-circuits/scripts/compile_and_run_tests.sh", which by default runs all tests. We can pass as argument to this script "verify_attestation_data_test" which will only run the relevant tests. For example, run the script from the main project directory "DendrETH/vendor/zkllvm-metacraft-circuits" as follows: | ||
`./scripts/compile_and_run_tests.sh verify_attestation_data_test` | ||
It is required that docker is installed on the machine that will run the tests. |
15 changes: 15 additions & 0 deletions
15
vendor/zkllvm-metacraft-circuits/docs/weigh_justification_and_finalization.md
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,15 @@ | ||
# Compute shuffled index documentation. | ||
|
||
### *Implementation* | ||
The implementation code of the circuit is under "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits_impl/weigh_justification_and_finalization_impl.h". | ||
This code is used in both the compilation as circuit and as executable. | ||
|
||
### *Circuit build* | ||
In order to build as circuit, we need an entry point marked with the `[[circuit]]` directive. This is done through a wrapper | ||
that uses the implementation code and resides in "DendrETH/vendor/zkllvm-metacraft-circuits/src/circuits/weigh_justification_and_finalization.cpp". | ||
|
||
### *Executable build + tests* | ||
The implementation code of the circuit is compiled as executable and tested against input data extracted from an Ethereum node. The tests reside in "DendrETH/vendor/zkllvm-metacraft-circuits/src/tests/weigh_justification_and_finalization_test". | ||
For convenience, we have a script that performs all necessary steps to run the test -> "DendrETH/vendor/zkllvm-metacraft-circuits/scripts/compile_and_run_tests.sh", which by default runs all tests. We can pass as argument to this script "weigh_justification_and_finalization_test" which will only run the relevant tests. For example, run the script from the main project directory "DendrETH/vendor/zkllvm-metacraft-circuits" as follows: | ||
`./scripts/compile_and_run_tests.sh weigh_justification_and_finalization_test` | ||
It is required that docker is installed on the machine that will run the tests. |