mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-06 15:53:10 +00:00
Add prover_data method
This commit is contained in:
parent
11bdd501c8
commit
00c439513a
@ -836,15 +836,8 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
[(); C::Hasher::HASH_SIZE]:,
|
||||
{
|
||||
// TODO: Can skip parts of this.
|
||||
let CircuitData {
|
||||
prover_only,
|
||||
common,
|
||||
..
|
||||
} = self.build();
|
||||
ProverCircuitData {
|
||||
prover_only,
|
||||
common,
|
||||
}
|
||||
let circuit_data = self.build();
|
||||
circuit_data.prover_data()
|
||||
}
|
||||
|
||||
/// Builds a "verifier circuit", with data needed to verify proofs but not generate them.
|
||||
@ -853,14 +846,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
[(); C::Hasher::HASH_SIZE]:,
|
||||
{
|
||||
// TODO: Can skip parts of this.
|
||||
let CircuitData {
|
||||
verifier_only,
|
||||
common,
|
||||
..
|
||||
} = self.build();
|
||||
VerifierCircuitData {
|
||||
verifier_only,
|
||||
common,
|
||||
}
|
||||
let circuit_data = self.build();
|
||||
circuit_data.verifier_data()
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,6 +151,18 @@ impl<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, const D: usize>
|
||||
common,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prover_data(self) -> ProverCircuitData<F, C, D> {
|
||||
let CircuitData {
|
||||
prover_only,
|
||||
common,
|
||||
..
|
||||
} = self;
|
||||
ProverCircuitData {
|
||||
prover_only,
|
||||
common,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Circuit data required by the prover. This may be thought of as a proving key, although it
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user