mirror of
https://github.com/eth-act/ere.git
synced 2026-04-25 03:00:10 -04:00
zkvm-interface: allow dynamic dispatch in zkVM trait (#52)
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This commit is contained in:
@@ -104,11 +104,11 @@ impl zkVM for EreJolt {
|
||||
}
|
||||
}
|
||||
|
||||
fn name() -> &'static str {
|
||||
fn name(&self) -> &'static str {
|
||||
NAME
|
||||
}
|
||||
|
||||
fn sdk_version() -> &'static str {
|
||||
fn sdk_version(&self) -> &'static str {
|
||||
SDK_VERSION
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,11 +165,11 @@ impl zkVM for EreOpenVM {
|
||||
.map_err(zkVMError::from)
|
||||
}
|
||||
|
||||
fn name() -> &'static str {
|
||||
fn name(&self) -> &'static str {
|
||||
NAME
|
||||
}
|
||||
|
||||
fn sdk_version() -> &'static str {
|
||||
fn sdk_version(&self) -> &'static str {
|
||||
SDK_VERSION
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,11 +128,11 @@ impl zkVM for ErePico {
|
||||
todo!("Verification method missing from sdk")
|
||||
}
|
||||
|
||||
fn name() -> &'static str {
|
||||
fn name(&self) -> &'static str {
|
||||
NAME
|
||||
}
|
||||
|
||||
fn sdk_version() -> &'static str {
|
||||
fn sdk_version(&self) -> &'static str {
|
||||
SDK_VERSION
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,11 +124,11 @@ impl zkVM for EreRisc0 {
|
||||
.map_err(|err| zkVMError::Other(Box::new(err)))
|
||||
}
|
||||
|
||||
fn name() -> &'static str {
|
||||
fn name(&self) -> &'static str {
|
||||
NAME
|
||||
}
|
||||
|
||||
fn sdk_version() -> &'static str {
|
||||
fn sdk_version(&self) -> &'static str {
|
||||
SDK_VERSION
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,11 +215,11 @@ impl zkVM for EreSP1 {
|
||||
client.verify(&proof, &self.vk).map_err(zkVMError::from)
|
||||
}
|
||||
|
||||
fn name() -> &'static str {
|
||||
fn name(&self) -> &'static str {
|
||||
NAME
|
||||
}
|
||||
|
||||
fn sdk_version() -> &'static str {
|
||||
fn sdk_version(&self) -> &'static str {
|
||||
SDK_VERSION
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,11 +248,11 @@ impl zkVM for EreZisk {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn name() -> &'static str {
|
||||
fn name(&self) -> &'static str {
|
||||
NAME
|
||||
}
|
||||
|
||||
fn sdk_version() -> &'static str {
|
||||
fn sdk_version(&self) -> &'static str {
|
||||
SDK_VERSION
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ pub trait zkVM {
|
||||
fn verify(&self, proof: &[u8]) -> Result<(), zkVMError>;
|
||||
|
||||
/// Returns the name of the zkVM
|
||||
fn name() -> &'static str;
|
||||
fn name(&self) -> &'static str;
|
||||
|
||||
/// Returns the version of the zkVM SDK (e.g. 0.1.0)
|
||||
fn sdk_version() -> &'static str;
|
||||
fn sdk_version(&self) -> &'static str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user