Skip to content

Conversation

@ameba23
Copy link
Collaborator

@ameba23 ameba23 commented Nov 19, 2025

JSON is not good for encoding binary - so use SCALE for encoding AttestationPayload.

I chose this because it is very simple and actually matches how TDX quotes are encoded, meaning we already had it as a dependency - as dcap-qvl uses it: https://github.com/Phala-Network/dcap-qvl/blob/9cf169c3c4985c747dab116f6ff953c1c16cb8c3/src/quote.rs#L5

The attestation type enum is first encoded as a string, not a variant number - which i thought might be better for interoperability or backwards compatibility.

@ameba23 ameba23 merged commit 03b9f86 into main Nov 20, 2025
2 checks passed
@ameba23 ameba23 deleted the peg/attestation-encoding branch November 20, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant