Normalize an HTTPS outcall before ICP replicas compare it
An HTTP endpoint can send an identical quote with a different Date header to each replica. A transform can remove variability that has no meaning for the application.
Define the consensus payload
For a quote shaped as a JSON object, parse the expected fields, validate their type and encode them in one deterministic representation. Drop the Date header if it plays no role in validation. Preserve the HTTP status so an error response cannot pass as an ordinary quote.
replica A: {"rate":5}, Date: 12:01:01
replica B: {"rate":5}, Date: 12:01:02
transform: keep status and canonical rate bytes
Test meaningful disagreement
Replay responses with different header ordering, then change the rate from 5 to 6. The first change should yield identical transformed bytes. The second must remain visible. Consensus on a normalized response establishes agreement among replicas and cannot establish the accuracy of the upstream price.