relayer/docs/ID.md
This document describes different IDs used in the relayer. There are 4 identifiers
UUID v7 for its time sortable property with strong uniqueness guarantee.v2 /POST, v2 /GETs).1:1 to External Request ID by Relayer.input-proof.Relayer includes in every log corresponding to a HTTP requestUUID v4 for its opaqueness, fully random property with strong uniqueness guaranteev2 /POST, v2 /GETs)X-Request-ID header.Kong creates on request and includes it in request/response logs.Relayer includes once at entry of HTTP handler along with Internal Request ID.Relayer-SDK includes 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 hash of payload for its determinism property
For public-decrypt , complete payload is considered.
For user-decrypt, payload after nullifying request_validity field 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-decryptRelationship:
1:1 to External Reference ID.Visibility for user: :x: No
Storage: :white_check_mark: Stored in database
Logging: Relayer includes it in logs related to indexing part of the flow.
v2 API.UUID v4 for its opaqueness, fully random property with strong uniqueness guaranteev2 : POST /user-decrypt, POST /public-decryptv2: POST /input-proof1:1 to Internal Public/User Decryption ID.1:1 to Internal Request ID.v2 POST /user-decrypt, POST /public-decrypt, POST /input-proof.v2 GET /user-decrypt, GET /user-decrypt, GET /input-proofRelayer includes 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:
1:1 to Internal Public/User Decryption Indexer ID.Visibility for user: :x: Not visible to user.
Storage: :white_check_mark: Stored in Indexer DB
Logging: Relayer includes 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:
1:1 to Internal Request ID.Visibility for user: :x: Not visible to user.
Storage: :white_check_mark: Stored in Indexer DB
Logging: Relayer includes it in logs related to event listening part of the flow until its mapped to Internal Request ID.