faster-eth-abi 5.2.15__cp38-cp38-macosx_11_0_arm64.whl → 5.2.16__cp38-cp38-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of faster-eth-abi might be problematic. Click here for more details.

Files changed (48) hide show
  1. 29859a9e7da9d19bb98c__mypyc.cpython-38-darwin.so +0 -0
  2. faster_eth_abi/_codec.cpython-38-darwin.so +0 -0
  3. faster_eth_abi/_codec.py +6 -0
  4. faster_eth_abi/_decoding.cpython-38-darwin.so +0 -0
  5. faster_eth_abi/_decoding.py +28 -15
  6. faster_eth_abi/_encoding.cpython-38-darwin.so +0 -0
  7. faster_eth_abi/_encoding.py +7 -1
  8. faster_eth_abi/_grammar.cpython-38-darwin.so +0 -0
  9. faster_eth_abi/_grammar.py +5 -0
  10. faster_eth_abi/abi.cpython-38-darwin.so +0 -0
  11. faster_eth_abi/base.py +4 -0
  12. faster_eth_abi/codec.py +1261 -144
  13. faster_eth_abi/constants.cpython-38-darwin.so +0 -0
  14. faster_eth_abi/decoding.py +91 -47
  15. faster_eth_abi/encoding.py +51 -3
  16. faster_eth_abi/exceptions.py +5 -2
  17. faster_eth_abi/from_type_str.cpython-38-darwin.so +0 -0
  18. faster_eth_abi/from_type_str.py +4 -0
  19. faster_eth_abi/grammar.py +17 -19
  20. faster_eth_abi/io.py +4 -0
  21. faster_eth_abi/packed.cpython-38-darwin.so +0 -0
  22. faster_eth_abi/packed.py +4 -0
  23. faster_eth_abi/registry.py +98 -33
  24. faster_eth_abi/tools/__init__.cpython-38-darwin.so +0 -0
  25. faster_eth_abi/tools/_strategies.cpython-38-darwin.so +0 -0
  26. faster_eth_abi/typing.py +94 -10
  27. faster_eth_abi/utils/__init__.cpython-38-darwin.so +0 -0
  28. faster_eth_abi/utils/numeric.cpython-38-darwin.so +0 -0
  29. faster_eth_abi/utils/padding.cpython-38-darwin.so +0 -0
  30. faster_eth_abi/utils/string.cpython-38-darwin.so +0 -0
  31. faster_eth_abi/utils/validation.cpython-38-darwin.so +0 -0
  32. {faster_eth_abi-5.2.15.dist-info → faster_eth_abi-5.2.16.dist-info}/METADATA +12 -8
  33. faster_eth_abi-5.2.16.dist-info/RECORD +47 -0
  34. {faster_eth_abi-5.2.15.dist-info → faster_eth_abi-5.2.16.dist-info}/top_level.txt +0 -1
  35. benchmarks/__init__.py +0 -1
  36. benchmarks/batch.py +0 -9
  37. benchmarks/data.py +0 -313
  38. benchmarks/test_abi_benchmarks.py +0 -82
  39. benchmarks/test_decoding_benchmarks.py +0 -109
  40. benchmarks/test_encoding_benchmarks.py +0 -99
  41. benchmarks/test_grammar_benchmarks.py +0 -38
  42. benchmarks/test_io_benchmarks.py +0 -99
  43. benchmarks/test_packed_benchmarks.py +0 -41
  44. benchmarks/test_registry_benchmarks.py +0 -45
  45. benchmarks/type_strings.py +0 -26
  46. faster_eth_abi-5.2.15.dist-info/RECORD +0 -58
  47. {faster_eth_abi-5.2.15.dist-info → faster_eth_abi-5.2.16.dist-info}/LICENSE +0 -0
  48. {faster_eth_abi-5.2.15.dist-info → faster_eth_abi-5.2.16.dist-info}/WHEEL +0 -0
