Skip to content

Commit 270356a

Browse files
committed
Add curve identifier to ECDAS bus
1 parent f56b29e commit 270356a

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

prover/src/tables/ecdas.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn bus_interactions() -> Vec<BusInteraction> {
159159
let ts_hi = || packed(cols::TIMESTAMP_1);
160160
let mut out = Vec::new();
161161

162-
// Receive [ts, xA, yA, xG, yG, round, op].
162+
// Receive [id, ts, xA, yA, xG, yG, round, op].
163163
out.push(BusInteraction::receiver(
164164
BusId::Ecdas,
165165
mu(),
@@ -224,7 +224,7 @@ pub fn bus_interactions() -> Vec<BusInteraction> {
224224
vec![ts_lo(), ts_hi(), packed(cols::ROUND)],
225225
));
226226

227-
// Send the updated accumulator: [ts, xR, yR, xG, yG, round - 1 + next_op, next_op].
227+
// Send the updated accumulator: [id, ts, xR, yR, xG, yG, round - 1 + next_op, next_op].
228228
out.push(BusInteraction::sender(
229229
BusId::Ecdas,
230230
mu(),

prover/src/tables/ecsm.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,9 @@ pub fn bus_interactions() -> Vec<BusInteraction> {
591591
out
592592
}
593593

594-
/// Builds the ECDAS bus tuple `[ts_lo, ts_hi, accX(32), accY(32), genX(32), genY(32),
595-
/// round, op]`. Shared so the ECSM sender and the ECDAS receiver/sender pack it identically.
594+
/// Builds the ECDAS bus tuple `[id, ts_lo, ts_hi, accX(32), accY(32), genX(32), genY(32),
595+
/// round, op]`. `id` is the curve identifier (0 = secp256k1). Shared so the ECSM sender and
596+
/// the ECDAS receiver/sender pack it identically.
596597
#[allow(clippy::too_many_arguments)]
597598
pub fn ecdas_tuple(
598599
acc_x: usize,
@@ -604,7 +605,8 @@ pub fn ecdas_tuple(
604605
ts_lo: BusValue,
605606
ts_hi: BusValue,
606607
) -> Vec<BusValue> {
607-
let mut v = Vec::with_capacity(2 + 4 * 32 + 2);
608+
let mut v = Vec::with_capacity(1 + 2 + 4 * 32 + 2);
609+
v.push(BusValue::constant(0)); // id = 0 (secp256k1)
608610
v.push(ts_lo);
609611
v.push(ts_hi);
610612
v.extend(point_coord_busvalues(acc_x));

0 commit comments

Comments
 (0)