From 1725159fcb704ec78fa1b79fdc080f120eb6ce1d Mon Sep 17 00:00:00 2001 From: Aki Wu Date: Thu, 11 May 2023 09:13:17 +0800 Subject: [PATCH 1/3] add milestone 1 deliveries --- ...or-accountable-light-client_milestone-1.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 deliveries/solidity-verifier-for-accountable-light-client_milestone-1.md diff --git a/deliveries/solidity-verifier-for-accountable-light-client_milestone-1.md b/deliveries/solidity-verifier-for-accountable-light-client_milestone-1.md new file mode 100644 index 000000000..1da3caa3c --- /dev/null +++ b/deliveries/solidity-verifier-for-accountable-light-client_milestone-1.md @@ -0,0 +1,28 @@ +# Milestone Delivery :mailbox: + +**The [invoice form :pencil:](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform) has been filled out correctly for this milestone and 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:** 1 + +**Context** + +This milestone contains two EIP compatibale elliptic curve precompile implementations. They have been merged into [paritytech/frontier](https://github.com/paritytech/frontier) through this [PR](https://github.com/paritytech/frontier/pull/1049/). + +**Deliverables** + +| Number | Deliverable | Link | Notes | +| ------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| **0a.** | License | Apache-2.0 | follow [paritytech/frontier](https://github.com/paritytech/frontier)'s license | +| **0b.** | Documentation | [BLS12-377](https://paritytech.github.io/frontier/rustdocs/pallet_evm_precompile_bls12377/index.html), [BW6-761](https://paritytech.github.io/frontier/rustdocs/pallet_evm_precompile_bw6761/index.html) | | +| **0c.** | Testing and Testing Guide | [BLS12-377](https://github.com/paritytech/frontier/blob/master/frame/evm/precompile/bls12377/src/tests.rs), [BW6-761](https://github.com/paritytech/frontier/blob/master/frame/evm/precompile/bw6761/src/tests.rs) | | +| 1. | BLS12-377 precompile | [code](https://github.com/paritytech/frontier/blob/master/frame/evm/precompile/bls12377/src/lib.rs) | | +| 2. | BW6-761 precompile | [code](https://github.com/paritytech/frontier/blob/master/frame/evm/precompile/bw6761/src/lib.rs) | | + +**Additional Information** + +1. Update EIP-3026: Gas meter + https://github.com/ethereum/EIPs/pull/7006 + +2. Celo's EIP-2539 implmentation has a problem about Multiexponentiation. + https://github.com/celo-org/celo-blockchain/issues/2059 From 766c6869e7409c0ceb103c33be4cc934a0ae531a Mon Sep 17 00:00:00 2001 From: Aki Wu Date: Thu, 28 Sep 2023 15:23:08 +0800 Subject: [PATCH 2/3] add milestone2 delivery doc --- ...or-accountable-light-client_milestone-2.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md diff --git a/deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md b/deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md new file mode 100644 index 000000000..0113b933a --- /dev/null +++ b/deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md @@ -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 Docs/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/tree/aki-docker#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)
2. Lagrange evaluation. [code](https://github.com/darwinia-network/apk-verifier/blob/main/src/common/poly/evaluations/Lagrange.sol)
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 From f622103cbe8400cca6608863a68a1e9cf07d1a14 Mon Sep 17 00:00:00 2001 From: Aki Wu Date: Thu, 28 Sep 2023 02:44:12 -0500 Subject: [PATCH 3/3] Fix link --- ...olidity-verifier-for-accountable-light-client_milestone-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md b/deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md index 0e3a4aaa9..3cc97dd19 100644 --- a/deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md +++ b/deliveries/solidity-verifier-for-accountable-light-client_milestone-2.md @@ -1,6 +1,6 @@ # Milestone Delivery :mailbox: -**The delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support Docs/milestone-deliverables-guidelines.md).** +**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