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

Bump rlp from 2.2.7 to 3.0.0 #487

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 3, 2022

Bumps rlp from 2.2.7 to 3.0.0.

Release notes

Sourced from rlp's releases.

rlp v3.0.0

rlp v3 is a breaking release with several important updates. Special thanks to @​paulmillr for the majority of this work in PR #90.

Dependencies

bn.js was removed in favor of BigInt support so the package now contains zero dependencies.

Default export

A new default export RLP now contains encode and decode.

You can now import and use RLP like this:

import RLP from 'rlp'
RLP.encode(1)

Uint8Array

Buffers were replaced in favor of using Uint8Arrays for improved performance and greater compatibility with browsers.

When upgrading from rlp v2 to v3, you must convert your Buffers to Uint8Arrays before passing in. To help, two new utility methods were added to ethereumjs-util v7.1.4: arrToBufArr and bufArrToArr. These will recursively step through your arrays to replace Buffers with Uint8Arrays, or vise versa.

Example:

// Old, rlp v2
import * as rlp from 'rlp'
const bufArr = [Buffer.from('123', 'hex'), Buffer.from('456', 'hex')]
const encoded = rlp.encode(bufArr)
const decoded = rlp.decode(encoded)
// New, rlp v3
import RLP from 'rlp'
const encoded: Uint8Array = RLP.encode(bufArrToArr(bufArr))
const encodedAsBuffer = Buffer.from(encoded)
const decoded: Uint8Array[] = RLP.decode(encoded)
const decodedAsBuffers = arrToBufArr(decoded)

Invalid RLPs

Increased strictness has been added to ensure invalid RLPs are not decoded, see PR #101.


PRs included in this release:

  • Fix karma, readme updates, combine source to one file, PR #109

... (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 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 D4nte as a code owner February 3, 2022 04:58
@D4nte
Copy link
Contributor

D4nte commented Feb 7, 2022

New version uses UInt8Array instead of Buffer. When trying to replace Buffer, did some hack around as other deps still use Buffer.

Best to remove buffer dependency properly first with See #337 and then do this upgrade.

@D4nte D4nte added the blocked This issue is blocked by some other work label Feb 7, 2022
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/rlp-3.0.0 branch 3 times, most recently from c68a3a0 to 3d7bd52 Compare February 16, 2022 00:52
Bumps [rlp](https://github.com/ethereumjs/ethereumjs-monorepo) from 2.2.7 to 3.0.0.
- [Release notes](https://github.com/ethereumjs/ethereumjs-monorepo/releases)
- [Commits](https://github.com/ethereumjs/ethereumjs-monorepo/compare/[email protected]@3.0.0)

---
updated-dependencies:
- dependency-name: rlp
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/rlp-3.0.0 branch from 3d7bd52 to 2a5649f Compare February 16, 2022 01:12
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 16, 2022

Looks like rlp is no longer a dependency, so this is no longer needed.

@dependabot dependabot bot closed this Feb 16, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/rlp-3.0.0 branch February 16, 2022 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue is blocked by some other work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant