forked from MPCStats/mpc-demo-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
55 lines (39 loc) · 1.57 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from pydantic import BaseSettings
from typing import List
from pathlib import Path
this_file_path = Path(__file__).parent.resolve()
class Settings(BaseSettings):
num_parties: int = 3
port: int = 8005
# User queue
user_queue_size: int = 1000
user_queue_head_timeout: int = 300
# Allowed IPs for access control
allowed_ips: List[str] = ["192.168.1.100", "192.168.1.101"]
# Database settings
database_url: str = "sqlite:///./coordination.db"
tlsn_project_root: str = str(this_file_path.parent.parent / "tlsn")
# mpc-demo-infra/tlsn_proofs
tlsn_proofs_dir: str = str(this_file_path.parent.parent / "tlsn_proofs")
# API Keys for additional authentication (optional)
api_keys: List[str] = ["your_api_key_1", "your_api_key_2"]
# should specify a range for ports
free_ports_start: int = 8010
# including the end port
free_ports_end: int = 8100
# Used to call computation party server APIs which are only accessible by the coordination server
party_api_key: str = "1234567890"
party_web_protocol: str = "http"
# Party IPs. Used to whitelist IPs that can access party-server-only APIs.
party_hosts: List[str] = ["127.0.0.1", "127.0.0.1", "127.0.0.1"]
party_ports: List[int] = [8006, 8007, 8008]
fullchain_pem_path: str = "ssl_certs/fullchain.pem"
privkey_pem_path: str = "ssl_certs/privkey.pem"
# Logging
max_bytes_mb = 20
backup_count = 10
# Debug flags
prohibit_multiple_contributions: bool = True
class Config:
env_file = ".env.coord"
settings = Settings()