@@ -1,99 +0,0 @@
1
- """
2
- Benchmarks for faster_eth_abi.decoding.ContextFramesBytesIO
3
-
4
- This file benchmarks the performance of ContextFramesBytesIO, a subclass of BytesIO
5
- that supports contextual frame management for nested ABI decoding.
6
- """
7
-
8
- import pytest
9
-
10
- import eth_abi.decoding
11
- from pytest_codspeed import (
12
- BenchmarkFixture,
13
- )
14
-
15
- from benchmarks.batch import (
16
- batch,
17
- )
18
- import faster_eth_abi.decoding
19
-
20
- # Test parameters
21
- BUFFER_SIZES = [0, 32, 1024, 4096, 65536]
22
- FRAME_DEPTHS = [1, 5, 10, 50]
23
-
24
-
25
- @pytest.mark.benchmark(group="ContextFramesBytesIO-init")
26
- @pytest.mark.parametrize("size", BUFFER_SIZES)
27
- def test_contextframesbytesio_init(benchmark: BenchmarkFixture, size):
28
- data = b"\x01" * size
29
- benchmark(batch, 1000, eth_abi.decoding.ContextFramesBytesIO, data)
30
-
31
-
32
- @pytest.mark.benchmark(group="ContextFramesBytesIO-init")
33
- @pytest.mark.parametrize("size", BUFFER_SIZES)
34
- def test_faster_contextframesbytesio_init(benchmark: BenchmarkFixture, size):
35
- data = b"\x01" * size
36
- benchmark(batch, 1000, faster_eth_abi.decoding.ContextFramesBytesIO, data)
37
-
38
-
39
- @pytest.mark.benchmark(group="ContextFramesBytesIO-push-pop")
40
- @pytest.mark.parametrize("depth", FRAME_DEPTHS)
41
- def test_contextframesbytesio_push_pop(benchmark: BenchmarkFixture, depth):
42
- data = b"\x01" * 1024
43
- stream = eth_abi.decoding.ContextFramesBytesIO(data)
44
-
45
- def push_pop():
46
- for i in range(depth):
47
- stream.push_frame(i * 10)
48
- for _ in range(depth):
49
- stream.pop_frame()
50
-
51
- benchmark(batch, 100, push_pop)
52
-
53
-
54
- @pytest.mark.benchmark(group="ContextFramesBytesIO-push-pop")
55
- @pytest.mark.parametrize("depth", FRAME_DEPTHS)
56
- def test_faster_contextframesbytesio_push_pop(benchmark: BenchmarkFixture, depth):
57
- data = b"\x01" * 1024
58
- stream = faster_eth_abi.decoding.ContextFramesBytesIO(data)
59
- ints = list(range(depth))
60
-
61
- def push_pop():
62
- for i in ints:
63
- stream.push_frame(i * 10)
64
- for _ in ints:
65
- stream.pop_frame()
66
-
67
- benchmark(batch, 100, push_pop)
68
-
69
-
70
- @pytest.mark.benchmark(group="ContextFramesBytesIO-seek-in-frame")
71
- @pytest.mark.parametrize("depth", FRAME_DEPTHS)
72
- def test_contextframesbytesio_seek_in_frame(benchmark: BenchmarkFixture, depth):
73
- data = b"\x01" * 1024
74
- stream = eth_abi.decoding.ContextFramesBytesIO(data)
75
- # Set up the frame stack before timing
76
- for i in range(depth):
77
- stream.push_frame(i * 10)
78
-
79
- def seek_in_frame_ops():
80
- for i in range(depth):
81
- stream.seek_in_frame(i)
82
-
83
- benchmark(batch, 100, seek_in_frame_ops)
84
-
85
-
86
- @pytest.mark.benchmark(group="ContextFramesBytesIO-seek-in-frame")
87
- @pytest.mark.parametrize("depth", FRAME_DEPTHS)
88
- def test_faster_contextframesbytesio_seek_in_frame(benchmark: BenchmarkFixture, depth):
89
- data = b"\x01" * 1024
90
- stream = faster_eth_abi.decoding.ContextFramesBytesIO(data)
91
- # Set up the frame stack before timing
92
- for i in range(depth):
93
- stream.push_frame(i * 10)
94
-
95
- def seek_in_frame_ops():
96
- for i in range(depth):
97
- stream.seek_in_frame(i)
98
-
99
- benchmark(batch, 100, seek_in_frame_ops)
@@ -1,41 +0,0 @@
1
- import pytest
2
-
3
- import eth_abi.packed
4
- from pytest_codspeed import (
5
- BenchmarkFixture,
6
- )
7
-
8
- from benchmarks.batch import (
9
- batch,
10
- )
11
- from benchmarks.data import (
12
- packed_cases,
13
- packed_ids,
14
- )
15
- import faster_eth_abi.packed
16
-
17
-
18
- # Packed encoding
19
- @pytest.mark.benchmark(group="PackedEncoder")
20
- @pytest.mark.parametrize("abi_type,value", packed_cases, ids=packed_ids)
21
- def test_encode_packed(benchmark: BenchmarkFixture, abi_type, value):
22
- benchmark(batch, 100, eth_abi.packed.encode_packed, [abi_type], [value])
23
-
24
-
25
- @pytest.mark.benchmark(group="PackedEncoder")
26
- @pytest.mark.parametrize("abi_type,value", packed_cases, ids=packed_ids)
27
- def test_faster_encode_packed(benchmark: BenchmarkFixture, abi_type, value):
28
- benchmark(batch, 100, faster_eth_abi.packed.encode_packed, [abi_type], [value])
29
-
30
-
31
- # Packed is_encodable
32
- @pytest.mark.benchmark(group="PackedIsEncodable")
33
- @pytest.mark.parametrize("abi_type,value", packed_cases, ids=packed_ids)
34
- def test_is_encodable_packed(benchmark: BenchmarkFixture, abi_type, value):
35
- benchmark(batch, 100, eth_abi.packed.is_encodable_packed, abi_type, value)
36
-
37
-
38
- @pytest.mark.benchmark(group="PackedIsEncodable")
39
- @pytest.mark.parametrize("abi_type,value", packed_cases, ids=packed_ids)
40
- def test_faster_is_encodable_packed(benchmark: BenchmarkFixture, abi_type, value):
41
- benchmark(batch, 100, faster_eth_abi.packed.is_encodable_packed, abi_type, value)
@@ -1,45 +0,0 @@
1
- import pytest
2
-
3
- from eth_abi.registry import (
4
- registry,
5
- )
6
- from pytest_codspeed import (
7
- BenchmarkFixture,
8
- )
9
-
10
- from benchmarks.batch import (
11
- batch,
12
- )
13
- from benchmarks.type_strings import (
14
- type_strings,
15
- )
16
- from faster_eth_abi.registry import (
17
- registry as faster_registry,
18
- )
19
-
20
-
21
- ITERATIONS = 50_000
22
-
23
-
24
- @pytest.mark.benchmark(group="RegistryGetEncoder")
25
- @pytest.mark.parametrize("type_str", type_strings)
26
- def test_get_encoder(benchmark: BenchmarkFixture, type_str):
27
- benchmark(batch, ITERATIONS, registry.get_encoder, type_str)
28
-
29
-
30
- @pytest.mark.benchmark(group="RegistryGetEncoder")
31
- @pytest.mark.parametrize("type_str", type_strings)
32
- def test_faster_get_encoder(benchmark: BenchmarkFixture, type_str):
33
- benchmark(batch, ITERATIONS, faster_registry.get_encoder, type_str)
34
-
35
-
36
- @pytest.mark.benchmark(group="RegistryGetDecoder")
37
- @pytest.mark.parametrize("type_str", type_strings)
38
- def test_get_decoder(benchmark: BenchmarkFixture, type_str):
39
- benchmark(batch, ITERATIONS, registry.get_decoder, type_str)
40
-
41
-
42
- @pytest.mark.benchmark(group="RegistryGetDecoder")
43
- @pytest.mark.parametrize("type_str", type_strings)
44
- def test_faster_get_decoder(benchmark: BenchmarkFixture, type_str):
45
- benchmark(batch, ITERATIONS, faster_registry.get_decoder, type_str)
@@ -1,26 +0,0 @@
1
- # Shared list of all ABI type strings used in benchmarks
2
-
3
- type_strings = [
4
- "uint256",
5
- "int8",
6
- "address",
7
- "bytes32",
8
- "string",
9
- "bool",
10
- "uint256[2]",
11
- "string[]",
12
- "(uint256,bool)",
13
- "(address,uint8)",
14
- "(string,bytes)",
15
- "(uint256[2],string)",
16
- "(uint8,(bool,string))",
17
- "((uint8,uint8),uint8)",
18
- "(uint8[2],(string,bool[2]))",
19
- "(uint256[],(string[],bool))",
20
- "((uint8[2],(string,bool)),bytes32)",
21
- "(uint8[2][2],(string[2],bool[2]))",
22
- "uint8[]",
23
- "bytes",
24
- "fixed128x18",
25
- "ufixed128x18",
26
- ]
@@ -1,58 +0,0 @@
1
- 29859a9e7da9d19bb98c__mypyc.cpython-38-darwin.so,sha256=Dkk2cMgKn00CtymYvXxiFazrpgxW-OuB1Ey70gqt2tg,693216
2
- faster_eth_abi/_codec.cpython-38-darwin.so,sha256=D9Mn8-vGn9041-TY1SyEB9prfF6VQa9J1k1XA4ANZzI,50536
3
- faster_eth_abi/_encoding.py,sha256=n3POAR1IAjQObaDTY_GyqgQPwmTIC2CT7VuAf5vBvyg,8540
4
- faster_eth_abi/packed.py,sha256=qDPBjish_0h26O7xGWopnlD4pRkphFuFq4izgIqT600,301
5
- faster_eth_abi/encoding.py,sha256=3-MNnZ7PUNZXUbu-HrmM_PDSVfAEZcdmrbMu8GHqYMQ,19685
6
- faster_eth_abi/abi.cpython-38-darwin.so,sha256=jyOgZE0WnP_IrtlpcY27d7darAThAQf2YdIwt76reps,50536
7
- faster_eth_abi/packed.cpython-38-darwin.so,sha256=i1eMZ8fevE0-d3ylz0_ffN-vbFrf0OqzR5SK3Qi-_jY,50536
8
- faster_eth_abi/from_type_str.cpython-38-darwin.so,sha256=JpYNm007j7tvegGp7gbxjh9hn25YEoX9YlBZP9JKsts,50576
9
- faster_eth_abi/registry.py,sha256=HmspZBvwUrkeVjecCOQJUjXkYP5aDAGbkCx1CzASppk,21554
10
- faster_eth_abi/_decoding.py,sha256=WbFy1GxPYGHduUNCjiTz4gLbNuDffbbJ6MFujjINTpw,9613
11
- faster_eth_abi/constants.py,sha256=uJbuND1rFs_Pexuz58TKd-BJPuoA6hLqFEX6kkDS-dE,107
12
- faster_eth_abi/io.py,sha256=PjOnBChWh_-6ADkpJQONnxHVwsAfC_4bRiT6YQhlP6c,3728
13
- faster_eth_abi/__init__.py,sha256=55jGpiVbsTGNu-c_rr-wwyH3eqEv9MELSTWa4AMiKvU,205
14
- faster_eth_abi/_grammar.py,sha256=e-t-f_v0BssDnma3yD-FpVR3IHdp-5vK1L-0s9vodKk,10315
15
- faster_eth_abi/decoding.py,sha256=vBrGAol7NC_7iA3j4V_rwtLwo2hzK1b60-o559iuHls,16227
16
- faster_eth_abi/grammar.py,sha256=JJ7QLGJVKmoWwx3J8O-5snrza-Si4NdCweUummqzjlo,4511
17
- faster_eth_abi/from_type_str.py,sha256=C3QNACXS-5lTtOx1kNAqfZLvky37wV7gqY3Cf9QoEkk,4337
18
- faster_eth_abi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- faster_eth_abi/abi.py,sha256=HzkXy0EjHraNbbC5l-EhVqVcx5vy8tcykiKIO4Fp1xw,366
20
- faster_eth_abi/_decoding.cpython-38-darwin.so,sha256=ve3qN8gEUEjjRkXd5J7Ok4wKQ-N5GxcyTsn4Czo8Wvw,50560
21
- faster_eth_abi/exceptions.py,sha256=pbwvH_WeAlSlwqA8w79e_RCt8_uaasLcGtRY7yT9LTQ,3577
22
- faster_eth_abi/_codec.py,sha256=qcK1Mfy_6tO48srobl-WyBBIkEFzwpMQrdGQ8H5TH-o,2271
23
- faster_eth_abi/_grammar.cpython-38-darwin.so,sha256=CdseD9oC27lwQBTFxk8IIIO1K5FE6spaJepkuFyrgBs,50560
24
- faster_eth_abi/constants.cpython-38-darwin.so,sha256=MglGkCrv6uMo06rH2mMrQYxr_mte0nA7NqFM4Ro4wTw,50560
25
- faster_eth_abi/typing.py,sha256=muZI3t_mw2awfy2JWa4XT2zFIqko03Z_P8s6rkWvu0g,103723
26
- faster_eth_abi/codec.py,sha256=d1swlSK3m3_yn3vmzb08esOohJcDxDvoHnmP1SQKlpk,39712
27
- faster_eth_abi/_encoding.cpython-38-darwin.so,sha256=vgNogDAG1OI1tmwqw2DJ6w-COPp5UIHzBUqZrIVgFPA,50560
28
- faster_eth_abi/base.py,sha256=eMpUM78FhJg5wHPj6glvJRpS1AmvQ_1ks9ENwyu68hc,1188
29
- faster_eth_abi/tools/__init__.cpython-38-darwin.so,sha256=9Ik1pqZ2NivUZlp27R6rYX_uaCKaqZc1zKaej3cLQv0,50544
30
- faster_eth_abi/tools/_strategies.py,sha256=XQhK8eG87W7LB5v6ibzEAB0BkhTr-oc7dIzPvZu6AE0,6089
31
- faster_eth_abi/tools/__init__.py,sha256=trtATEmgu4ctg04qkejbODDzvDSofgcVJ3rkzMP_hQE,51
32
- faster_eth_abi/tools/_strategies.cpython-38-darwin.so,sha256=hI3cP3DrJ7RosV7PDhXHvwdHtXSvGEZpxuwltIljC_8,50592
33
- faster_eth_abi/utils/__init__.cpython-38-darwin.so,sha256=_00GzeldT9VKnDyY-7tzSMJRh8U9wn8kXf6zG9RdjSI,50544
34
- faster_eth_abi/utils/validation.cpython-38-darwin.so,sha256=cI1OgVG22luZA-Hh6utPvNHcXRhRdpC6U5zJDPehCNg,50576
35
- faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- faster_eth_abi/utils/padding.cpython-38-darwin.so,sha256=rgo3FLN0KOCLA89-XZVYDNVLj8PDWixJBDvO-zn8f0w,50560
37
- faster_eth_abi/utils/numeric.py,sha256=fkdazLcgd7FN0JGSSyb6Jsx555QdgRf2N0mxrm6rGB4,3278
38
- faster_eth_abi/utils/string.cpython-38-darwin.so,sha256=SdhTzA2t9C0DukHBYpu6FNNOcYI0cZJawfiPKfFmEP4,50552
39
- faster_eth_abi/utils/numeric.cpython-38-darwin.so,sha256=-IgGotoD7Dl0HiXV0LMYW5mW3uRrWcEC23Pu0Va0VQE,50560
40
- faster_eth_abi/utils/string.py,sha256=fjsAR2C7Xlu5bHomxx5l4rlADFtByzGTQfugMTo8TQk,436
41
- faster_eth_abi/utils/padding.py,sha256=JBuFhdrvKWLrmmJBZ-a6pqbHWydAuiUBt2aBjCwVcVE,493
42
- faster_eth_abi/utils/validation.py,sha256=NA2wRacYEBdkpQnZfmeDvzF-sHyy6NT2QzCFuBnYJVI,521
43
- benchmarks/test_registry_benchmarks.py,sha256=RQTkFsOk9pIDPd84bZqm3mfBuKSYhuQCCmSblYDzFOE,1262
44
- benchmarks/type_strings.py,sha256=tC12IvA5TbJFQDvydi1lCxnCHUxWurBW69xLG9Xjywc,566
45
- benchmarks/batch.py,sha256=8MkG1hAxZerEnPTtrESUAWXB6C-iNnCMQ5yJMz3HDIM,199
46
- benchmarks/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
47
- benchmarks/test_grammar_benchmarks.py,sha256=faL_y_fmdvEeULTmLj88OWEj4e1mAdzuZTYkLF47ZAA,1129
48
- benchmarks/test_packed_benchmarks.py,sha256=KHi8aEKKWZw4lNNrpJtdr6l2cjI5RecyA8w4gJhDmm4,1395
49
- benchmarks/test_abi_benchmarks.py,sha256=tTwhKGizr7hIu-QV-A1PAN-n3Bk8LnfaY3Dv5-dE3E0,2497
50
- benchmarks/test_io_benchmarks.py,sha256=SkBGL0FijyVefSlL1VTQIaD1b2oruWjdo6WAck8rpQY,3065
51
- benchmarks/test_encoding_benchmarks.py,sha256=sfVncm7BGIV0k_byD8HCjuwc8oGx4-KLnx8Jk8_9uD0,3212
52
- benchmarks/data.py,sha256=YeU6gxSF2_XFVnwy7N2CuEiqiS8AFrc4ZQ4B3Z0HRw4,9205
53
- benchmarks/test_decoding_benchmarks.py,sha256=MVZ4lN1V8OTvO-957joBBOgkHnsfSghF3d_GiBeEh1E,3904
54
- faster_eth_abi-5.2.15.dist-info/RECORD,,
55
- faster_eth_abi-5.2.15.dist-info/LICENSE,sha256=P_zrhVa0OXK-_XuA0RF3d3gwMLXRSBkn2fWraC4CFLo,1106
56
- faster_eth_abi-5.2.15.dist-info/WHEEL,sha256=9FabR3Kab7Nb3lO5nBQWtZc544XJ0hYCmiQC2RH2bHM,107
57
- faster_eth_abi-5.2.15.dist-info/top_level.txt,sha256=utY1QAB2ZlDnuEgQjydbGaBGXDRudjYvq61Wog-MIWI,54
58
- faster_eth_abi-5.2.15.dist-info/METADATA,sha256=2n_HdYKPntwvb5kNiDcLmUzx5NXzgbPJyuUEICJdCoo,6701