Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update leader docs #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jito_searcher_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ with open(KEYPAIR_PATH) as kp_path:
kp = Keypair.from_json(kp_path.read())

client = get_searcher_client(BLOCK_ENGINE_URL, kp)
# This call is not needed since jito-sol is on the majority of validators
# It is useful if jito-sol is on less than 50% of the validators
leaders = client.GetConnectedLeaders(ConnectedLeadersRequest())
print(f"{leaders=}")
```
Expand All @@ -48,6 +50,8 @@ async def main():
with open(KEYPAIR_PATH) as kp_path:
kp = Keypair.from_json(kp_path.read())
client = await get_async_searcher_client(BLOCK_ENGINE_URL, kp)
# This call is not needed since jito-sol is on the majority of validators
# It is useful if jito-sol is on less than 50% of the validators
leaders = await client.GetConnectedLeaders(ConnectedLeadersRequest())
print(f"{leaders=}")

Expand Down
2 changes: 2 additions & 0 deletions jito_searcher_client/examples/searcher-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def send_bundle(
balance = rpc_client.get_balance(payer_kp.pubkey()).value
print(f"payer public key: {payer_kp.pubkey()} {balance=}")

# This check is not needed since jito-sol is on the majority of validators
# It is useful if jito-sol is on less than 50% of the validators
is_leader_slot = False
print("waiting for jito leader...")
while not is_leader_slot:
Expand Down