taikoxyz / raiko

Multi-proofs for Taiko. SNARKS, STARKS and Trusted Execution Enclave. Our previous ZK-EVM circuits are deprecated.
Apache License 2.0
96 stars 75 forks source link

feat(prover): change GuestOutput and the zk committed value for onchain verification #282

Closed CeciliaZ030 closed 2 weeks ago

CeciliaZ030 commented 2 weeks ago

The zk provers should return the ProtocolInput hash to match the onchain verifier, when it fails to generate pi_hash the proof should just fail and ZkVM should exit. In that case, the GuestOutput::Failure will never be used and currently it's not used reasonably so we should just remove the case.

pub enum GuestOutput {
    Success {
        header: AlloyConsensusHeader,
        hash: B256,
    },
    Failure,
}

change to:

pub enum GuestOutput {
    header: AlloyConsensusHeader,
    hash: B256,
}

For verifier support, see https://github.com/taikoxyz/taiko-mono/pull/17215