MCPcopy
hub / github.com/ethereum/research / to_bytes

Method to_bytes

binius/binary_fields.py:101–103  ·  view source on GitHub ↗
(self, length, byteorder)

Source from the content-addressed store, hash-verified

99 return 1 << (self.value.bit_length() - 1).bit_length()
100
101 def to_bytes(self, length, byteorder):
102 assert length >= (self.bit_length() + 7) // 8
103 return self.value.to_bytes(length, byteorder)
104
105 @classmethod
106 def from_bytes(cls, b, byteorder):

Callers 15

packed_binius_proofFunction · 0.45
simple_binius_proofFunction · 0.45
int_to_bytesFunction · 0.45
serialize_pointFunction · 0.45
prove_evaluationFunction · 0.45
verify_evaluationFunction · 0.45
serializeFunction · 0.45
compute_state_transitionFunction · 0.45

Calls 1

bit_lengthMethod · 0.95

Tested by

no test coverage detected