From 47872d277c2947dab28ac211cc2518a13fa10e01 Mon Sep 17 00:00:00 2001 From: Huang Hong Jie Date: Tue, 11 Feb 2025 14:37:17 +0800 Subject: [PATCH 1/3] Fix jito async searcher unnecessary authentication problem --- .../jito_searcher_client/async_searcher.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/jito_searcher_client/jito_searcher_client/async_searcher.py b/jito_searcher_client/jito_searcher_client/async_searcher.py index 263e146..e3f4d10 100644 --- a/jito_searcher_client/jito_searcher_client/async_searcher.py +++ b/jito_searcher_client/jito_searcher_client/async_searcher.py @@ -59,10 +59,10 @@ async def intercept_unary_stream( if self._kp != None: await self.authenticate_if_needed() - client_call_details = self._insert_headers( - [("authorization", f"Bearer {self._access_token.token}")], - client_call_details, - ) + client_call_details = self._insert_headers( + [("authorization", f"Bearer {self._access_token.token}")], + client_call_details, + ) call = await continuation(client_call_details, request) @@ -77,10 +77,10 @@ async def intercept_unary_unary( if self._kp != None: await self.authenticate_if_needed() - client_call_details = self._insert_headers( - [("authorization", f"Bearer {self._access_token.token}")], - client_call_details, - ) + client_call_details = self._insert_headers( + [("authorization", f"Bearer {self._access_token.token}")], + client_call_details, + ) undone_call = await continuation(client_call_details, request) response = await undone_call @@ -173,7 +173,8 @@ async def get_async_searcher_client(url: str, kp: Keypair=None) -> SearcherServi """ # Authenticate immediately searcher_interceptor = AsyncSearcherInterceptor(url, kp) - await searcher_interceptor.authenticate_if_needed() + if kp != None: + await searcher_interceptor.authenticate_if_needed() credentials = ssl_channel_credentials() channel = secure_channel(url, credentials, interceptors=[searcher_interceptor]) From 0fe4e53d2c6e1a2d147479239b16554d132272d1 Mon Sep 17 00:00:00 2001 From: Huang Hong Jie Date: Tue, 11 Feb 2025 15:14:13 +0800 Subject: [PATCH 2/3] Replace poetry-core with setuptool --- jito_geyser/pyproject.toml | 4 ++-- jito_searcher_client/pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jito_geyser/pyproject.toml b/jito_geyser/pyproject.toml index a881571..b37bb20 100644 --- a/jito_geyser/pyproject.toml +++ b/jito_geyser/pyproject.toml @@ -13,8 +13,8 @@ protobuf = "^4.21.12" isort = "^5.11.4" [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" [tool.poetry-grpc-plugin] proto_path = "../geyser-grpc-plugin/proto/proto" diff --git a/jito_searcher_client/pyproject.toml b/jito_searcher_client/pyproject.toml index 4e91923..ac7c640 100644 --- a/jito_searcher_client/pyproject.toml +++ b/jito_searcher_client/pyproject.toml @@ -15,8 +15,8 @@ click = "^8.1.3" solana = "0.34.0" [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" [tool.poetry-grpc-plugin] proto_path = "../mev-protos" From 0d79219eb696eb0d40bb81b1ef44cf1c2677d874 Mon Sep 17 00:00:00 2001 From: Huang Hong Jie Date: Tue, 13 May 2025 15:10:18 +0800 Subject: [PATCH 3/3] Upgrade jito-python using solders 0.26 --- jito_searcher_client/jito_searcher_client/convert.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jito_searcher_client/jito_searcher_client/convert.py b/jito_searcher_client/jito_searcher_client/convert.py index 6a21f66..8cfd5a6 100644 --- a/jito_searcher_client/jito_searcher_client/convert.py +++ b/jito_searcher_client/jito_searcher_client/convert.py @@ -1,5 +1,4 @@ -from solana.transaction import Transaction -from solders.transaction import VersionedTransaction +from solders.transaction import VersionedTransaction, Transaction from jito_searcher_client.generated.packet_pb2 import Meta, Packet