Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge TraceLayout into TraceInfo #245

Merged
merged 31 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3342acf
air: `TraceInfo` no longer uses `TraceLayout`
plafer Feb 15, 2024
23bdeb2
prover: propagate `TraceInfo` changes
plafer Feb 15, 2024
ebb1ced
examples: propagate change
plafer Feb 15, 2024
606a0ff
fix context serialization test
plafer Feb 15, 2024
1076a7d
revert `TraceTable` name changes
plafer Feb 15, 2024
44da0d4
test: `TraceInfo::to_elements()`
plafer Feb 15, 2024
520bb9b
remove `TraceLayout`
plafer Feb 15, 2024
6bc46ba
clippy
plafer Feb 15, 2024
0d41ad8
fix comment
plafer Feb 15, 2024
c7d888d
bytes_to_element_with_padding
plafer Feb 15, 2024
564da7c
use `vec![]` instead of `Vec::new()`
plafer Feb 15, 2024
3e0122c
docstring: `TraceInfo::new_multi_segment`
plafer Feb 20, 2024
c31d18c
`get_trace_info()` -> `trace_info()`
plafer Feb 20, 2024
a0fdbfc
Rename Trace::get_info
plafer Feb 20, 2024
b27664b
fmt
plafer Feb 20, 2024
d85700a
Reintroduce `Trace::length`
plafer Feb 20, 2024
eef2453
Fix docstrings
plafer Feb 20, 2024
f854979
Use `Trace::length()`
plafer Feb 20, 2024
9cdd508
Reintroduce `Trace::{main,aux}_trace_width()`
plafer Feb 20, 2024
9d3296f
update docstrings
plafer Feb 20, 2024
81cde9d
reorg `StarkField` methods
plafer Feb 20, 2024
8359b00
Introduce `StarkField::from_byte_vec_with_padding`
plafer Feb 20, 2024
44b4961
Use `StarkField::from_byte_vec_with_padding`
plafer Feb 20, 2024
2ac004c
docstring
plafer Feb 21, 2024
0f189b2
docstring fix
plafer Feb 21, 2024
8acf5c8
fix internal section separator
plafer Feb 21, 2024
b428665
add comment
plafer Feb 21, 2024
e7d2511
Change `from_bytes_with_padding` signature
plafer Feb 21, 2024
2071fc4
Merge remote-tracking branch 'upstream/main' into plafer-merge-trace-…
plafer Feb 21, 2024
35742d6
rename fn
plafer Feb 21, 2024
5f945a5
fix typo
plafer Feb 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions air/src/air/boundary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ impl<E: FieldElement> BoundaryConstraints<E> {
);

let trace_length = context.trace_info.length();
let main_trace_width = context.trace_info.layout().main_trace_width();
let aux_trace_width = context.trace_info.layout().aux_trace_width();
let main_trace_width = context.trace_info.main_trace_width();
let aux_trace_width = context.trace_info.aux_trace_width();

// make sure the assertions are valid in the context of their respective trace segments;
// also, sort the assertions in the deterministic order so that changing the order of
Expand Down
11 changes: 2 additions & 9 deletions air/src/air/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use math::{fft, ExtensibleField, ExtensionOf, FieldElement, StarkField, ToElemen
use utils::collections::*;

mod trace_info;
pub use trace_info::{TraceInfo, TraceLayout};
pub use trace_info::TraceInfo;

mod context;
pub use context::AirContext;
Expand Down Expand Up @@ -390,12 +390,6 @@ pub trait Air: Send + Sync {
self.context().trace_info.length()
}

/// Returns a description of how execution trace columns are arranged into segments for
/// an instance of a computation described by this AIR.
fn trace_layout(&self) -> &TraceLayout {
self.context().trace_info.layout()
}

/// Returns degree of trace polynomials for an instance of the computation described by
/// this AIR.
///
Expand Down Expand Up @@ -476,8 +470,7 @@ pub trait Air: Send + Sync {
E: FieldElement<BaseField = Self::BaseField>,
R: RandomCoin<BaseField = Self::BaseField>,
{
let num_elements =
self.trace_info().layout().get_aux_segment_rand_elements(aux_segment_idx);
let num_elements = self.trace_info().get_aux_segment_rand_elements(aux_segment_idx);
let mut result = Vec::with_capacity(num_elements);
for _ in 0..num_elements {
result.push(public_coin.draw()?);
Expand Down
Loading
Loading