sp1_stark/record.rs
1use hashbrown::HashMap;
2
3use p3_field::AbstractField;
4
5/// A record that can be proven by a machine.
6pub trait MachineRecord: Default + Sized + Send + Sync + Clone {
7 /// The configuration of the machine.
8 type Config: 'static + Copy + Send + Sync;
9
10 /// The statistics of the record.
11 fn stats(&self) -> HashMap<String, usize>;
12
13 /// Appends two records together.
14 fn append(&mut self, other: &mut Self);
15
16 /// Registers the nonces of the record.
17 fn register_nonces(&mut self, _opts: &Self::Config) {}
18
19 /// Returns the public values of the record.
20 fn public_values<F: AbstractField>(&self) -> Vec<F>;
21}