0xPolygonMiden / miden-base

Core components of the Polygon Miden rollup
MIT License
68 stars 41 forks source link

Introduce `TransactionProver` trait #859

Closed bobbinth closed 2 weeks ago

bobbinth commented 2 weeks ago

Currently, we have a TransactionProver struct which is used to generate proofs for executed transactions. This struct essentially just invokes the prove() method from miden-prover in the same process. However, it would be beneficial to add a layer of abstraction here to support things like https://github.com/0xPolygonMiden/miden-client/issues/366. Specifically, I think we should:

The trait itself could be pretty simple:

pub trait TransactionProver {
    #[maybe_async]
    fn prove(
        &self,
        transaction: impl Into<TransactionWitness>
    ) -> Result<ProvenTransaction, TransactionProverError>;
}
bobbinth commented 2 weeks ago

Closed by #865.