This repository was archived by the owner on Jul 5, 2024. It is now read-only.
Commit e4b3319
Implementation of tx circuit (shortcut 1) (#484)
* Implement Tx Circuit (shortcut 1)
Implement the Tx Circuit as specified in
https://github.com/appliedzkp/zkevm-specs/blob/master/specs/transactions-proof.md#circuit-behaviour-shortcut-1
This implementation uses ~205 columns and ~170k rows per transaction.
New dependencies to the zkevm-circuits subcrate:
- `halo2wrong` subcrates. This is where the ECDSA verification chip is
implemented. This dependency uses `halo2` and this means that we'll
require the version of `halo2` used in `halo2wrong` and
`zkevm-circuits` to match.
- `group`: Required for field and curve traits
- `libsecp256k1`: Requiered to perform the ECDSA public key recovery
with access to the public key coordinates.
- `rlp`: Required to calculate the RLP of the transaction to get the
transaction hash (to sign)
- `num-bigint`: Used to hold an integer bigger than the field, to latter
apply mod Fq (this is required for the message hash in the ECDSA
signature operation)
- `subtle`: Used to map `CtOption` to `Result`
* Split light and heavy tests; run heavy tests serially
* Address some comments from Carlos
* Document power of randomness expression trick
* Reuse geth_types::Transaction in tx_circuit
* Remove unused function
* Move random_linear_combine fn to utils
* Address comments from Adria
* Remove unused function
* Address comments from Adria v2
* Address comments from ChihChengLiang
* Address comments from ChihChengLiang v2
* Fix
* Add more tests
Co-authored-by: adria0.eth <[email protected]>1 parent 394f3d6 commit e4b3319
File tree
11 files changed
+1855
-30
lines changed- .github/workflows
- eth-types/src
- zkevm-circuits
- src
- evm_circuit
- tx_circuit
11 files changed
+1855
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
0 commit comments