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

chore(deps): remove useless @ethereumjs/common direct dependency #9171

Merged
merged 6 commits into from
Apr 16, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 9, 2024

Remove useless @ethereumjs/common direct dependency

Important

After bumping version, it appeared that ethereumjs/common was not required anymore in the app as a direct dep.
This allowed removing @ethereumjs/common and bump other indirect dependencies that were locked by this direct ethereumjs/common dependency version.
ethereumjs/common is still used but in other modules with other versions.

This PR:

  • removes @ethereumjs/common dependency (usage and package import)
  • updates indirect dependencies not locked anymore
  • fixes export and imports of buildUnserializedTransaction function
  • dedup updated yarn lock

Initial dependabot description

Bumps @ethereumjs/common from 2.6.5 to 4.3.0.

Release notes

Sourced from @​ethereumjs/common's releases.

@​ethereumjs/common v4.3.0

Full 4844 Browser Readiness

WASM KZG

Shortly following the "Dencun Hardfork Support" release round from last month, this is now the first round of releases where the EthereumJS libraries are now fully browser compatible regarding the new 4844 functionality, see PRs #3294 and #3296! 🎉

Our WASM wizard @​acolytec3 has spent the last two weeks and created a WASM build of the c-kzg library which we have released under the kzg-wasm name on npm (and you can also use independently for other projects). See the newly created GitHub repository for some library-specific documentation.

This WASM KZG library can now be used for KZG initialization (replacing the old recommended c-kzg initialization), see the respective README section from the tx library for usage instructions (which is also accurate for the other using upstream libraries like block or EVM).

Note that kzg-wasm needs to be added manually to your own dependencies and the KZG initialization code needs to be adopted like the following (which you will likely want to do in most cases, so if you deal with post Dencun EVM bytecode and/or 4844 blob txs in any way):

import { loadKZG } from 'kzg-wasm'
import { Chain, Common, Hardfork } from '@ethereumjs/common'
const kzg = await loadKZG()
// Instantiate common
const common = new Common({
chain: Chain.Mainnet,
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})

Manual addition is necessary because we did not want to bundle our libraries with WASM code by default, since some projects are then prevented from using our libraries.

Note that passing in the KZG setup file is not necessary anymore, since this is now defaulting to the setup file from the official KZG ceremony (which is now bundled with the KZG library).

Trie Node.js Import Bug

Since this fits well also to be placed here relatively prominently for awareness: we had a relatively nasty bug in the @ethereumjs/trie library with a Node.js web stream import also affecting browser compatibility, see PR #3280. This bug has been fixed along with these releases and this library now references the updated trie library version.

Other Changes

  • TypeScript type fixes leading to build problems with certain tools (Vercel), PR #3306
  • Early support for EIP-2935 - "Save historical block hashes in state" (Verkle related, likely subject to change), PRs #3268 and #3327

@​ethereumjs/common v4.2.0

Dencun Hardfork Support

While all EIPs contained in the upcoming Dencun hardfork run pretty much stable within the EthereumJS libraries for quite some time, this is the first release round which puts all this in the official space and removes "experimental" labeling preparing for an imminent Dencun launch on the last testnets (Holesky) and mainnet activation! 🎉

Dencun hardfork on the execution side is called Cancun and can be activated within the EthereumJS libraries (default hardfork still Shanghai) with a following common instance:

</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner April 9, 2024 08:40
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code team-mobile-platform labels Apr 9, 2024
Copy link

socket-security bot commented Apr 9, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@scure/base@1.1.6 None 0 80.4 kB paulmillr

🚮 Removed packages: npm/@noble/curves@1.1.0, npm/@scure/base@1.1.3

View full report↗︎

Copy link

socket-security bot commented Apr 9, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@NicolasMassart
Copy link
Contributor

@dependabot rebase

Bumps [@ethereumjs/common](https://github.com/ethereumjs/ethereumjs-monorepo) from 2.6.5 to 4.3.0.
- [Release notes](https://github.com/ethereumjs/ethereumjs-monorepo/releases)
- [Commits](https://github.com/ethereumjs/ethereumjs-monorepo/compare/@ethereumjs/common@2.6.5...@ethereumjs/common@4.3.0)

---
updated-dependencies:
- dependency-name: "@ethereumjs/common"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/ethereumjs/common-4.3.0 branch from 5cb4b02 to 017bb11 Compare April 10, 2024 17:50
remove common as new TransactionFactory doesn't need it
fix the file export and tsdoc
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@NicolasMassart NicolasMassart self-assigned this Apr 10, 2024
@NicolasMassart NicolasMassart added the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 10, 2024
Copy link
Contributor

github-actions bot commented Apr 10, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 26f057b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/62ff687b-61de-439e-b70b-2207ccdacb6b

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@NicolasMassart
Copy link
Contributor

@SocketSecurity ignore npm/@ethereumjs/util@9.0.3

@NicolasMassart NicolasMassart added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 10, 2024
Copy link
Contributor

github-actions bot commented Apr 10, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 7384b58
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/cfce01d9-1dcb-4478-b62b-31d9048d8fef

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@NicolasMassart NicolasMassart changed the title chore(deps): bump @ethereumjs/common from 2.6.5 to 4.3.0 chore(deps): remove useless @ethereumjs/common Apr 10, 2024
@NicolasMassart NicolasMassart changed the title chore(deps): remove useless @ethereumjs/common chore(deps): remove useless @ethereumjs/common direct dependency Apr 10, 2024
@NicolasMassart
Copy link
Contributor

After bumping version, it appeared that ethereumjs/common was not required anymore in the app as a direct dep.
It allowed removing it and bump other indirect dependencies that were locked by this direct ethereumjs/common dependency version.
ethereumjs/common is still used but in other modules with other versions.
Adding this in PR description.

@NicolasMassart NicolasMassart added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 10, 2024
Copy link

sonarcloud bot commented Apr 16, 2024

@NicolasMassart NicolasMassart merged commit 0e1d3d1 into main Apr 16, 2024
31 checks passed
@NicolasMassart NicolasMassart deleted the dependabot/npm_and_yarn/ethereumjs/common-4.3.0 branch April 16, 2024 13:42
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 16, 2024
@metamaskbot metamaskbot added the release-7.22.0 Issue or pull request that will be included in release 7.22.0 label Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code release-7.22.0 Issue or pull request that will be included in release 7.22.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants