question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cleanup `evm.utils.numeric`

See original GitHub issue

What 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 and eth_utils.big_endian_to_int
  • change int_to_bytes32 to use value.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:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gsalgadocommented, Apr 18, 2018

cmd_id = safe_ord(message[HEAD_SIZE]) Wanted to be sure if this is not needed anymore?

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 from AnyStr to bytes: https://paste.ubuntu.com/p/B9qBPPQNmw/

1reaction
hiteshramanicommented, Apr 18, 2018

I was going through the methods to be double sure if they’re not used anywhere and came across one use of safe_ord in p2p.discovery which is as follows:

cmd_id = safe_ord(message[HEAD_SIZE])

Wanted to be sure if this is not needed anymore?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found