From 36e0e81ec27e4d8ff5eb680b7cf0797990eb5a17 Mon Sep 17 00:00:00 2001 From: smtmfft Date: Wed, 31 Jan 2024 17:33:07 +0800 Subject: [PATCH] use hex instead of base64 Signed-off-by: smtmfft --- raiko-guest/src/one_shot.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/raiko-guest/src/one_shot.rs b/raiko-guest/src/one_shot.rs index fba30e294..d0ee473b7 100644 --- a/raiko-guest/src/one_shot.rs +++ b/raiko-guest/src/one_shot.rs @@ -38,8 +38,7 @@ pub const PRIV_KEY_FILENAME: &str = "priv.key"; struct BootstrapData { public_key: String, new_instance: Address, - #[serde(with = "Base64Standard")] - quote: Vec, + quote: String, } fn save_priv_key(key_pair: &KeyPair, privkey_path: &PathBuf) -> Result<()> { @@ -73,7 +72,7 @@ fn save_bootstrap_details( let bootstrap_details = BootstrapData { public_key: format!("0x{}", key_pair.public_key().to_string()), new_instance, - quote, + quote: hex::encode(quote), }; let json = serde_json::to_string_pretty(&bootstrap_details)?; fs::write(bootstrap_details_file_path, json).context(format!(