Deneb review suggestions (2) (#4680)

* Serde deny unknown fields

* Require 0x prefix
This commit is contained in:
Paul Hauner
2023-09-06 05:49:57 +10:00
committed by GitHub
parent e783a40e01
commit 0bfc933c50
6 changed files with 22 additions and 9 deletions

View File

@@ -13,13 +13,14 @@ pub fn parse_point(point: &str) -> Result<Hash256, Error> {
}
#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct KZGComputeKZGProofInput {
pub blob: String,
pub z: String,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(bound = "E: EthSpec")]
#[serde(bound = "E: EthSpec", deny_unknown_fields)]
pub struct KZGComputeKZGProof<E: EthSpec> {
pub input: KZGComputeKZGProofInput,
pub output: Option<(String, Hash256)>,