From 7e9130298f3949fde24eb71498bfd7acc4cd7b9e Mon Sep 17 00:00:00 2001 From: d0x471b <0x471@protonmail.com> Date: Wed, 11 Sep 2024 15:57:21 +0300 Subject: [PATCH] add metrics readme --- README.md | 27 +++++++++++++++++++++++++++ src/ecdh-secp256k1.test.ts | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d87df16..92e8e98 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,33 @@ There are interesting use cases such as: - [Balance hiding for DAO treasuries.](https://github.com/lyronctk/treasure-house?tab=readme-ov-file) ([Based on work done by Griffin Dunaif & Dan Boneh](https://hackmd.io/nCASdhqVQNWwMhpTmKpnKQ)). +## Overview + +| Category | Count | +|-------------------|--------| +| Total rows | 21,059 | +| RangeCheck0 | 5,448 | +| RangeCheck1 | 2,724 | +| Zero | 4,490 | +| ForeignFieldAdd | 1,460 | +| Generic | 3,939 | +| ForeignFieldMul | 798 | +| Poseidon | 2,200 | + + +## Performance Metrics + +| Task | Time | +|---------------------------------|--------------| +| Compile | 3.316s | +| Generate ECDH keys | 1.961ms | +| Prove Alice | 22.432s | +| Prove Bob | 17.200s | +| Verify Alice | 818.308ms | +| Verify Bob | 737.852ms | + +MacBook Pro M1, 8GB RAM + ## How to build ```sh diff --git a/src/ecdh-secp256k1.test.ts b/src/ecdh-secp256k1.test.ts index 8847856..790c0cb 100644 --- a/src/ecdh-secp256k1.test.ts +++ b/src/ecdh-secp256k1.test.ts @@ -18,7 +18,7 @@ describe('ECDH Secp256k1', () => { const expectedPublicKey = Secp256k1Curve.generator.scale(privateKey); const computedPublicKey = ecdh.publicKey(privateKey); - + expect(computedPublicKey.toBigint()).toStrictEqual(expectedPublicKey.toBigint()); });