-
Notifications
You must be signed in to change notification settings - Fork 323
refactor: bytes_i_to_uint256 #1042
refactor: bytes_i_to_uint256 #1042
Conversation
hi @obatirou thanks for the PR, it's normal that CI is failing given that the runner was recently updated for the Cancun fork, but not the |
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.
please remove the _big_endian
in the function name as in solidity this is the default behavior (ie. that uint256(bytes32) is big endian actually)
@ClementWalter In SSJ there are occurences where we need to use conversions from little-endian bytes. I think it's for precompiles though, so it might not be a direct concern here. But I still think it's good to have it :) |
there are some places where we specifically put |
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.
can you run once again the profiling to check the final steps count?
Time spent on this PR:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Resolves #897
What is the new behavior?
bytes_i_to_uint256
tobytes_big_endian_to_uint256
is_bytes_len_16_bytes_or_less
bytes_len
beforebytes
compute_half_uint256
tocompute_half_uint256_from_bytes
pow256_rev
pow256_rev
instead ofpow
from starkware lib: from 2419 to 1261 stepsWith

pow
from starkware libWith

pow256_rev
This change is