ProofServerClientImpl
class ProofServerClientImpl(httpClient: HttpClient, proofServerUrl: String = "http://localhost:6300", developmentMode: Boolean = true) : ProofServerClient
Ktor-based implementation of ProofServerClient for Midnight proof server.
Connection:
HTTP endpoint: POST to
{proofServerUrl}/prove-txBinary protocol (SCALE codec)
Timeout: 300 seconds (5 minutes) - proof generation is slow
Retry Logic:
Retries on 502, 503, 504 (server overload/unavailable)
Exponential backoff: 2s, 4s, 8s
Maximum 3 attempts
Does NOT retry on 400-499 (client errors)
Security:
Development mode: Allows HTTP to localhost (testing only)
Production mode: Requires HTTPS
Parameters
httpClient
HTTP client for making requests (injectable for testing)
proofServerUrl
Proof server endpoint URL (e.g., "http://localhost:6300")
developmentMode
If true, allows HTTP to localhost (INSECURE - testing only)