Skip to content

Commit f0ed6cc

Browse files
authored
New v1.0.0 Release (#27)
* Re-move webdriverio dependency to dev dependencies * Bump version to v1.0.0 * Rebuild package-lock.json * Add CHANGELOG entry / update README * Add some init-is-slow note in README
1 parent 43e33f8 commit f0ed6cc

File tree

5 files changed

+404
-80
lines changed

5 files changed

+404
-80
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
(modification: no type change headlines) and this project adheres to
66
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## 1.0.0 - 2025-11-03
9+
10+
Support for both the computation as well as the verification of cell-based proofs in the context of EIP-7594 (PeerDAS), thanks a lot to @n8wb for the generous code contribution! ❤️
11+
12+
Main work being done in PR [#20](https://github.com/ethereumjs/kzg-wasm/pull/20), some follow-up PRs for optimizations and adjustments.
13+
814
## 0.4.0 - 2024-04-16
915

1016
- Add browser specific build and corresponding updates to exports map in package.json, PR [#11](https://github.com/ethereumjs/kzg-wasm/pull/11)

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# KZG-WASM
22

3+
| WASM wrapper library for KZG/EIP-4844/PeerDAS functionality. |
4+
| ------------------------------------------------------------ |
5+
6+
## Table of Contents
7+
8+
- [Introduction](#introduction)
9+
- [Usage](#usage)
10+
- [API Reference](#api-reference)
11+
- [Performance Comparison](#performance-comparison)
12+
- [Development](#development)
13+
- [License](#license)
14+
15+
## Introduction
16+
317
This module implements a JS wrapper around a WASM compilation of the [`c-kzg-4844`](https://github.com/ethereum/c-kzg-4844) C library built for use with EIP-4844. Starting with v1.0.0, the library also support cell-based operations in the context of EIP-7594 (PeerDAS).
418

519
This library is produced by building the original C code to WASM using the [`empscripten`](https://empscripten.org) toolchain in [this fork](https://github.com/ETHCF/c-kzg-4844) of `c-kzg-4844`.
620

21+
If you are looking for a pure JS implementation of KZG/EIP-4844/PeerDAS functionality, check out the [`micro-eth-signer`](https://github.com/paulmillr/micro-eth-signer) library. For a comparison on how these libraries roughly compare in terms of performance, see the [Performance Comparison](#performance-comparison) section.
22+
723
## Usage
824

925
This module exposes a single export, an async function called `loadKZG` which loads and compiles the WASM object, loads a trusted setup (defaults to the official setup from the KZG ceremony) and returns an object that exposes the API defined in the `KZG` type interface in `@ethereumjs/util`
@@ -127,6 +143,21 @@ type KZGProofWithCells = {
127143
}
128144
```
129145
146+
## Performance Comparison
147+
148+
The following numbers can give you some idea of the performance of the library. Note that these are rather "napkin numbers" and no benchmarks (30 runs each using Chrome), but they should nevertheless give you an idea if this wrapper library is a good fit for your use case.
149+
150+
```shell
151+
WASM KZG: 27.866666666666667 ms per commitment
152+
JS KZG: 4.466666666666667 ms per commitment
153+
WASM KZG: 276.06666666666666 ms per proof
154+
JS KZG: 644.7666666666667 ms per proof
155+
WASM KZG: 12.233333333333333 ms per verify proof
156+
JS KZG: 28.333333333333332 ms per verify proof
157+
```
158+
159+
Generally note that initialization of this library is pretty slow due to the large KZG setup, so it is likely only worth to use in long-running production contexts.
160+
130161
## Development
131162
132163
### Build Process

0 commit comments

Comments
 (0)