Platform

Overview

How It Works

Beneficiary Identity

Policy Corridors

Deterministic Finality

Architecture

Security Model

Governance

Integration

Solutions

Corridors Overview

Institutional Overview

Pricing

All Scenarios

Humanitarian Impact Fund

Assurance

Technical Assurance

Verify Receipt

Receipt Example

Developers

Documentation

APIs & Bridges

Architecture Docs

Glossary

BID API

Company

About

Team

Partners

Roadmap

Investors

Contact

Blog

All Documentation

Schedule Consultation
← Back to Patent Claims
Patent Claim 34 All Patents →

Correlation-ID Secure Boot

Request-Response Over Pub-Sub for Multi-Phase Validator Bootstrap

Patent Claim JIL Sovereign February 2026 Claim 34 of 36

01Executive Summary

JIL Sovereign implements synchronous request-response communication over asynchronous pub-sub messaging (Kafka/RedPanda) using UUID correlation IDs and a pre-emptive promise registration pattern. This pattern enables the 7-gate validator bootstrap sequence to operate reliably over the same messaging infrastructure used for all other fleet communication, eliminating the need for separate synchronous channels.

The critical innovation is pre-emptive promise registration: the requesting agent registers a promise (callback) for a specific correlation ID before publishing the request message. This eliminates the race condition where a response arrives before the requester has set up its listener. Combined with 30-second timeouts and automatic retry logic, the pattern provides reliable request-response semantics over fire-and-forget messaging.

Core Innovation: Pre-emptive promise registration solves the fundamental race condition in request-response over pub-sub. By registering the response handler before publishing the request, the system guarantees that no response is ever lost, regardless of how quickly the responder processes the request. This transforms inherently asynchronous messaging into reliable synchronous communication without introducing new infrastructure dependencies.

02Problem Statement

Validator bootstrap requires a strict sequence of request-response exchanges between the agent and JILHQ: handshake, secret delivery, configuration, key verification, and authorization. Each step depends on the previous step's response. Pub-sub messaging is inherently asynchronous and fire-and-forget, making it unsuitable for ordered, dependent communication without additional patterns.

2.1 The Request-Response Challenge

  • Race Condition: If the requester publishes a message and then sets up a listener, a fast responder may reply before the listener exists, causing the response to be lost forever.
  • Topic Proliferation: Creating dedicated request/response topics per validator per bootstrap phase leads to an explosion of topics that must be managed and cleaned up.
  • Ordering Guarantees: Pub-sub partitioning does not guarantee that related messages arrive in order across different topics, complicating multi-step protocols.
  • Timeout Handling: Without built-in request-response semantics, detecting that a response never arrived requires custom timeout and retry logic.

2.2 Why Existing Approaches Fail

ApproachMechanismRace SafetyLimitation
HTTP RESTSynchronous request-responseN/A - inherently syncRequires direct network access (firewall issues)
gRPC StreamingBidirectional streamConnection-basedRequires persistent connection (NAT traversal)
Reply-To HeaderKafka reply topicNo - listener after publishRace condition on fast responses
PollingRepeated GET requestsYes but slowHigh latency, wasted bandwidth
The Gap: No standard pattern exists for reliable, race-condition-free request-response communication over pub-sub messaging. Kafka's "reply-to" pattern is not race-safe because the consumer subscription happens after the request is published. JIL's pre-emptive promise registration pattern solves this by reversing the order: register first, publish second.

03Technical Architecture

The pattern uses two shared topics (request and response) plus an in-memory correlation map that stores pending promises keyed by UUID. The correlation map is populated before the request is published, guaranteeing that any response - no matter how fast - will find a waiting promise to resolve.

3.1 Communication Flow

StepActorActionTopic
1AgentGenerate UUID correlation IDN/A (local)
2AgentRegister promise in correlation map keyed by UUIDN/A (local)
3AgentPublish request message with correlation IDjil.fleet.requests
4HQConsume request, process, publish response with same correlation IDjil.fleet.responses
5AgentResponse consumer matches correlation ID, resolves promisejil.fleet.responses
6AgentAwaited promise resolves with response payloadN/A (local)

3.2 7-Gate Bootstrap Sequence

GateRequestResponseEncryption
Gate 1: HandshakeNode ID, version, capabilitiesApproved/rejected, assigned zonePlaintext
Gate 2: SecretsRequest secrets bundleNaCl-encrypted secrets (DB creds, API keys)NaCl box
Gate 3: ConfigRequest signed configSigned config bundle (validator.toml, zones.yaml)Signed
Gate 4: Image DigestLocal image digestsExpected digests from HQ manifestHMAC
Gate 5: Key VerifyChallenge-response for all 5 key typesVerification resultEd25519 signed
Gate 6: AuthorizationRequest consensus token24h time-limited authorization tokenAES-256-GCM
Gate 7: CompleteServices started confirmationNode marked consensus-readyHMAC

3.3 Timeout and Retry

Each correlation promise has a 30-second timeout. If the timeout expires, the promise is rejected with a TimeoutError, the correlation ID is cleaned from the map, and the bootstrap gate retries up to 3 times with exponential backoff. If all retries fail, the bootstrap sequence halts at the current gate and reports the failure to JILHQ.

04Implementation

4.1 Correlation Map

