Cleanup `evm.utils.numeric`
See original GitHub issueWhat is wrong?
The evm.utils.numeric
module could be cleaned up.
How can it be fixed
- switch to use
eth_utils.int_to_big_endian
andeth_utils.big_endian_to_int
- change
int_to_bytes32
to usevalue.to_bytes(32, 'big')
but preserve the validation checks. - remove
int_to_byte
as it doesn’t appear to be used anywhere. - remove
byte_to_int
as it isn’t used. - remove
safe_ord
as it should not be needed anymore.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
stefanberger/ima-evm-utils - GitHub
The evmctl utility is used for producing and verifying digital signatures, which are used by the Linux kernel integrity subsystem.
Read more >[v3] ima-evm-utils: Add some tests for evmctl - Patchwork
Run `make check' to execute the tests. Currently only ima_hash, sign, verify, ima_sign, and ima_verify are tested. Signed-off-by: Vitaly Chikunov ...
Read more >Earned Value Management Systems For Operations Activities
This paper discusses the applicability for using an earned value management system (EVMS) for measuring performance of operations activities for ...
Read more >EVM(5)
The EVM channel manager, evmchmgr, is started automatically by the daemon, and is responsible for managing time-based event channel functions. The channel ...
Read more >14 Posting and Receiving EVM Events
Using EVM's API functions and utilities to post, subscribe to, ... For an event to be human readable, it must be possible to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It shouldn’t as message should be of type
bytes
, but in order to get rid of safe_ord() there you’ll also need to update other methods there to change the type of arguments fromAnyStr
tobytes
: https://paste.ubuntu.com/p/B9qBPPQNmw/I was going through the methods to be double sure if they’re not used anywhere and came across one use of
safe_ord
inp2p.discovery
which is as follows:cmd_id = safe_ord(message[HEAD_SIZE])
Wanted to be sure if this is not needed anymore?