web3 7.0.0b8__py3-none-any.whl → 7.0.0b9__py3-none-any.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.
- ens/async_ens.py +16 -7
- ens/base_ens.py +3 -1
- ens/exceptions.py +2 -7
- ens/utils.py +0 -17
- web3/_utils/abi.py +100 -257
- web3/_utils/compat/__init__.py +1 -0
- web3/_utils/contracts.py +116 -205
- web3/_utils/encoding.py +4 -5
- web3/_utils/events.py +28 -33
- web3/_utils/fee_utils.py +2 -2
- web3/_utils/filters.py +2 -5
- web3/_utils/http_session_manager.py +30 -7
- web3/_utils/method_formatters.py +3 -3
- web3/_utils/module_testing/eth_module.py +59 -37
- web3/_utils/module_testing/module_testing_utils.py +43 -1
- web3/_utils/module_testing/persistent_connection_provider.py +2 -0
- web3/_utils/module_testing/web3_module.py +8 -8
- web3/_utils/normalizers.py +10 -8
- web3/_utils/validation.py +5 -7
- web3/contract/async_contract.py +18 -17
- web3/contract/base_contract.py +116 -80
- web3/contract/contract.py +16 -17
- web3/contract/utils.py +86 -55
- web3/eth/async_eth.py +1 -2
- web3/eth/eth.py +1 -2
- web3/exceptions.py +22 -9
- web3/gas_strategies/time_based.py +4 -0
- web3/manager.py +34 -12
- web3/middleware/filter.py +3 -3
- web3/middleware/signing.py +6 -1
- web3/types.py +5 -45
- web3/utils/__init__.py +48 -4
- web3/utils/abi.py +575 -10
- {web3-7.0.0b8.dist-info → web3-7.0.0b9.dist-info}/METADATA +7 -5
- {web3-7.0.0b8.dist-info → web3-7.0.0b9.dist-info}/RECORD +39 -44
- {web3-7.0.0b8.dist-info → web3-7.0.0b9.dist-info}/WHEEL +1 -1
- web3/tools/benchmark/__init__.py +0 -0
- web3/tools/benchmark/main.py +0 -190
- web3/tools/benchmark/node.py +0 -120
- web3/tools/benchmark/reporting.py +0 -39
- web3/tools/benchmark/utils.py +0 -69
- /web3/_utils/{function_identifiers.py → abi_element_identifiers.py} +0 -0
- {web3-7.0.0b8.dist-info → web3-7.0.0b9.dist-info}/LICENSE +0 -0
- {web3-7.0.0b8.dist-info → web3-7.0.0b9.dist-info}/top_level.txt +0 -0
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
ens/__init__.py,sha256=BtOyGF_JrIpWFTr_T1GCJuUtmZI-Qf-v560uzTWp18E,471
|
|
2
2
|
ens/_normalization.py,sha256=U1CbJhX6R1kYPPlYq4IampbSuql97J6tcq3xnIwmpEs,16786
|
|
3
3
|
ens/abis.py,sha256=0Ec_lqe7HBsVpQrID3ccFMhx8Vb7S0TGFbeuRdXhuCE,34745
|
|
4
|
-
ens/async_ens.py,sha256=
|
|
4
|
+
ens/async_ens.py,sha256=o-1m6dMC9Wcq9lXxJJ2UzcJZpMTeNBD82dnpvUFja3k,22669
|
|
5
5
|
ens/auto.py,sha256=w_E6Ua5ZmJVxfdii2aG5I_kQG5B9U5Y2qIFKVNhXo98,41
|
|
6
|
-
ens/base_ens.py,sha256=
|
|
6
|
+
ens/base_ens.py,sha256=zn3lIV5-vkBEvdOAIVkE78wwTdJx7VG_fXqQmLJ_j7w,3507
|
|
7
7
|
ens/constants.py,sha256=XCO4Pntwdnw10K_AZ86V0cqcvdUoOkEZvRqoDdFPE_w,913
|
|
8
8
|
ens/contract_data.py,sha256=CZa7Uxzq6rT-KonwHHM_wo-5ry0j1DMbikgEaP27Uy8,148602
|
|
9
9
|
ens/ens.py,sha256=4LLQ_XDHhlPlG0-RGAErGZ9ltybg4yKyftdW84AeldE,21718
|
|
10
|
-
ens/exceptions.py,sha256=
|
|
11
|
-
ens/utils.py,sha256=
|
|
10
|
+
ens/exceptions.py,sha256=FVnGiWkt1IcAATfSxoWz9hwrlVG_-WCpraTo8nSHCxA,2441
|
|
11
|
+
ens/utils.py,sha256=Ro2-kcowwIgNExxNDQ1CpSFiGL9WSP_NCxp_qLzGWHw,8985
|
|
12
12
|
ens/specs/nf.json,sha256=kGZcTE_UxTl3WZwMUP6m8KbQQOKdw7PWzmuW7ewQSUs,48403
|
|
13
13
|
ens/specs/normalization_spec.json,sha256=xn3N9a-6KHMLu3MeCBsmOxSzIzUQykzE9EscKK1a3w8,3115334
|
|
14
14
|
web3/__init__.py,sha256=P11QAEV_GYoZq9ij8gDzFx5tKzJY2aMXG-keg2Lg1xs,1277
|
|
15
15
|
web3/constants.py,sha256=eQLRQVMFPbgpOjjkPTMHkY-syncJuO-sPX5UrCSRjzQ,564
|
|
16
16
|
web3/datastructures.py,sha256=Yc45cXgoXvhV0HPvnmkFFOEVDtLr-Pftc_f5q-uQY1M,10939
|
|
17
|
-
web3/exceptions.py,sha256=
|
|
17
|
+
web3/exceptions.py,sha256=5Yc-tUdmcnwGv1dxg45iD3Tor3IKMfedA9U_xZ4AR3M,9081
|
|
18
18
|
web3/geth.py,sha256=IQYeqiVSqcskuXWgDR35UBuVsD-whhvTpDltO4vvCvE,5867
|
|
19
19
|
web3/logs.py,sha256=ROs-mDMH_ZOecE7hfbWA5yp27G38FbLjX4lO_WtlZxQ,198
|
|
20
20
|
web3/main.py,sha256=AFAV0Y_zIjo9ZuAlQTEMbUPN5iGyHRpS8mS-wFkw8-E,14350
|
|
21
|
-
web3/manager.py,sha256=
|
|
21
|
+
web3/manager.py,sha256=_3Ox2IdGh0iOCGF7e2NFK3-kp3esZ-KUkZDrNTNFLqY,22905
|
|
22
22
|
web3/method.py,sha256=Uv29Vng93VC5-HHeRok30PUbGCg42SNA2YsxiweTgWA,8593
|
|
23
23
|
web3/module.py,sha256=rz_cqGNlzLGCHLE8zDf-hW4SpDfLgzVEW8pgDxM45Y0,6006
|
|
24
24
|
web3/net.py,sha256=Y3vPzHWVFkfHEZoJxjDOt4tp5ERmZrMuyi4ZFOLmIeA,1562
|
|
25
25
|
web3/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
web3/testing.py,sha256=Ury_-7XSstJ8bkCfdGEi4Cr76QzSfW7v_zfPlDlLJj0,923
|
|
27
27
|
web3/tracing.py,sha256=ZcOam7t-uEZXyui6Cndv6RYeCZP5jh1TBn2hG8sv17Q,3098
|
|
28
|
-
web3/types.py,sha256=
|
|
28
|
+
web3/types.py,sha256=u_GhL4B5VVyhAydizlOG8GWf1PL_EMnadme-L1HpS2E,11922
|
|
29
29
|
web3/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
web3/_utils/abi.py,sha256=
|
|
30
|
+
web3/_utils/abi.py,sha256=6-k4oKesmJ74ZXwH1yKg-zW6UjieUgnXuWK0gzGSC6U,25674
|
|
31
|
+
web3/_utils/abi_element_identifiers.py,sha256=m305lsvUZk-jkPixT0IJd9P5sXqMvmwlwlLeBgEAnBQ,55
|
|
31
32
|
web3/_utils/async_caching.py,sha256=2XnaKCHBTTDK6B2R_YZvjJqIRUpbMDIU1uYrq-Lcyp8,486
|
|
32
33
|
web3/_utils/async_transactions.py,sha256=C2P1B9F15S0apvqhYCrvx5bU8HA7HTPVJIDsgtHLRno,5225
|
|
33
34
|
web3/_utils/batching.py,sha256=SbFKYFCRTrkFMFNa4HA4DkD_Qbjc6atnebMObyuQeHE,6316
|
|
34
35
|
web3/_utils/blocks.py,sha256=SZ17qSJuPAH5Dz-eQPGOsZw_QtkG19zvpSYMv6mEDok,2138
|
|
35
36
|
web3/_utils/caching.py,sha256=-9jyR33wBWrWGp1S7LFvovDQblLLYr8Kz7oujnJwhqA,5406
|
|
36
|
-
web3/_utils/contracts.py,sha256=
|
|
37
|
+
web3/_utils/contracts.py,sha256=HKYJKJedf8eO5az-YVybrqfw0K1__9Da5QyLVfqSPVE,10994
|
|
37
38
|
web3/_utils/datatypes.py,sha256=nI0C9XWl46gFj1RpwuoHfVqb4e73wlaerE1LNyMg3oo,1701
|
|
38
39
|
web3/_utils/decorators.py,sha256=bYIoVL0DjHWU2-KOmg-UYg6rICeThlLVZpH9yM2NT8s,1825
|
|
39
40
|
web3/_utils/empty.py,sha256=ccgxFk5qm2x2ZeD8b17wX5cCAJPkPFuHrNQNMDslytY,132
|
|
40
|
-
web3/_utils/encoding.py,sha256=
|
|
41
|
+
web3/_utils/encoding.py,sha256=yS3awPQshfqMqEgiZWWU2AG8Kq_mrCH9VwHvlMhrGw4,9282
|
|
41
42
|
web3/_utils/ens.py,sha256=2BvzfegBkR7vH3Fq7lo_LsgfT912Zj-mR8eUt6o_lBA,2434
|
|
42
43
|
web3/_utils/error_formatters_utils.py,sha256=uRXm6P6z4cUTTlQRLFLtuC3FYOjR0lrIlQToR5f_gzI,6868
|
|
43
|
-
web3/_utils/events.py,sha256=
|
|
44
|
-
web3/_utils/fee_utils.py,sha256=
|
|
45
|
-
web3/_utils/filters.py,sha256=
|
|
44
|
+
web3/_utils/events.py,sha256=sVAXWUMmWKwYguWzk_jqra3rI6NZ55T3XfDp4_aDa-8,17044
|
|
45
|
+
web3/_utils/fee_utils.py,sha256=MFt27R9E3qFP-Hf87-Lzv0JAiuYRE_qqafyTmzctAYA,2145
|
|
46
|
+
web3/_utils/filters.py,sha256=1WX2Vgmat8QKj0WNm_GoRcVp4iJ0BhaIpM_RbcZlBzs,11860
|
|
46
47
|
web3/_utils/formatters.py,sha256=RfRZU0aXC99s6OoLMY7D-fcYJyVAYBEwdbw-JIDjbZE,3067
|
|
47
|
-
web3/_utils/function_identifiers.py,sha256=m305lsvUZk-jkPixT0IJd9P5sXqMvmwlwlLeBgEAnBQ,55
|
|
48
48
|
web3/_utils/http.py,sha256=NNcbf_K814Ggpt0YiGTWjV3CCUrLkpZpQDru4f-3C9E,235
|
|
49
|
-
web3/_utils/http_session_manager.py,sha256=
|
|
49
|
+
web3/_utils/http_session_manager.py,sha256=Q5K9qJVOAjpO6490McC5kdO4lgjt-c-zxkp0kyDY2pI,11520
|
|
50
50
|
web3/_utils/hypothesis.py,sha256=4Cm4iOWv-uP9irg_Pv63kYNDYUAGhnUH6fOPWRw3A0g,209
|
|
51
51
|
web3/_utils/math.py,sha256=4oU5YdbQBXElxK00CxmUZ94ApXFu9QT_TrO0Kho1HTs,1083
|
|
52
|
-
web3/_utils/method_formatters.py,sha256=
|
|
52
|
+
web3/_utils/method_formatters.py,sha256=tbCGX2JcU_8FEZ0Fjk5BrtgV949nsJ4TKZ938clglSI,34169
|
|
53
53
|
web3/_utils/module.py,sha256=GuVePloTlIBZwFDOjg0zasp53HSJ32umxN1nQhqW-8Y,3175
|
|
54
|
-
web3/_utils/normalizers.py,sha256=
|
|
54
|
+
web3/_utils/normalizers.py,sha256=uOaGGgkFXTa5gg6mHgPhP8n035WYpo96xtrvpRPnfNk,7455
|
|
55
55
|
web3/_utils/rpc_abi.py,sha256=ey3rw3j2jC9ybs1FZpyCPReA0Mra7TwRX1a7GTtOPeE,8392
|
|
56
56
|
web3/_utils/threads.py,sha256=hNlSd_zheQYN0vC1faWWb9_UQxp_UzaM2fI5C8y0kB0,4245
|
|
57
57
|
web3/_utils/transactions.py,sha256=eGnFlVtzvlcDsF8-Gnbai4rjVP9iWpQ5CaAx6Ml9K8g,8912
|
|
58
58
|
web3/_utils/type_conversion.py,sha256=s6cg3WDCQIarQLWw_GfctaJjXhS_EcokUNO-S_ccvng,873
|
|
59
59
|
web3/_utils/utility_methods.py,sha256=7VCpo5ysvPoGjFuDj5gT1Niva2l3BADUvNeJFlL3Yvg,2559
|
|
60
|
-
web3/_utils/validation.py,sha256=
|
|
60
|
+
web3/_utils/validation.py,sha256=TYfkiOIT37zvRy1PqvP9lvbdfLmn1HvlBbHvrFifx1A,6351
|
|
61
61
|
web3/_utils/windows.py,sha256=IlFUtqYSbUUfFRx60zvEwpiZd080WpOrA4ojm4tmSEE,994
|
|
62
|
-
web3/_utils/compat/__init__.py,sha256=
|
|
62
|
+
web3/_utils/compat/__init__.py,sha256=RUD0S8wzEv2a9o1UhJD0SIECjzatjJl7vc6RCM2d1Fs,571
|
|
63
63
|
web3/_utils/contract_sources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
web3/_utils/contract_sources/compile_contracts.py,sha256=C3eLY6gJ4xj9FunNwn4YPb9c8ElORkN8O4ddBa_kKqI,6486
|
|
65
65
|
web3/_utils/contract_sources/contract_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -86,14 +86,14 @@ web3/_utils/contract_sources/contract_data/storage_contract.py,sha256=vP1Qaekjld
|
|
|
86
86
|
web3/_utils/contract_sources/contract_data/string_contract.py,sha256=y6EFnum4zDrrRUmuXExCGr2bhZMrerbMiqJiamUU2Tw,11210
|
|
87
87
|
web3/_utils/contract_sources/contract_data/tuple_contracts.py,sha256=QuqPfv3BxjqDjeLScnxJDEPtPZMAB4jwHxsAOeVd6kk,23176
|
|
88
88
|
web3/_utils/module_testing/__init__.py,sha256=tPFAaX7xOR50CPTq24UeY-1CX1LQxxmEOPr0-tIRkoE,376
|
|
89
|
-
web3/_utils/module_testing/eth_module.py,sha256=
|
|
89
|
+
web3/_utils/module_testing/eth_module.py,sha256=gX-7yDry-fcz1UtOI3_DQQKFSnwrA1dKuBaEJTGdjrE,186255
|
|
90
90
|
web3/_utils/module_testing/go_ethereum_admin_module.py,sha256=_c-6SyzZkfAJ-7ySXUpw9FEr4cg-ShRdAGSAHWanCtY,3406
|
|
91
91
|
web3/_utils/module_testing/go_ethereum_txpool_module.py,sha256=5f8XL8-2x3keyGRaITxMQYl9oQzjgqGn8zobB-j9BPs,1176
|
|
92
|
-
web3/_utils/module_testing/module_testing_utils.py,sha256=
|
|
92
|
+
web3/_utils/module_testing/module_testing_utils.py,sha256=koDvLoR5q8wFOz_8o9oRpEpjbuvU8cUbBe1PM39LjG0,7304
|
|
93
93
|
web3/_utils/module_testing/net_module.py,sha256=ifUTC-5fTcQbwpm0X09OdD5RSPnn00T8klFeYe8tTm4,1272
|
|
94
|
-
web3/_utils/module_testing/persistent_connection_provider.py,sha256=
|
|
94
|
+
web3/_utils/module_testing/persistent_connection_provider.py,sha256=SPj5PKS9_1OncT2_Zx8x75Xj2hl22r4ciKqqsjxoS1w,17885
|
|
95
95
|
web3/_utils/module_testing/utils.py,sha256=7jYtIKfOdrQnj1pDB0gLyoN_b8U3ZyEYbMU4dxaLljs,10023
|
|
96
|
-
web3/_utils/module_testing/web3_module.py,sha256=
|
|
96
|
+
web3/_utils/module_testing/web3_module.py,sha256=7c6penGbHn381fPTYY6DsXKv56xGQpYkHljOsr2gbaw,25413
|
|
97
97
|
web3/auto/__init__.py,sha256=ZbzAiCZMdt_tCTTPvH6t8NCVNroKKkt7TSVBBNR74Is,44
|
|
98
98
|
web3/auto/gethdev.py,sha256=MuWD2gxv0xDv_SzPsp9mSkS1oG4P54xFK83qw9NvswA,438
|
|
99
99
|
web3/beacon/__init__.py,sha256=Ac6YiNgU8D8Ynnh5RwSCx2NwPyjnpFjpXeHuSssFbaU,113
|
|
@@ -101,28 +101,28 @@ web3/beacon/api_endpoints.py,sha256=dkekSCmkat5QIfwKzwm49CyVcRb-pIbn1nZHB4F8M0U,
|
|
|
101
101
|
web3/beacon/async_beacon.py,sha256=5PErS2VjhNj-GPg3WKxxJv02ZZWyu3m46sWjGMpi33A,7602
|
|
102
102
|
web3/beacon/beacon.py,sha256=NT4ebD53uesPj8I0CpqkBJ_U-o2_QFLRVM7tNnlVY0Q,6758
|
|
103
103
|
web3/contract/__init__.py,sha256=qeZRtTw9xriwoD82w6vePDuPBZ35-CMVdkzViBSH3Qs,293
|
|
104
|
-
web3/contract/async_contract.py,sha256=
|
|
105
|
-
web3/contract/base_contract.py,sha256=
|
|
106
|
-
web3/contract/contract.py,sha256=
|
|
107
|
-
web3/contract/utils.py,sha256=
|
|
104
|
+
web3/contract/async_contract.py,sha256=dkYeb4G9qwgSzL6cG0Bzjz915bqVzPCbkViSf0OKAg0,20545
|
|
105
|
+
web3/contract/base_contract.py,sha256=qfYzMC-PlefkAQVGplXwdYi5I37DwEe5Slbp5-oOc6U,38053
|
|
106
|
+
web3/contract/contract.py,sha256=BO0Xm6sUo_PxhgUxe6fT1Qh3jR61ZiniTVeZjFGJ05c,20124
|
|
107
|
+
web3/contract/utils.py,sha256=bonHXESnb9xhvMzJoi271qppwpy2D6yaHtUwt56wEJc,17853
|
|
108
108
|
web3/eth/__init__.py,sha256=qDLxOcHHIzzPD7xzwy6Wcs0lLPQieB7WN0Ax25ctit8,197
|
|
109
|
-
web3/eth/async_eth.py,sha256=
|
|
109
|
+
web3/eth/async_eth.py,sha256=elPH3Atkayk3afwepDRP3ibB7EK8MziK0fPikpKCLxI,23176
|
|
110
110
|
web3/eth/base_eth.py,sha256=UUH0Fw0HVa_mBEQ_CbCDO01yCVDsj33d8yOv7Oe-QD0,6905
|
|
111
|
-
web3/eth/eth.py,sha256=
|
|
111
|
+
web3/eth/eth.py,sha256=6IL3VecOGvKKbRLvr_hBx8gpWPEf-fZHrRVGGYngYmc,19707
|
|
112
112
|
web3/gas_strategies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
113
113
|
web3/gas_strategies/rpc.py,sha256=3Va-32jdmHkX7tzQCmh17ms2D6te5zZcqHP1326BdpY,352
|
|
114
|
-
web3/gas_strategies/time_based.py,sha256=
|
|
114
|
+
web3/gas_strategies/time_based.py,sha256=oGk6nBUD4iMC8wl1vzf-nhURaqyPWYdPvNU0C3RIs8g,9071
|
|
115
115
|
web3/middleware/__init__.py,sha256=fSmPCYJOO8Qp5p-Vm_Z4XPJATu2qN7KJRypYNSO6_uM,2830
|
|
116
116
|
web3/middleware/attrdict.py,sha256=NY5yxlFOfLBBmcIjl8R-uP2dTz9ITIyTttG8-QcJWCI,2259
|
|
117
117
|
web3/middleware/base.py,sha256=AFIRLRxoQ63lEdhsRe-sATyHaYdiwNVklPOGc9ivXrA,5103
|
|
118
118
|
web3/middleware/buffered_gas_estimate.py,sha256=EmxUd-uO959UVroPsPKkl7oDa8Tw6N8BQLB6Urng5Eo,1647
|
|
119
|
-
web3/middleware/filter.py,sha256=
|
|
119
|
+
web3/middleware/filter.py,sha256=I09sSE_q_dhWX5_24KVWhVXZNevwViI7wucJBP4TZl4,22221
|
|
120
120
|
web3/middleware/formatting.py,sha256=hqe5XQE1n5Fmj6riJp7i3oIoZkd-4ChQc7UK8f3HB6I,7567
|
|
121
121
|
web3/middleware/gas_price_strategy.py,sha256=ZjZ6pe3z0mDGLZHYoFXp4_fZIePqukljEh9f4mZUyIA,3779
|
|
122
122
|
web3/middleware/names.py,sha256=OBpsvCmcTItth4TcvUNUvcYmINnudtCHq3n6YO_BkNs,4309
|
|
123
123
|
web3/middleware/proof_of_authority.py,sha256=0AT4jr5CmTdrvl8Jiy-WYy8IFDYBOEaesgHDwpn0c7M,1429
|
|
124
124
|
web3/middleware/pythonic.py,sha256=awc8I6lLzVc2Iv138sps2uf6dMQipskLRBTdvTEEIgQ,348
|
|
125
|
-
web3/middleware/signing.py,sha256=
|
|
125
|
+
web3/middleware/signing.py,sha256=O5kOY6xcCjms7W57H53nYJ22N47TZrO-hnd3Lx2ThHs,5887
|
|
126
126
|
web3/middleware/stalecheck.py,sha256=oWRA69BGIbNGjHSnUVOBnoxOYJZYjzRzlqqL5RRlnzk,2680
|
|
127
127
|
web3/middleware/validation.py,sha256=QxActrJk_zsXXiwpadP2MUjZBS5E50OJOtUwVrm9XVo,4280
|
|
128
128
|
web3/providers/__init__.py,sha256=YkcSzE9AubvSp-UfvJjyCrdepvziysbqeq2LT0ImDoc,936
|
|
@@ -149,19 +149,14 @@ web3/providers/rpc/utils.py,sha256=_mtoZMMIoZpPA8J8U5DfRxaNQmi8bw0ZVUiqn1Nz4co,2
|
|
|
149
149
|
web3/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
150
|
web3/scripts/release/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
151
151
|
web3/scripts/release/test_package.py,sha256=DH0AryllcF4zfpWSd0NLPSQGHNoC-Qng5WYYbS5_4c8,1534
|
|
152
|
-
web3/
|
|
153
|
-
web3/
|
|
154
|
-
web3/tools/benchmark/node.py,sha256=n73GckmBKLm4_urC7HfF_Z3ZURffNMjq6ymzb9HM9c8,3252
|
|
155
|
-
web3/tools/benchmark/reporting.py,sha256=G2bj_Eo2kBV06GARDYK9zr0VqesiR0_5JLKvhAo6zRM,912
|
|
156
|
-
web3/tools/benchmark/utils.py,sha256=7OOdUD71AVWi0cowAE9ekMgqlfcJwk3vrNnMCHtiGdU,1696
|
|
157
|
-
web3/utils/__init__.py,sha256=gDQ032U1WUUmzOdrrIdcQS4s_x5gUeRHV7xQ7kTClJs,596
|
|
158
|
-
web3/utils/abi.py,sha256=naNkD7_XQGV8hd4CkxytLKWCcgzUjkb7q3ERwRVNICI,498
|
|
152
|
+
web3/utils/__init__.py,sha256=XwpyVR4EBkfqV5SHBH3maNyNBy624EwqujRgetLc7PU,1781
|
|
153
|
+
web3/utils/abi.py,sha256=iSBaCW41UxB1q1UHDPwJ1QJbdiuYmTWNu8m6E28DqlY,18672
|
|
159
154
|
web3/utils/address.py,sha256=KC_IpEbixSCuMhaW6V2QCyyJTYKYGS9c8QtI9_aH7zQ,967
|
|
160
155
|
web3/utils/async_exception_handling.py,sha256=GZWSBFC0-Wmwz1tpTie-1AKRbIQH7JkmBpf5bXrUTzY,3320
|
|
161
156
|
web3/utils/caching.py,sha256=IG_IxW-jyiRklrIyUgjOj3GQvcXrok0KLDX3ch_6wuA,2390
|
|
162
157
|
web3/utils/exception_handling.py,sha256=k31JROfUyKIm9PoEWOtYSkIq9wL8SOBwQfnSLNQyfnM,3097
|
|
163
|
-
web3-7.0.
|
|
164
|
-
web3-7.0.
|
|
165
|
-
web3-7.0.
|
|
166
|
-
web3-7.0.
|
|
167
|
-
web3-7.0.
|
|
158
|
+
web3-7.0.0b9.dist-info/LICENSE,sha256=ScEyLx1vWrB0ybKiZKKTXm5QhVksHCEUtTp4lwYV45I,1095
|
|
159
|
+
web3-7.0.0b9.dist-info/METADATA,sha256=3h7NWNTTSiFvBC020AhFwyeTuENWivxCmfIrBNz8KzY,5103
|
|
160
|
+
web3-7.0.0b9.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
161
|
+
web3-7.0.0b9.dist-info/top_level.txt,sha256=iwupuJh7wgypXrpk_awszyri3TahRr5vxSphNyvt1bU,9
|
|
162
|
+
web3-7.0.0b9.dist-info/RECORD,,
|
web3/tools/benchmark/__init__.py
DELETED
|
File without changes
|
web3/tools/benchmark/main.py
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import argparse
|
|
2
|
-
import asyncio
|
|
3
|
-
from collections import (
|
|
4
|
-
defaultdict,
|
|
5
|
-
)
|
|
6
|
-
import logging
|
|
7
|
-
import sys
|
|
8
|
-
import timeit
|
|
9
|
-
from typing import (
|
|
10
|
-
Any,
|
|
11
|
-
Callable,
|
|
12
|
-
Dict,
|
|
13
|
-
Union,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
from web3 import (
|
|
17
|
-
AsyncHTTPProvider,
|
|
18
|
-
AsyncWeb3,
|
|
19
|
-
HTTPProvider,
|
|
20
|
-
Web3,
|
|
21
|
-
)
|
|
22
|
-
from web3.middleware import (
|
|
23
|
-
BufferedGasEstimateMiddleware,
|
|
24
|
-
GasPriceStrategyMiddleware,
|
|
25
|
-
)
|
|
26
|
-
from web3.tools.benchmark.node import (
|
|
27
|
-
GethBenchmarkFixture,
|
|
28
|
-
)
|
|
29
|
-
from web3.tools.benchmark.reporting import (
|
|
30
|
-
print_entry,
|
|
31
|
-
print_footer,
|
|
32
|
-
print_header,
|
|
33
|
-
)
|
|
34
|
-
from web3.tools.benchmark.utils import (
|
|
35
|
-
wait_for_aiohttp,
|
|
36
|
-
wait_for_http,
|
|
37
|
-
)
|
|
38
|
-
from web3.types import (
|
|
39
|
-
Wei,
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
KEYFILE_PW = "web3py-test"
|
|
43
|
-
|
|
44
|
-
parser = argparse.ArgumentParser()
|
|
45
|
-
parser.add_argument(
|
|
46
|
-
"--num-calls",
|
|
47
|
-
type=int,
|
|
48
|
-
default=10,
|
|
49
|
-
help="The number of RPC calls to make",
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
# TODO - layers to test:
|
|
53
|
-
# contract.functions.method(...).call()
|
|
54
|
-
# w3.eth.call(...)
|
|
55
|
-
# HTTPProvider.make_request(...)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def build_web3_http(endpoint_uri: str) -> Web3:
|
|
59
|
-
wait_for_http(endpoint_uri)
|
|
60
|
-
_w3 = Web3(
|
|
61
|
-
HTTPProvider(endpoint_uri),
|
|
62
|
-
middleware=[GasPriceStrategyMiddleware, BufferedGasEstimateMiddleware],
|
|
63
|
-
)
|
|
64
|
-
return _w3
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
async def build_async_w3_http(endpoint_uri: str) -> AsyncWeb3:
|
|
68
|
-
await wait_for_aiohttp(endpoint_uri)
|
|
69
|
-
_w3 = AsyncWeb3(
|
|
70
|
-
AsyncHTTPProvider(endpoint_uri),
|
|
71
|
-
middleware=[GasPriceStrategyMiddleware, BufferedGasEstimateMiddleware],
|
|
72
|
-
)
|
|
73
|
-
return _w3
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def sync_benchmark(func: Callable[..., Any], n: int) -> Union[float, str]:
|
|
77
|
-
try:
|
|
78
|
-
starttime = timeit.default_timer()
|
|
79
|
-
for _ in range(n):
|
|
80
|
-
func()
|
|
81
|
-
endtime = timeit.default_timer()
|
|
82
|
-
execution_time = endtime - starttime
|
|
83
|
-
return execution_time
|
|
84
|
-
except Exception:
|
|
85
|
-
return "N/A"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
async def async_benchmark(func: Callable[..., Any], n: int) -> Union[float, str]:
|
|
89
|
-
try:
|
|
90
|
-
starttime = timeit.default_timer()
|
|
91
|
-
for result in asyncio.as_completed([func() for _ in range(n)]):
|
|
92
|
-
await result
|
|
93
|
-
execution_time = timeit.default_timer() - starttime
|
|
94
|
-
return execution_time
|
|
95
|
-
except Exception:
|
|
96
|
-
return "N/A"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
def main(logger: logging.Logger, num_calls: int) -> None:
|
|
100
|
-
fixture = GethBenchmarkFixture()
|
|
101
|
-
for built_fixture in fixture.build():
|
|
102
|
-
for _ in built_fixture:
|
|
103
|
-
w3_http = build_web3_http(fixture.endpoint_uri)
|
|
104
|
-
try:
|
|
105
|
-
loop = asyncio.get_running_loop()
|
|
106
|
-
except RuntimeError:
|
|
107
|
-
loop = asyncio.new_event_loop()
|
|
108
|
-
asyncio.set_event_loop(loop)
|
|
109
|
-
|
|
110
|
-
# -- sync -- #
|
|
111
|
-
account = w3_http.eth.accounts[0]
|
|
112
|
-
|
|
113
|
-
# -- async -- #
|
|
114
|
-
async_w3_http = loop.run_until_complete(
|
|
115
|
-
build_async_w3_http(fixture.endpoint_uri)
|
|
116
|
-
)
|
|
117
|
-
async_accounts = loop.run_until_complete(async_w3_http.eth.accounts)
|
|
118
|
-
async_account = async_accounts[0]
|
|
119
|
-
|
|
120
|
-
methods = [
|
|
121
|
-
{
|
|
122
|
-
"name": "eth_gasPrice",
|
|
123
|
-
"params": {},
|
|
124
|
-
"exec": lambda w3_http=w3_http: w3_http.eth.gas_price,
|
|
125
|
-
"async_exec": lambda async_w3_http=async_w3_http: async_w3_http.eth.gas_price, # noqa: E501
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"name": "eth_sendTransaction",
|
|
129
|
-
"params": {},
|
|
130
|
-
"exec": lambda w3_http=w3_http, account=account: w3_http.eth.send_transaction( # noqa: E501
|
|
131
|
-
{
|
|
132
|
-
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
|
|
133
|
-
"from": account,
|
|
134
|
-
"value": Wei(1),
|
|
135
|
-
}
|
|
136
|
-
),
|
|
137
|
-
"async_exec": lambda async_w3_http=async_w3_http, async_account=async_account: async_w3_http.eth.send_transaction( # noqa: E501
|
|
138
|
-
{
|
|
139
|
-
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
|
|
140
|
-
"from": async_account,
|
|
141
|
-
"value": Wei(1),
|
|
142
|
-
}
|
|
143
|
-
),
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"name": "eth_blockNumber",
|
|
147
|
-
"params": {},
|
|
148
|
-
"exec": lambda w3_http=w3_http: w3_http.eth.block_number,
|
|
149
|
-
"async_exec": lambda async_w3_http=async_w3_http: async_w3_http.eth.block_number, # noqa: E501
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"name": "eth_getBlock",
|
|
153
|
-
"params": {},
|
|
154
|
-
"exec": lambda w3_http=w3_http: w3_http.eth.get_block(1),
|
|
155
|
-
"async_exec": lambda async_w3_http=async_w3_http: async_w3_http.eth.get_block( # noqa: E501
|
|
156
|
-
1
|
|
157
|
-
),
|
|
158
|
-
},
|
|
159
|
-
]
|
|
160
|
-
|
|
161
|
-
def benchmark(
|
|
162
|
-
method: Dict[str, Any], loop: asyncio.AbstractEventLoop = loop
|
|
163
|
-
) -> None:
|
|
164
|
-
outcomes: Dict[str, Union[str, float]] = defaultdict(lambda: "N/A")
|
|
165
|
-
outcomes["name"] = method["name"]
|
|
166
|
-
outcomes["HTTPProvider"] = sync_benchmark(
|
|
167
|
-
method["exec"],
|
|
168
|
-
num_calls,
|
|
169
|
-
)
|
|
170
|
-
outcomes["AsyncHTTPProvider"] = loop.run_until_complete(
|
|
171
|
-
async_benchmark(method["async_exec"], num_calls)
|
|
172
|
-
)
|
|
173
|
-
print_entry(logger, outcomes)
|
|
174
|
-
|
|
175
|
-
print_header(logger, num_calls)
|
|
176
|
-
|
|
177
|
-
for method in methods:
|
|
178
|
-
benchmark(method)
|
|
179
|
-
|
|
180
|
-
print_footer(logger)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if __name__ == "__main__":
|
|
184
|
-
args = parser.parse_args()
|
|
185
|
-
|
|
186
|
-
logger = logging.getLogger()
|
|
187
|
-
logger.setLevel(logging.INFO)
|
|
188
|
-
logger.addHandler(logging.StreamHandler(sys.stdout))
|
|
189
|
-
|
|
190
|
-
main(logger, args.num_calls)
|
web3/tools/benchmark/node.py
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import socket
|
|
3
|
-
from subprocess import (
|
|
4
|
-
PIPE,
|
|
5
|
-
Popen,
|
|
6
|
-
check_output,
|
|
7
|
-
)
|
|
8
|
-
from tempfile import (
|
|
9
|
-
TemporaryDirectory,
|
|
10
|
-
)
|
|
11
|
-
from typing import (
|
|
12
|
-
Any,
|
|
13
|
-
Generator,
|
|
14
|
-
Sequence,
|
|
15
|
-
)
|
|
16
|
-
import zipfile
|
|
17
|
-
|
|
18
|
-
from geth.install import (
|
|
19
|
-
get_executable_path,
|
|
20
|
-
install_geth,
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
from web3.tools.benchmark.utils import (
|
|
24
|
-
kill_proc_gracefully,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
GETH_FIXTURE_ZIP = "geth-1.14.5-fixture.zip"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class GethBenchmarkFixture:
|
|
31
|
-
def __init__(self) -> None:
|
|
32
|
-
self.rpc_port = self._rpc_port()
|
|
33
|
-
self.endpoint_uri = self._endpoint_uri()
|
|
34
|
-
self.geth_binary = self._geth_binary()
|
|
35
|
-
|
|
36
|
-
def build(self) -> Generator[Any, None, None]:
|
|
37
|
-
with TemporaryDirectory() as base_dir:
|
|
38
|
-
zipfile_path = os.path.abspath(
|
|
39
|
-
os.path.join(
|
|
40
|
-
os.path.dirname(__file__),
|
|
41
|
-
"../../../tests/integration/",
|
|
42
|
-
GETH_FIXTURE_ZIP,
|
|
43
|
-
)
|
|
44
|
-
)
|
|
45
|
-
tmp_datadir = os.path.join(str(base_dir), "datadir")
|
|
46
|
-
with zipfile.ZipFile(zipfile_path, "r") as zip_ref:
|
|
47
|
-
zip_ref.extractall(tmp_datadir)
|
|
48
|
-
self.datadir = tmp_datadir
|
|
49
|
-
|
|
50
|
-
genesis_file = os.path.join(self.datadir, "genesis.json")
|
|
51
|
-
|
|
52
|
-
yield self._geth_process(self.datadir, genesis_file, self.rpc_port)
|
|
53
|
-
|
|
54
|
-
def _rpc_port(self) -> str:
|
|
55
|
-
sock = socket.socket()
|
|
56
|
-
sock.bind(("127.0.0.1", 0))
|
|
57
|
-
port = sock.getsockname()[1]
|
|
58
|
-
sock.close()
|
|
59
|
-
return str(port)
|
|
60
|
-
|
|
61
|
-
def _endpoint_uri(self) -> str:
|
|
62
|
-
return f"http://localhost:{self.rpc_port}"
|
|
63
|
-
|
|
64
|
-
def _geth_binary(self) -> str:
|
|
65
|
-
if "GETH_BINARY" in os.environ:
|
|
66
|
-
return os.environ["GETH_BINARY"]
|
|
67
|
-
elif "GETH_VERSION" in os.environ:
|
|
68
|
-
geth_version = os.environ["GETH_VERSION"]
|
|
69
|
-
_geth_binary = get_executable_path(geth_version)
|
|
70
|
-
if not os.path.exists(_geth_binary):
|
|
71
|
-
install_geth(geth_version)
|
|
72
|
-
assert os.path.exists(_geth_binary)
|
|
73
|
-
return _geth_binary
|
|
74
|
-
else:
|
|
75
|
-
return "geth"
|
|
76
|
-
|
|
77
|
-
def _geth_command_arguments(self, datadir: str) -> Sequence[str]:
|
|
78
|
-
return (
|
|
79
|
-
self.geth_binary,
|
|
80
|
-
"--dev",
|
|
81
|
-
"--dev.period",
|
|
82
|
-
"100",
|
|
83
|
-
"--datadir",
|
|
84
|
-
datadir,
|
|
85
|
-
"--nodiscover",
|
|
86
|
-
"--http",
|
|
87
|
-
"--http.port",
|
|
88
|
-
self.rpc_port,
|
|
89
|
-
"--http.api",
|
|
90
|
-
"admin,eth,net,web3",
|
|
91
|
-
"--ipcdisable",
|
|
92
|
-
"--password",
|
|
93
|
-
os.path.join(datadir, "keystore", "pw.txt"),
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
def _geth_process(
|
|
97
|
-
self, datadir: str, genesis_file: str, rpc_port: str
|
|
98
|
-
) -> Generator[Any, None, None]:
|
|
99
|
-
init_datadir_command = (
|
|
100
|
-
self.geth_binary,
|
|
101
|
-
"--datadir",
|
|
102
|
-
str(datadir),
|
|
103
|
-
"init",
|
|
104
|
-
str(genesis_file),
|
|
105
|
-
)
|
|
106
|
-
check_output(
|
|
107
|
-
init_datadir_command,
|
|
108
|
-
stdin=PIPE,
|
|
109
|
-
stderr=PIPE,
|
|
110
|
-
)
|
|
111
|
-
proc = Popen(
|
|
112
|
-
self._geth_command_arguments(datadir),
|
|
113
|
-
stdin=PIPE,
|
|
114
|
-
stdout=PIPE,
|
|
115
|
-
stderr=PIPE,
|
|
116
|
-
)
|
|
117
|
-
try:
|
|
118
|
-
yield proc
|
|
119
|
-
finally:
|
|
120
|
-
kill_proc_gracefully(proc)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
from logging import (
|
|
2
|
-
Logger,
|
|
3
|
-
)
|
|
4
|
-
from typing import (
|
|
5
|
-
Any,
|
|
6
|
-
Dict,
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def print_header(logger: Logger, num_calls: int) -> None:
|
|
11
|
-
logger.info(
|
|
12
|
-
"|{:^26}|{:^20}|{:^20}|{:^20}|{:^20}|".format(
|
|
13
|
-
f"Method ({num_calls} calls)",
|
|
14
|
-
"HTTPProvider",
|
|
15
|
-
"AsyncHTTProvider",
|
|
16
|
-
"IPCProvider",
|
|
17
|
-
"WebSocketProvider",
|
|
18
|
-
)
|
|
19
|
-
)
|
|
20
|
-
logger.info("-" * 112)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def print_entry(
|
|
24
|
-
logger: Logger,
|
|
25
|
-
method_benchmarks: Dict[str, Any],
|
|
26
|
-
) -> None:
|
|
27
|
-
logger.info(
|
|
28
|
-
"|{:^26}|{:^20.10}|{:^20.10}|{:^20.10}|{:^20.10}|".format(
|
|
29
|
-
method_benchmarks["name"],
|
|
30
|
-
method_benchmarks["HTTPProvider"],
|
|
31
|
-
method_benchmarks["AsyncHTTPProvider"],
|
|
32
|
-
method_benchmarks["IPCProvider"],
|
|
33
|
-
method_benchmarks["WebSocketProvider"],
|
|
34
|
-
)
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def print_footer(logger: Logger) -> None:
|
|
39
|
-
logger.info("-" * 112)
|
web3/tools/benchmark/utils.py
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
import signal
|
|
3
|
-
import socket
|
|
4
|
-
import time
|
|
5
|
-
from typing import (
|
|
6
|
-
Any,
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
import aiohttp
|
|
10
|
-
import requests
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def wait_for_socket(ipc_path: str, timeout: int = 30) -> None:
|
|
14
|
-
start = time.time()
|
|
15
|
-
while time.time() < start + timeout:
|
|
16
|
-
try:
|
|
17
|
-
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
18
|
-
sock.connect(ipc_path)
|
|
19
|
-
sock.settimeout(timeout)
|
|
20
|
-
except OSError:
|
|
21
|
-
time.sleep(0.01)
|
|
22
|
-
else:
|
|
23
|
-
break
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def wait_for_http(endpoint_uri: str, timeout: int = 60) -> None:
|
|
27
|
-
start = time.time()
|
|
28
|
-
while time.time() < start + timeout:
|
|
29
|
-
try:
|
|
30
|
-
requests.get(endpoint_uri)
|
|
31
|
-
except requests.ConnectionError:
|
|
32
|
-
time.sleep(0.01)
|
|
33
|
-
else:
|
|
34
|
-
break
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
async def wait_for_aiohttp(endpoint_uri: str, timeout: int = 60) -> None:
|
|
38
|
-
start = time.time()
|
|
39
|
-
while time.time() < start + timeout:
|
|
40
|
-
try:
|
|
41
|
-
async with aiohttp.ClientSession() as session:
|
|
42
|
-
await session.get(endpoint_uri)
|
|
43
|
-
except aiohttp.client_exceptions.ClientConnectorError:
|
|
44
|
-
await asyncio.sleep(0.01)
|
|
45
|
-
else:
|
|
46
|
-
break
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def wait_for_popen(proc: Any, timeout: int) -> None:
|
|
50
|
-
start = time.time()
|
|
51
|
-
while time.time() < start + timeout:
|
|
52
|
-
if proc.poll() is None:
|
|
53
|
-
time.sleep(0.01)
|
|
54
|
-
else:
|
|
55
|
-
break
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def kill_proc_gracefully(proc: Any) -> None:
|
|
59
|
-
if proc.poll() is None:
|
|
60
|
-
proc.send_signal(signal.SIGINT)
|
|
61
|
-
wait_for_popen(proc, 13)
|
|
62
|
-
|
|
63
|
-
if proc.poll() is None:
|
|
64
|
-
proc.terminate()
|
|
65
|
-
wait_for_popen(proc, 5)
|
|
66
|
-
|
|
67
|
-
if proc.poll() is None:
|
|
68
|
-
proc.kill()
|
|
69
|
-
wait_for_popen(proc, 2)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|