-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: Handle nullptr JS TypedArrays by bumping napi to 2.6.11 #673
base: main
Are you sure you want to change the base?
Conversation
|
@@ -18,8 +18,8 @@ k256 = { version = "0.13.1", default-features = false, features = ["arithmetic", | |||
log = { version = "0.4.20", default-features = false } | |||
# when napi is pinned, be sure to pin napi-derive to the same version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't seem to be released in tandem (anymore?). Should we remove the comment or reword it to something like "If you bump the napi version, please also make sure that we use a compatible napi-derive"?.
This should ideally be handled by the upstream package but sometimes mistakes happen and I assume one of these were the reason for this warning, here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to. I also removed the comment in feat/multichain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code LGTM, but there seems to be a big regression on the seaport
benchmark: https://github.com/NomicFoundation/edr/actions/runs/10959402320/job/30431668868?pr=673
I reran it just in case it's a false positive.
This fixes an instance where we roundtrip a zero-length
Uint8Array
in JS code and violate theslice::from_raw_parts
contract (checked in debug builds at run-time since Rust 1.78) because internally napi calls it with a null pointer, see napi-rs/napi-rs#2258.Found while running the test suite of https://github.com/ProjectOpenSea/seaport with local, most recent Hardhat+EDR.
This should unblock further testing and releasing a Hardhat version that uses the EDR-powered stack tracing.