[Snyk] Upgrade ethereumjs-util from 5.2.0 to 6.2.0 #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade ethereumjs-util from 5.2.0 to 6.2.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Warning: This is a major version upgrade, and may be a breaking change.
Release notes
This release comes with a new file structure, related functionality is now broken down into separate files (like
account.js
) allowing for more oversight and modular integration. All functionality is additionally exposed through an aggregatingindex.js
file, so this version remains backwards-compatible.Overview on the new structure:
account
: Private/public key and address-related functionality (creation, validation, conversion)byte
: Byte-related helper and conversion functionsconstants
: Exposed constants (e.g.KECCAK256_NULL_S
for the string representation of the Keccak-256 hash of null)hash
: Hash functionsobject
: Helper function for creating a binary object (DEPRECATED
)signature
: Signing, signature validation, conversion, recoverySee associated PRs #182 and #179.
Features
account
: AddedEIP-1191
address checksum algorithm support fortoChecksumAddress()
,PR #204
Bug Fixes
bytes
:toBuffer()
conversion function now throws if strings aren't0x
-prefixed hex values making the behavior oftoBuffer()
more predictable respectively less error-prone (you might generally want to check cases in your code where you eventually allowed non-0x
-prefixed input before), PR #197Dependencies / Environment
6
, added Node11
and12
to officially supported Node versions,PR #207
safe-buffer
dependency,PR #182
rlp
dependency fromv2.0.0
tov2.2.3
(TypeScript
improvementsfor RLP hash functionality),
PR #187
@types/bn.js
adependency
instead of adevDependency
,PR #205
keccak256
dependency fromv1.4.0
tov2.0.0
, PR #168First TypeScript based release of the library, now also including a
type declaration file distributed along with the package published,
see PR #170.
Bug Fixes
isValidSignature()
not correctly returningfalse
if passed an
s
-value greater thansecp256k1n/2
onhomestead
or later.If you use the method signature with more than three arguments (so not just
passing in
v
,r
,s
and use it likeisValidSignature(v, r, s)
and omitthe optional args) please read the thread from
PR #171 carefully
and check your code.
Development
@types/node
to Node11
types,PR #175
PR #156
EIP-155
replay protection by adding an optionalchainId
parameterto
ecsign()
,ecrecover()
,toRpcSig()
andisValidSignature()
, if present thenew signature format relying on the
chainId
is used, see PR #143generateAddress2()
forCREATE2
opcode (EIP-1014
) address creation(Constantinople HF), see PR #146
toRpcSig()
changingv
from 0/1 to 27/28, this changes the resulting signature buffer, see PR #139sha3
-named constants and methods (seev5.2.0
release),see PR #154
sha3
hash related constants and functions tokeccak
, seethis EIP discussion for context
(tl;dr: Ethereum uses a slightly different hash algorithm then in the official
SHA-3
standard)SHA3_NULL_S
->KECCAK256_NULL_S
SHA3_NULL
->KECCAK256_NULL
SHA3_RLP_ARRAY_S
->KECCAK256_RLP_ARRAY_S
SHA3_RLP_ARRAY
->KECCAK256_RLP_ARRAY
SHA3_RLP_S
->KECCAK256_RLP_S
SHA3_RLP
->KECCAK256_RLP
sha3()
->keccak()
(number of bits determined in arguments)keccak256()
alias function forkeccak(a, 256)
sha
-named versions is nowDEPRECATED
and the relatedconstants and functions will be removed on the next major release
v6.0.0
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs