-
Notifications
You must be signed in to change notification settings - Fork 438
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 BLS12-381 and EIP-4844 precompiles #5857
Conversation
a540d46
to
7e4d348
Compare
cb47b98
to
3632e5d
Compare
Span<uint> data = MemoryMarshal.Cast<byte, uint>(address.Bytes.AsSpan()); | ||
return (data[4] & 0x00ffffff) == 0 | ||
&& data[3] == 0 && data[2] == 0 && data[1] == 0 && data[0] == 0 |
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.
Loading to a Vector256 wouldn't be even faster?
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.
Anything but 4B integers does seem to work well with 20B address. May be we could cast it additionally to 8B int / Vector128(?) and have less comparisons, but it'd become too complicated
Update BLS12-381 and EIP-4844 precompiles' addresses according to:
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?