Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 1bbd3ed

Browse files
committed
fix: cli binance_prover not found
1 parent 2a86055 commit 1bbd3ed

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

mpc_demo_infra/client_cli/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Settings(BaseSettings):
1313
certs_path: str = str(this_file_path.parent.parent / "certs")
1414
# ../../../tlsn
1515
tlsn_project_root: str = str(this_file_path.parent.parent.parent / "tlsn")
16+
print(f"tlsn_project_root: {tlsn_project_root}")
1617

1718
party_web_protocol: str = "http"
1819
party_hosts: list[str] = ["localhost", "localhost", "localhost"]
@@ -21,7 +22,7 @@ class Settings(BaseSettings):
2122
# logging
2223
max_bytes_mb = 20
2324
backup_count = 10
24-
25+
2526
class Config:
2627
env_file = ".env.client_cli"
2728

mpc_demo_infra/client_cli/main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@
1818
PROJECT_ROOT = Path(__file__).parent.parent.parent
1919
CERTS_PATH = Path(settings.certs_path)
2020
TLSN_EXECUTABLE_DIR = Path(settings.tlsn_project_root) / "tlsn" / "examples" / "binance"
21+
TLSN_BINARY_PATH = Path(settings.tlsn_project_root) / "tlsn" / "target" / "release" / "examples"
2122

2223
CMD_VERIFY_TLSN_PROOF = "cargo run --release --example binance_verifier"
2324
CMD_GEN_TLSN_PROOF = "cargo run --release --example binance_prover"
24-
25+
CMD_TLSN_PROVER = "./binance_prover"
2526

2627
def locate_binance_prover():
28+
# either in the project root or place executing `poetry run` or `tlsn executable dir`
2729
binance_provers = [
28-
(Path('.').resolve(), './binance_prover'),
29-
(TLSN_EXECUTABLE_DIR, CMD_GEN_TLSN_PROOF),
30+
(Path('.').resolve(), CMD_TLSN_PROVER),
31+
(TLSN_BINARY_PATH, CMD_TLSN_PROVER),
3032
]
3133
binance_prover_dir = None
3234
for (dir, exec_cmd) in binance_provers:
@@ -35,7 +37,7 @@ def locate_binance_prover():
3537
binance_prover_exec_cmd = exec_cmd
3638
break
3739
if binance_prover_dir is None:
38-
raise FileNotFoundError(f"binance_prover not found in {binance_prover_dir}")
40+
raise FileNotFoundError(f"binance_prover not found in {binance_prover_dir}. Please build it in TLSN repo.")
3941
logger.info(f"Found binance_prover in {binance_prover_dir}")
4042
return binance_prover_dir, binance_prover_exec_cmd
4143

0 commit comments

Comments
 (0)