Skip to content

Commit

Permalink
Merge pull request #1014 from darwinia-network/master
Browse files Browse the repository at this point in the history
Solidity Verifier Implementation for Accountable Light Client Milestone 2
  • Loading branch information
nikw3f authored Sep 28, 2023
2 parents 1b9fbd9 + f622103 commit 7c759ff
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Milestone Delivery :mailbox:

**The delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/milestone-deliverables-guidelines.md).**

- **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/solidity-verifier-for-accountable-light-client.md
- **Milestone Number:** 2

**Context**

This milestone is to implement the solidity version of the two verifiers in [apk-proof](https://github.com/w3f/apk-proofs), which are the [simple (basic)](https://github.com/w3f/apk-proofs/blob/main/bw6/src/verifier.rs#L38) and [packed](https://github.com/w3f/apk-proofs/blob/main/bw6/src/verifier.rs#L69) verifiers. But The solidity verifiers implemented in this milestone has two differences from the original rust version.

1. Fiat-shamir transformation.

This is listed in the application document.

We replace `Merlin::Transcript` with a more solidity friendly way. https://github.com/darwinia-network/apk-proofs/pull/4.
2. The hash-to-curve function.

Changed to `map_to_curve_simple_swu`. https://github.com/darwinia-network/apk-proofs/pull/3/files.

Switch to `map_to_curve_elligator_2` after arkworks finished this PR, https://github.com/arkworks-rs/algebra/pull/659.

**Deliverables**

| Number | Deliverable | Link | Notes |
| ------- | ------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| **0a.** | License | Apache-2.0 | |
| **0b.** | Documentation | https://darwinia-network.github.io/apk-verifier/index.html | |
| **0c.** | Testing and Testing Guide | https://github.com/darwinia-network/apk-verifier#run-test-in-docker | |
| 1. | Libraries preparation | 1. The solidity friendly fiat-shamir transformation. [code](https://github.com/darwinia-network/apk-verifier/blob/main/src/common/transcript/Simple.sol)<br />2. Lagrange evaluation. [code](https://github.com/darwinia-network/apk-verifier/blob/main/src/common/poly/evaluations/Lagrange.sol) <br />3. KZG verification. [code](https://github.com/darwinia-network/apk-verifier/blob/6b8bfd37e2c4142bf08d8c98f61a1d3e0c3df57d/src/common/pcs/kzg/KZG.sol) | |
| 2. | Basic verifier | [code](https://github.com/darwinia-network/apk-verifier/blob/main/src/Basic.sol) | |
| 3. | Packed verifier | [code](https://github.com/darwinia-network/apk-verifier/blob/main/src/Packed.sol) | |

**Additional Information**

- https://github.com/paritytech/frontier/pull/1207
- https://github.com/ethereum/EIPs/pull/7642
- https://github.com/paritytech/frontier/pull/1173
- https://github.com/ethereum/EIPs/pull/7006
- https://github.com/paritytech/frontier/pull/1049
- https://github.com/darwinia-network/apk-proofs

0 comments on commit 7c759ff

Please sign in to comment.