-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
update ethereumjs libraries #5791
Conversation
Heck, seems like with latest ethereumjs libs we get ssz and ethers providers libraries which are still large :( |
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Deploying with
|
Latest commit: |
bfad5e0
|
Status: | ✅ Deploy successful! |
Preview URL: | https://0bdf64e9.web3-js-docs.pages.dev |
Branch Preview URL: | https://chore-update-ethereumjs-libr.web3-js-docs.pages.dev |
Heck, seems like with latest ethereumjs libs we get ssz and ethers providers libraries which are still large :(
cc @web3/web3-js |
This PR can be closed , as eth/tx functions moved into 4.x |
Hi there, Holger from EthereumJS, we have a fix in the works for the Ethers dependency (with the goal to remove): ethereumjs/ethereumjs-monorepo#2633, feedback would be appreciated! 🙂 SSZ we still need to discuss. |
(respectively, to manage expectations: it is more unlikely that we will remove SSZ, since this is becoming such an integral part of the protocol in the near distant future. Might be a way here to continue to work together to make the SSZ library more compatible (if needed), lessen dependencies, size,...) |
(might generally be worth to have monthly ChainSafe(so mainly: Lodestar, Web3.js)/EthereumJS calls to discuss things like that) |
@holgerd77 For optimising 4.x web3.js build size we have removed some ethereumjs dependencies by using its functionality #5963 |
cc: @mconnelly8 |
To be honest: I think that is totally a dead end, especially our Common library is evolving so quickly that you will likely (and unnecessarily) waste a lot of ressources to catch up. Guess it would be beneficial to find some way together here. If you have some additional demands, just open an issue on our side https://github.com/ethereumjs/ethereumjs-monorepo or mention people from our team. 🙂 |
Hey @holgerd77,
Let me know if you think I should open those issues on ethereumjs repo or if you don't think this aligns with ethereumjs roadmap^^ |
@mpetrunic do you use tree-shaking? Does it work?
This is planned for v7 and huge amount of work for this was done over the last couple months.
That seems like it should be solved with tree-shaking. |
Yes we use tree shaking when creating minified bundle.
Treeshaking cannot remove dynamic code from TransactionFactory so we end up with ssz and ckzg code from eip4844 transaction type. I feel like better approach would be to allow users to instantiate transaction factory with transaction types they want to support^^ TBH, we could've fixed that if we just wrote our TxFactory that uses individual tx implementations. We can promise to try library again with v7 version :) |
Description
ethereumjs/common received big update which reduces bundle size significantly, unfortunately:
import ... from "async/eachSeries"
)closes #5943
Type of change
Checklist for 1.x:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
with success.dist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.Checklist for 4.x:
yarn
successfullyyarn lint
successfullyyarn build:web
successfullyyarn test:unit
successfullyyarn test:integration
successfullycompile:contracts
successfullyCHANGELOG.md
file in the packages I have edited.