From 9d6ecbd47b9f599e66d23a8e54831498af9549ab Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:23:18 -0400 Subject: [PATCH 01/11] feat: implement faster-eth-utils --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index ed728e5e..271b5c5f 100644 --- a/setup.py +++ b/setup.py @@ -72,6 +72,7 @@ "ethpm-types>=0.6.10", # lower pin only, `eth-ape` governs upper pin "eth-pydantic-types", # Use same version as eth-ape "exceptiongroup; python_version < '3.11'", # Used with TaskGroup + "faster-eth-utils>=2.1.0", # lower pin only, `eth-ape` governs upper pin "httpx>=0.28,<1", # Use for Cluster client, auth "jwcrypto>=1.4,<2", # Use for auth "packaging", # Use same version as eth-ape From af72fdbc3c61657498c940d60b65c59763bf5521 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:24:06 -0400 Subject: [PATCH 02/11] Update utils.py --- silverback/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silverback/utils.py b/silverback/utils.py index 6b513440..fabfaf4c 100644 --- a/silverback/utils.py +++ b/silverback/utils.py @@ -4,7 +4,7 @@ from ape.types import HexBytes from eth_typing import HexStr -from eth_utils import to_hex +from faster_eth_utils import to_hex Topic = list[HexStr] | HexStr | None From 85f72786148415e9b8a2ed1a90034c61a789643c Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:24:26 -0400 Subject: [PATCH 03/11] Update runner.py --- silverback/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silverback/runner.py b/silverback/runner.py index 4bdbf815..48801daa 100644 --- a/silverback/runner.py +++ b/silverback/runner.py @@ -13,7 +13,7 @@ from ape import chain from ape.logging import logger from ape.utils import ManagerAccessMixin -from eth_utils import to_checksum_address +from cchecksum import to_checksum_address from ethpm_types import EventABI from packaging.specifiers import SpecifierSet from packaging.version import Version From 9daf271ed6d514340b4a23758ea980b61011d05b Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:24:42 -0400 Subject: [PATCH 04/11] Update main.py --- silverback/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silverback/main.py b/silverback/main.py index 7ae12c59..7b0df592 100644 --- a/silverback/main.py +++ b/silverback/main.py @@ -14,7 +14,7 @@ from ape.types import AddressType, ContractLog from ape.utils import ManagerAccessMixin from eth_typing import HexStr -from eth_utils import keccak, to_hex +from faster_eth_utils import keccak, to_hex from ethpm_types.abi import encode_topic_value from packaging.version import Version from pydantic import BaseModel From 5e50c8c1abf59bc56fb8bbb43b1dc9c6834ef86a Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:25:01 -0400 Subject: [PATCH 05/11] Update types.py --- silverback/cluster/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silverback/cluster/types.py b/silverback/cluster/types.py index ad3bf861..41ab7149 100644 --- a/silverback/cluster/types.py +++ b/silverback/cluster/types.py @@ -10,7 +10,7 @@ from ape.types import AddressType, HexBytes from cryptography.exceptions import InvalidSignature from cryptography.hazmat.primitives.hmac import HMAC, hashes -from eth_utils import to_bytes, to_int +from faster_eth_utils import to_bytes, to_int from pydantic import BaseModel, Field, computed_field, field_validator from typing_extensions import Self From 9490f00dc7a3d62a795180666710308d430d6afa Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:25:20 -0400 Subject: [PATCH 06/11] Update test_cluster.py --- tests/test_cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cluster.py b/tests/test_cluster.py index 8a9a909e..c82ea362 100644 --- a/tests/test_cluster.py +++ b/tests/test_cluster.py @@ -1,4 +1,4 @@ -from eth_utils import to_checksum_address +from cchecksum import to_checksum_address from hypothesis import given from hypothesis import strategies as st from hypothesis_jsonschema import from_schema From 11f9c8b8dc97aac3c85257e5448436abc47ef36d Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:25:44 -0400 Subject: [PATCH 07/11] Update setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 271b5c5f..499f446d 100644 --- a/setup.py +++ b/setup.py @@ -67,6 +67,7 @@ include_package_data=True, install_requires=[ "apepay>=0.3.5,<1", + "cchecksum>=0.0.3", # lower pin only, `eth-ape` governs upper pin "click", # Use same version as eth-ape "eth-ape>=0.8.31,<1", "ethpm-types>=0.6.10", # lower pin only, `eth-ape` governs upper pin From 2a9d4b55043c85cd0731e5c2e74bd1a00a5f3ac8 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:26:34 -0400 Subject: [PATCH 08/11] Update main.py --- silverback/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silverback/main.py b/silverback/main.py index 7b0df592..fb5bf5c1 100644 --- a/silverback/main.py +++ b/silverback/main.py @@ -14,8 +14,8 @@ from ape.types import AddressType, ContractLog from ape.utils import ManagerAccessMixin from eth_typing import HexStr -from faster_eth_utils import keccak, to_hex from ethpm_types.abi import encode_topic_value +from faster_eth_utils import keccak, to_hex from packaging.version import Version from pydantic import BaseModel from taskiq import AsyncTaskiqDecoratedTask, TaskiqEvents From 7d82662b97d0b5ff050321c5efbd1ef854a4dafc Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Wed, 10 Sep 2025 17:07:22 -0400 Subject: [PATCH 09/11] fix mypy err --- silverback/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silverback/utils.py b/silverback/utils.py index fabfaf4c..10a80a0a 100644 --- a/silverback/utils.py +++ b/silverback/utils.py @@ -34,7 +34,7 @@ def decode_topics_from_string(encoded_topics: str) -> list[Topic]: # NOTE: Should reverse the above return _clean_trailing_nones( [ - _simplify_topic([to_hex(hexstr=t) for t in et.split(",")]) if et else None + _simplify_topic([to_hex(hexstr=t) for t in et.split(",")]) if et else None # type: ignore [arg-type] for et in encoded_topics.split(";") ] ) From fbe9b3bf2e4ba7f1ca02c33dd62cf0031253abcc Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 15 Sep 2025 18:04:19 -0400 Subject: [PATCH 10/11] noqa: E501 --- silverback/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silverback/utils.py b/silverback/utils.py index 10a80a0a..ee502ffb 100644 --- a/silverback/utils.py +++ b/silverback/utils.py @@ -34,7 +34,7 @@ def decode_topics_from_string(encoded_topics: str) -> list[Topic]: # NOTE: Should reverse the above return _clean_trailing_nones( [ - _simplify_topic([to_hex(hexstr=t) for t in et.split(",")]) if et else None # type: ignore [arg-type] + _simplify_topic([to_hex(hexstr=t) for t in et.split(",")]) if et else None # type: ignore [arg-type] noqa: E501 for et in encoded_topics.split(";") ] ) From afa30447829c1840efc26be0333e322db5c01184 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:42:04 -0400 Subject: [PATCH 11/11] lint --- silverback/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/silverback/utils.py b/silverback/utils.py index ee502ffb..938e86bb 100644 --- a/silverback/utils.py +++ b/silverback/utils.py @@ -34,7 +34,9 @@ def decode_topics_from_string(encoded_topics: str) -> list[Topic]: # NOTE: Should reverse the above return _clean_trailing_nones( [ - _simplify_topic([to_hex(hexstr=t) for t in et.split(",")]) if et else None # type: ignore [arg-type] noqa: E501 + _simplify_topic( + [to_hex(hexstr=t) for t in et.split(",")] # type: ignore [arg-type] + ) if et else None for et in encoded_topics.split(";") ] )