faster-eth-abi 5.2.15__cp310-cp310-macosx_11_0_arm64.whl → 5.2.16__cp310-cp310-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. faster_eth_abi/_codec.cpython-310-darwin.so +0 -0
  2. faster_eth_abi/_codec.py +6 -0
  3. faster_eth_abi/_decoding.cpython-310-darwin.so +0 -0
  4. faster_eth_abi/_decoding.py +28 -15
  5. faster_eth_abi/_encoding.cpython-310-darwin.so +0 -0
  6. faster_eth_abi/_encoding.py +7 -1
  7. faster_eth_abi/_grammar.cpython-310-darwin.so +0 -0
  8. faster_eth_abi/_grammar.py +5 -0
  9. faster_eth_abi/abi.cpython-310-darwin.so +0 -0
  10. faster_eth_abi/base.py +4 -0
  11. faster_eth_abi/codec.py +1261 -144
  12. faster_eth_abi/constants.cpython-310-darwin.so +0 -0
  13. faster_eth_abi/decoding.py +91 -47
  14. faster_eth_abi/encoding.py +51 -3
  15. faster_eth_abi/exceptions.py +5 -2
  16. faster_eth_abi/from_type_str.cpython-310-darwin.so +0 -0
  17. faster_eth_abi/from_type_str.py +4 -0
  18. faster_eth_abi/grammar.py +17 -19
  19. faster_eth_abi/io.py +4 -0
  20. faster_eth_abi/packed.cpython-310-darwin.so +0 -0
  21. faster_eth_abi/packed.py +4 -0
  22. faster_eth_abi/registry.py +98 -33
  23. faster_eth_abi/tools/__init__.cpython-310-darwin.so +0 -0
  24. faster_eth_abi/tools/_strategies.cpython-310-darwin.so +0 -0
  25. faster_eth_abi/typing.py +94 -10
  26. faster_eth_abi/utils/__init__.cpython-310-darwin.so +0 -0
  27. faster_eth_abi/utils/numeric.cpython-310-darwin.so +0 -0
  28. faster_eth_abi/utils/padding.cpython-310-darwin.so +0 -0
  29. faster_eth_abi/utils/string.cpython-310-darwin.so +0 -0
  30. faster_eth_abi/utils/validation.cpython-310-darwin.so +0 -0
  31. {faster_eth_abi-5.2.15.dist-info → faster_eth_abi-5.2.16.dist-info}/METADATA +13 -8
  32. faster_eth_abi-5.2.16.dist-info/RECORD +47 -0
  33. {faster_eth_abi-5.2.15.dist-info → faster_eth_abi-5.2.16.dist-info}/top_level.txt +0 -1
  34. faster_eth_abi__mypyc.cpython-310-darwin.so +0 -0
  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}/WHEEL +0 -0
  48. {faster_eth_abi-5.2.15.dist-info → faster_eth_abi-5.2.16.dist-info}/licenses/LICENSE +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
