-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add micro-eth-signer/kzg
#3674
Add micro-eth-signer/kzg
#3674
Conversation
The package is now live on NPM at |
packages/tx/package.json
Outdated
@@ -57,12 +57,14 @@ | |||
"@ethereumjs/common": "^4.4.0", | |||
"@ethereumjs/rlp": "^5.0.2", | |||
"@ethereumjs/util": "^9.1.0", | |||
"ethereum-cryptography": "^3.0.0" | |||
"ethereum-cryptography": "^3.0.0", | |||
"trusted-setups": "github:paulmillr/trusted-setups" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to have been forgotten. Will push a small update.
Have updated the There are some client tests failing now I also planned to fix, but I am not fully seeing through, so there is some naming/interface thing happening in the tests (e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some super small nits, LGTM otherwise
@@ -762,7 +762,7 @@ export const handlers: Map<number, OpHandler> = new Map([ | |||
function (runState) { | |||
const index = runState.stack.pop() | |||
if (runState.env.blobVersionedHashes.length > Number(index)) { | |||
runState.stack.push(bytesToBigInt(runState.env.blobVersionedHashes[Number(index)])) | |||
runState.stack.push(BigInt(runState.env.blobVersionedHashes[Number(index)])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will address this at some point, bit inside the EVM we should likely not put the strings in, but directly the bigints so we can push those to stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, hmm ok originally they were bytes which we kept converting to bigints, which is/was also suboptimal.
packages/util/test/kzg.bench.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Takes an initial pass at integrating the kzg module from
micro-eth-signer
, putting it intx
for now.I've added one of the trusted setups for now so we don't have to build/import
trusted-setups
Also removes
loadTrustedSetup
from the kzg interface. We don't use it anywhere and I'm not convinced we will ever need to load another one.