ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

EIP4844: kzg functionality is not available in browsers

Open paulmillr opened this issue 1 year ago • 2 comments

EIP 4844 uses KZG commitments.

  • Ideal: pure js KZG, works in browsers and limited environments like Metamask
  • Kinda OK: wasm KZG, works in browsers, doesn't work in limited environments
  • Bad (current): KZG only works in node.js and doesn't work in browsers

There's open issue in c-kzg (https://github.com/ethereum/c-kzg-4844/issues/343), but it won't add pure js impl.

paulmillr avatar Dec 15 '23 15:12 paulmillr

Yup, this is a known issue. I've done some experimentation with compiling c-kzg to wasm with limited success so far (mainly due to my own inexperience with modern C++ and wasm). There is a typescript version that @kevaundray started at one point but it's unmaintained and out of alignment with current kzg specs.

acolytec3 avatar Dec 15 '23 15:12 acolytec3

Work is being done on this here: https://github.com/acolytec3/kzg-wasm

holgerd77 avatar Feb 15 '24 10:02 holgerd77