- faster_eth_abi__mypyc.cpython-310-darwin.so,sha256=jPVcjNMRdZDkZloYIaHl8AWK_qeCpegCZXljOoFu4GY,697400
2
- faster_eth_abi/_encoding.py,sha256=n3POAR1IAjQObaDTY_GyqgQPwmTIC2CT7VuAf5vBvyg,8540
3
- faster_eth_abi/packed.py,sha256=qDPBjish_0h26O7xGWopnlD4pRkphFuFq4izgIqT600,301
4
- faster_eth_abi/encoding.py,sha256=3-MNnZ7PUNZXUbu-HrmM_PDSVfAEZcdmrbMu8GHqYMQ,19685
5
- faster_eth_abi/_decoding.cpython-310-darwin.so,sha256=6haEY4SaJsR0-j7lfxh4dx2_yyCqCVtrJIN6on7K4Cw,50656
6
- faster_eth_abi/packed.cpython-310-darwin.so,sha256=-Acg4RaRvYY3getXotTehSxagT9OQMLa1FC-f5ZvBII,50640
7
- faster_eth_abi/registry.py,sha256=HmspZBvwUrkeVjecCOQJUjXkYP5aDAGbkCx1CzASppk,21554
8
- faster_eth_abi/_decoding.py,sha256=WbFy1GxPYGHduUNCjiTz4gLbNuDffbbJ6MFujjINTpw,9613
9
- faster_eth_abi/constants.py,sha256=uJbuND1rFs_Pexuz58TKd-BJPuoA6hLqFEX6kkDS-dE,107
10
- faster_eth_abi/io.py,sha256=PjOnBChWh_-6ADkpJQONnxHVwsAfC_4bRiT6YQhlP6c,3728
11
- faster_eth_abi/from_type_str.cpython-310-darwin.so,sha256=e8gUcOWVDsEP6mULAMbrk6TygJ7J52UVY1nSJ_1-pkw,50672
12
- faster_eth_abi/__init__.py,sha256=55jGpiVbsTGNu-c_rr-wwyH3eqEv9MELSTWa4AMiKvU,205
13
- faster_eth_abi/_grammar.py,sha256=e-t-f_v0BssDnma3yD-FpVR3IHdp-5vK1L-0s9vodKk,10315
14
- faster_eth_abi/decoding.py,sha256=vBrGAol7NC_7iA3j4V_rwtLwo2hzK1b60-o559iuHls,16227
15
- faster_eth_abi/grammar.py,sha256=JJ7QLGJVKmoWwx3J8O-5snrza-Si4NdCweUummqzjlo,4511
16
- faster_eth_abi/from_type_str.py,sha256=C3QNACXS-5lTtOx1kNAqfZLvky37wV7gqY3Cf9QoEkk,4337
17
- faster_eth_abi/_encoding.cpython-310-darwin.so,sha256=qTxfQWSM3VANFyw1s2ag7WieG71XLXAoYUYPKrTJGeQ,50656
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/exceptions.py,sha256=pbwvH_WeAlSlwqA8w79e_RCt8_uaasLcGtRY7yT9LTQ,3577
21
- faster_eth_abi/_codec.py,sha256=qcK1Mfy_6tO48srobl-WyBBIkEFzwpMQrdGQ8H5TH-o,2271
22
- faster_eth_abi/constants.cpython-310-darwin.so,sha256=_A_VZ6bDyrY9tIZh4jY-gxmVv_610tPiGrsIGIcb7ao,50656
23
- faster_eth_abi/abi.cpython-310-darwin.so,sha256=XHtAmO5Kcd3_em60fMrIpXo3_KkoQL85oU8enugOGa4,50632
24
- faster_eth_abi/_codec.cpython-310-darwin.so,sha256=yV5Ckeyn6-3laY-vObi-bSK7Yo_ZeP-EhbZC-bXVVmY,50640
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/base.py,sha256=eMpUM78FhJg5wHPj6glvJRpS1AmvQ_1ks9ENwyu68hc,1188
28
- faster_eth_abi/_grammar.cpython-310-darwin.so,sha256=cqTWDuKiPaNBqyvFpAWBEVHjoFuXYDY3p8fa85oOc74,50656
29
- faster_eth_abi/tools/_strategies.cpython-310-darwin.so,sha256=1QmyEMEM5F-aN7W2liFhbhHn016AhOWoP3-VStI20yE,50672
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/__init__.cpython-310-darwin.so,sha256=Qqy8f-RP54h8ARAg0dYHnwzsUy5U-uoP8D8_yP-xj3c,50640
33
- faster_eth_abi/utils/string.cpython-310-darwin.so,sha256=7_C0R6jtWHwHIl-b2v8zyXJp_wnUCoG10CGSjungw9A,50656
34
- faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- faster_eth_abi/utils/__init__.cpython-310-darwin.so,sha256=jU8b1DYZJ9F8kidtqQ645wJmNWPzHWAL2TfXXp7NT7g,50640
36
- faster_eth_abi/utils/numeric.cpython-310-darwin.so,sha256=6hc4YCXXSCWhoG283bEEdtarmDEqqPTbd_ibzHDOIfk,50656
37
- faster_eth_abi/utils/numeric.py,sha256=fkdazLcgd7FN0JGSSyb6Jsx555QdgRf2N0mxrm6rGB4,3278
38
- faster_eth_abi/utils/padding.cpython-310-darwin.so,sha256=fGWSJnWzdYkqV1-RaYby25SQje4pdZ-6z_jO4WdEXEA,50656
39
- faster_eth_abi/utils/validation.cpython-310-darwin.so,sha256=9qNW20EIeTJaVixk8dOEhOvK313IIm5EdmmD_NkSuWU,50672
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/WHEEL,sha256=11kMdE9gzbsaQG30fRcsAYxBLEVRsqJo098Y5iL60Xo,136
56
- faster_eth_abi-5.2.15.dist-info/top_level.txt,sha256=z3gorxabz8D2eg5A3YX2M3p3JMFRLLX3DRp0jAwNZOY,48
57
- faster_eth_abi-5.2.15.dist-info/METADATA,sha256=0g5FmP2D2ZG45S9T-6zh9zMJdBTDsq8lgz1O_QiOgsA,7000
58
- faster_eth_abi-5.2.15.dist-info/licenses/LICENSE,sha256=P_zrhVa0OXK-_XuA0RF3d3gwMLXRSBkn2fWraC4CFLo,1106