Skip to content
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 kzg to common.customCrypto #3262

Merged
merged 13 commits into from
Feb 7, 2024
Merged

Add kzg to common.customCrypto #3262

merged 13 commits into from
Feb 7, 2024

Conversation

acolytec3
Copy link
Contributor

This adds kzg as an optional property on common.customCrypto and updates usage across the monorepo.

It also fixes a gap in our common.fromGethGenesis constructor to pass in the custom crypto object from common

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (398041d) 86.88% compared to head (a5db059) 86.86%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.57% <ø> (ø)
blockchain 91.60% <ø> (ø)
client 84.68% <ø> (ø)
common 98.25% <100.00%> (+<0.01%) ⬆️
devp2p 82.12% <ø> (ø)
ethash ∅ <ø> (∅)
evm 74.33% <25.00%> (-0.04%) ⬇️
genesis 99.98% <ø> (ø)
statemanager 75.83% <ø> (ø)
trie 89.27% <ø> (ø)
tx 95.45% <42.85%> (-0.45%) ⬇️
util 89.13% <ø> (ø)
vm 80.20% <ø> (ø)
wallet 88.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@holgerd77
Copy link
Member

Ah, I think we had some misunderstanding here. 🙂 So my main point was about bringing the KZG initialization method to Common and so to have some singleton like instantation there, so where we can leverage the statefulness of Common and can avoid this clustering of initKZG() calls as well as these unlucky try/catch blocks around.

Not saying though that this aligning of the KGZ library itself in the customCrypto module does not make sense though, guess this is complementary (?).

Didn't give this toooo much thought myself to be honest how this is exactly structurally setup TBH. Maybe just a stateful initKZG() method within Common together with a flag isKZGInitialized or something which then either calls into the provided customCrypto.kzg or (later on) into a native JS KZG library (and then remove this method from Util)?

Guess we can take this over in some async exchange in the chat for some additional clarification. 🙂

@holgerd77
Copy link
Member

Updated this via UI

@holgerd77
Copy link
Member

Updated this via UI

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holgerd77 holgerd77 merged commit b8e9d14 into master Feb 7, 2024
45 of 46 checks passed
@holgerd77 holgerd77 deleted the add-kzg-to-customCrypt branch February 7, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants