This document describes different IDs used in the relayer. There are 4 identifiers
- Internal Request ID
- External Request ID
- Internal Public/User Decryption Indexer IDs
- External Reference ID
- Gateway Public/User Decryption ID
- Gateway Input Proof ID
- Purpose: Track async parts of a HTTP Request internally in the relayer.
- Format:
UUID v7for its time sortable property with strong uniqueness guarantee. - Creation: By HTTP handler in application on every HTTP request (
v2 /POST,v2 /GETs). - Relationship: Mapped
1:1to External Request ID by Relayer. - Visibility for user: ❌ No
- Storage: Stored in Requests DB for
input-proof. - Logging:
Relayerincludes in every log corresponding to a HTTP request
- Purpose: Track a request across client, Cloudflare and Kong and relayer.
- Format:
UUID v4for its opaqueness, fully random property with strong uniqueness guarantee - Creation: By Kong plugin on every HTTP request (
v2 /POST,v2 /GETs) - Relationship: ???
- Visibility for user: ✅ Receives in each HTTP response, in
X-Request-IDheader. - Storage: ❌ Not stored in database.
- Logging:
Kongcreates on request and includes it in request/response logs.Relayerincludes once at entry of HTTP handler along with Internal Request ID.Relayer-SDKincludes it logs when response is received.
-
Purpose: Deduplicate public/user-decryption requests based on payload content. One for each public and user decryption.
-
Format:
XXH3 hashof payload for its determinism property-
For
public-decrypt, complete payload is considered. -
For
user-decrypt, payload after nullifyingrequest_validityfield is used.Request Validity field is defined to ensure relayer forwards the request to Gateway chain before this validity expires. However, if it was processed successfully once and indexed, we look up the result from indexer and this field can be safely ignored.
-
-
Creation: By HTTP handler in application, on first occurrence of the request
v2:POST /user-decrypt,POST /public-decrypt
-
Relationship:
- For user/public-decryption requests, mapped
1:1to External Reference ID.
- For user/public-decryption requests, mapped
-
Visibility for user: ❌ No
-
Storage: ✅ Stored in database
-
Logging:
Relayerincludes it in logs related to indexing part of the flow.
- Purpose: Referenced by client for polling results in
v2API. - Format:
UUID v4for its opaqueness, fully random property with strong uniqueness guarantee - Creation: By HTTP handler in application,
- Created on first request for a payload. On subsequent requests, it's fetched from DB using Internal Public/User Decryption Indexer ID
v2:POST /user-decrypt,POST /public-decrypt
- Created on every request for
v2:POST /input-proof
- Created on first request for a payload. On subsequent requests, it's fetched from DB using Internal Public/User Decryption Indexer ID
- Relationship:
- For user/public-decryption requests, mapped
1:1to Internal Public/User Decryption ID. - For input-proof requests, mapped
1:1to Internal Request ID.
- For user/public-decryption requests, mapped
- Visibility for user: ✅
- Received in Response:
v2POST /user-decrypt,POST /public-decrypt,POST /input-proof. - Used in Requests:
v2GET /user-decrypt,GET /user-decrypt,GET /input-proof
- Received in Response:
- Storage: ✅ Stored in Indexer DB
- Logging:
Relayerincludes once at creation of indexer entry and once in the HTTP handler of GET request.
-
Purpose: Referenced on gateway chain to map user / public decryption request to responses.
-
Format:
Number, scheme is opaque to relayer. -
Creation: By Decryption Manager contract on Gateway Chain on successful user / public decryption request.
-
Relationship:
- For User/Public-decryption requests, mapped
1:1to Internal Public/User Decryption Indexer ID.
- For User/Public-decryption requests, mapped
-
Visibility for user: ❌ Not visible to user.
- Could be included in responses.
-
Storage: ✅ Stored in Indexer DB
-
Logging:
Relayerincludes it in logs related to event listening part of the flow until its mapped to Internal Public/User Decryption Indexer ID.
-
Purpose: Referenced on gateway chain to map input proof request to responses.
-
Format:
Number, scheme is opaque to relayer. -
Creation: By Input Proof contract on Gateway Chain on successful user / public decryption request.
-
Relationship:
- For Input proof requests, mapped
1:1to Internal Request ID.
- For Input proof requests, mapped
-
Visibility for user: ❌ Not visible to user.
- Could be included in responses.
-
Storage: ✅ Stored in Indexer DB
-
Logging:
Relayerincludes it in logs related to event listening part of the flow until its mapped to Internal Request ID.