1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
pub use ;
pub use ;
// CONSTANTS
// ================================================================================================
/// The minimum length of the execution trace. This is the minimum required to support range checks.
pub const MIN_TRACE_LEN: usize = 64;
// MAIN TRACE LAYOUT
// ------------------------------------------------------------------------------------------------
// system decoder stack range checks chiplets
// (6 columns) (24 columns) (19 columns) (2 columns) (21 columns)
// ├───────────────┴───────────────┴───────────────┴───────────────┴─────────────────┤
pub const SYS_TRACE_WIDTH: usize = 6;
pub const DECODER_TRACE_WIDTH: usize = 24;
pub const STACK_TRACE_WIDTH: usize = 19;
// Range check trace
pub const RANGE_CHECK_TRACE_WIDTH: usize = 2;
// Chiplets trace
// s_00 + s_01 + chip_clk + 4 selectors + 15 shared chiplet data columns = 22.
// `chip_clk` is the chiplet-trace row counter (value `row_index + 1`); it sources the
// hasher responder address on the chiplet side.
pub const CHIPLETS_WIDTH: usize = 22;
pub const TRACE_WIDTH: usize = SYS_TRACE_WIDTH
+ DECODER_TRACE_WIDTH
+ STACK_TRACE_WIDTH
+ RANGE_CHECK_TRACE_WIDTH
+ CHIPLETS_WIDTH;
// AUXILIARY COLUMNS LAYOUT
// ------------------------------------------------------------------------------------------------
//
// The auxiliary trace is the LogUp lookup-argument segment built per-AIR by `CoreAir`'s
// and `ChipletsAir`'s `build_aux_trace`: 4 main-trace LogUp columns for Core and 3
// chiplet-trace LogUp columns for Chiplets. See
// [`crate::constraints::lookup::main_air::MainLookupAir`] and
// [`crate::constraints::lookup::chiplet_air::emit_chiplet_lookup_columns`] for the
// per-column contents.
/// Auxiliary trace segment width — see the LogUp aux trace layout above.
pub const AUX_TRACE_WIDTH: usize = crateLOGUP_AUX_TRACE_WIDTH;
/// Number of random challenges used for auxiliary trace constraints.
pub const AUX_TRACE_RAND_CHALLENGES: usize = 2;
/// Bus message coefficient indices.
///
/// These define the standard positions for encoding bus messages using the pattern:
/// `bus_prefix[bus] + sum(beta_powers\[i\] * elem\[i\])` where:
/// - `bus_prefix[bus]` is the per-bus domain-separated base (see `BusId` in
/// `constraints::lookup::logup_msg`)
/// - `beta_powers\[i\] = beta^i` are the powers of beta
///
/// These indices refer to positions in the `beta_powers` array, not including the bus prefix.
///
/// This layout is shared between:
/// - AIR constraint builders (symbolic expressions): `Challenges<AB::ExprEF>`
/// - Processor auxiliary trace builders (concrete field elements): `Challenges<E>`