Skip to content

v0.0.5

@ed255 ed255 tagged this 31 May 09:14
* 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]>
Assets 2
Loading