The correlation map is an in-memory Map<string, { resolve, reject, timer }> where each entry holds the promise callbacks and a timeout timer. When a response message arrives on the response topic, the consumer looks up the correlation ID in the map. If found, it resolves the promise with the response payload and clears the timeout timer. If not found (expired or duplicate), the response is silently discarded.

4.2 Pre-Emptive Registration

The registration function creates a new Promise, stores its resolve and reject callbacks in the correlation map, starts the timeout timer, and returns the Promise to the caller. Only after this function returns does the caller publish the request message. This ordering guarantee ensures that the response consumer always has a promise waiting before any response can arrive.

4.3 NaCl Secret Delivery (Gate 2)

The secrets bundle in Gate 2 is encrypted using NaCl authenticated encryption (crypto_box). The agent generates an ephemeral X25519 keypair at startup and includes the public key in the handshake (Gate 1). JILHQ encrypts the secrets bundle using the agent's ephemeral public key and HQ's static secret key. The agent decrypts using its ephemeral private key and HQ's known public key. The ephemeral keypair is discarded after secrets are received, ensuring forward secrecy.

4.4 Memory Management

The correlation map includes automatic cleanup: timeout handlers remove expired entries, successful resolutions clear entries immediately, and a periodic sweep (every 60 seconds) removes any orphaned entries older than 120 seconds. This prevents memory leaks from lost responses or programming errors.

05Integration with JIL Ecosystem

5.1 Fleet Communication

The correlation ID pattern is used beyond bootstrap for all synchronous fleet operations: key rotation requests, config updates, image digest verification, and remote control command acknowledgments. Every operation that requires a confirmed response uses the same pre-emptive promise pattern.

5.2 RedPanda Infrastructure

The request and response topics are standard RedPanda topics with configurable retention (default 1 hour for responses, 24 hours for requests). Partition keys are set to the node ID, ensuring that all messages for a single validator are processed in order by the same consumer partition.

5.3 AI Fleet Inspector

The inspector uses the correlation ID pattern to send challenge-response probes to validators as part of the security rule evaluation. A missed response within the timeout period contributes to the AVAIL_HEARTBEAT_GONE rule score, potentially triggering auto-remediation.

5.4 Validator Update Agent

The agent implements both sides of the pattern: as a requester during bootstrap (sending requests to HQ) and as a responder during operations (receiving remote control commands from HQ and sending acknowledgments). The same correlation map and promise infrastructure handles both directions.

Zero Additional Infrastructure: The correlation ID pattern adds request-response capability to the existing Kafka/RedPanda messaging infrastructure without any additional services, databases, or network channels. Every fleet operation - from bootstrap to remote control to health probes - runs over the same two pub-sub topics that are already deployed on every validator.

06Prior Art Differentiation

SystemPatternRace-SafeMulti-PhaseJIL Advantage
Kafka Reply-ToReply topic headerNo - subscribe after publishNo - single requestJIL registers promise before publish
RabbitMQ RPCExclusive reply queueYes - queue pre-createdNo - single requestJIL works on any pub-sub, not just RabbitMQ
gRPC UnaryHTTP/2 streamYes - connection-basedNo - needs new call per stepJIL needs no persistent connection
NATS Request-ReplyBuilt-in request/replyYesNo - single exchangeJIL chains multi-gate sequences over same topics
AWS Step FunctionsState machine orchestrationYesYesJIL needs no external orchestration service
Key Differentiator: JIL Sovereign is the first system to implement a pre-emptive promise registration pattern for race-condition-free request-response over pub-sub messaging, applied to a multi-phase secure bootstrap sequence with NaCl-encrypted secret delivery, signed configuration, challenge-response key verification, and time-limited authorization tokens - all over standard Kafka/RedPanda topics without additional infrastructure.

07Implementation Roadmap

Phase 1
Months 1 - 3

Core Pattern

Implement correlation map with pre-emptive promise registration. Deploy request and response topics on RedPanda. Build timeout and retry logic with exponential backoff. Integrate into 7-gate bootstrap sequence.

Phase 2
Months 4 - 6

Encrypted Channels

NaCl authenticated encryption for secret delivery. Signed configuration bundles with Ed25519 verification. HMAC authentication on all operational messages. Forward secrecy via ephemeral keypair exchange.

Phase 3
Months 7 - 9

Fleet Operations

Extend pattern to all fleet control operations. Batch correlation for multi-node commands. Inspector challenge-response probes. Config update acknowledgment flow.

Phase 4
Months 10 - 12

Resilience Hardening

Cross-datacenter topic replication for disaster recovery. Dead letter routing for undeliverable responses. Correlation map persistence for agent restart scenarios. Formal verification of race-freedom property.

08Patent Claim

Claim 34: A method for implementing synchronous request-response communication over asynchronous publish-subscribe messaging for multi-phase secure bootstrapping of distributed validator nodes, comprising: generating a unique correlation identifier for each request; pre-emptively registering a promise callback in an in-memory correlation map keyed by the correlation identifier before publishing the request message to a request topic; publishing the request message containing the correlation identifier to the request topic; consuming response messages from a response topic and matching each response to its pending promise via the correlation identifier; resolving the matched promise with the response payload to complete the synchronous exchange; applying configurable timeouts with automatic retry and exponential backoff for unresolved promises; and chaining multiple correlation-ID exchanges in sequence to implement a multi-gate bootstrap protocol comprising handshake, encrypted secret delivery using authenticated public-key encryption, signed configuration distribution, challenge-response key verification, and issuance of time-limited authorization tokens.