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

opt: add another bytecode circuit to improve super circuit capacity #1368

Merged
merged 108 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 102 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
aa199bd
add bytecode_table1 in evm circuit
DreamWuGit Jul 18, 2024
3ff9f7f
update input_exprs
DreamWuGit Jul 18, 2024
711e652
SameContextGadget add is_first_bytecode_table cell
DreamWuGit Jul 18, 2024
8ec42a9
update some opcodes
DreamWuGit Jul 18, 2024
d6e3cd4
modify assign_exec_step
DreamWuGit Jul 19, 2024
54a3168
assign_exec_step with block, call
DreamWuGit Jul 19, 2024
40df3d9
adjust block, call input position
DreamWuGit Jul 19, 2024
5315786
update opcodes
DreamWuGit Jul 19, 2024
59b93d2
update jump for destination lookup
DreamWuGit Jul 19, 2024
f9e1b4f
update jumpi
DreamWuGit Jul 19, 2024
87297de
fix jumpi
DreamWuGit Jul 21, 2024
299dac0
super circuit add bytecode circuit
DreamWuGit Jul 22, 2024
4eecb14
copy event add flag is_first_bytecode_circuit
DreamWuGit Jul 22, 2024
a27e41e
rename copy event/table new field
DreamWuGit Jul 22, 2024
b1fa3cf
modify table_row addr position
DreamWuGit Jul 23, 2024
5807ed0
constrain copy circuit new column
DreamWuGit Jul 23, 2024
ce03dee
conditionally lookup second bytecode table in copy circuit
DreamWuGit Jul 24, 2024
603ed4e
copy circuit refactor two table lookup into one
DreamWuGit Jul 24, 2024
12700e6
sync to develop branch
DreamWuGit Jul 25, 2024
c301908
revert CopyEvent change
DreamWuGit Jul 25, 2024
fb6c9c2
add algorithm find_two_closest_subset, remove old
DreamWuGit Jul 25, 2024
1ee185e
apply find_two_closest_subset for block bytecodes
DreamWuGit Jul 26, 2024
5613f90
modify copy circuit assign with bytecode_map
DreamWuGit Jul 26, 2024
f875411
add one more bytecode_table into evm circuit
DreamWuGit Jul 27, 2024
c1d2f72
supercircuit: get each sub circuit bytecodes and construct
DreamWuGit Jul 27, 2024
cd2b8e1
add feature: dual_bytecode
DreamWuGit Jul 28, 2024
8551505
updates per feature
DreamWuGit Jul 29, 2024
ad82e06
fix feature related
DreamWuGit Jul 29, 2024
ecb3ae8
update param per new feature
DreamWuGit Jul 29, 2024
5194bb2
change program_counter_offset to expression
DreamWuGit Jul 30, 2024
32d000e
fix stop gadget byte lookup
DreamWuGit Jul 30, 2024
51790f7
remove comment
DreamWuGit Jul 30, 2024
ddd4ca7
Merge branch 'develop' into bytecode_refactor
DreamWuGit Jul 30, 2024
8098a48
add feature dual_bytecode to scroll
DreamWuGit Jul 30, 2024
83da72b
Merge branch 'bytecode_refactor' of https://github.com/scroll-tech/zk…
DreamWuGit Jul 30, 2024
db71f72
fix types
DreamWuGit Jul 30, 2024
7f6b2d7
fix copy circuit test
DreamWuGit Jul 31, 2024
e3799b4
fix copytable lookup
DreamWuGit Jul 31, 2024
d2abb7f
add feature control
DreamWuGit Jul 31, 2024
028a273
update err msg
DreamWuGit Jul 31, 2024
d497f60
fix return_revert opcode lookup
DreamWuGit Jul 31, 2024
1e93155
update call lookup per feature
DreamWuGit Jul 31, 2024
03fc234
update common error gadget
DreamWuGit Jul 31, 2024
900c336
add BytecodeLengthGadget handle bytelen lookup
DreamWuGit Aug 1, 2024
e2f4db5
update invalidjumpi
DreamWuGit Aug 1, 2024
f5ef8ca
fix CommonErrorGadget
DreamWuGit Aug 1, 2024
efd85b2
update create/return
DreamWuGit Aug 1, 2024
8dcf14e
misc updates
DreamWuGit Aug 1, 2024
c75e748
temp fix error jump
DreamWuGit Aug 1, 2024
63d0475
mark feature
DreamWuGit Aug 2, 2024
e7f490e
refactor & fix extcodecopy regarding bytelength gadget
DreamWuGit Aug 2, 2024
acac805
fix return_data test
DreamWuGit Aug 2, 2024
cfbfe3c
add missing feature
DreamWuGit Aug 2, 2024
b039eee
update ErrorPrecompileFailed
DreamWuGit Aug 2, 2024
52acac9
fix extcodecopy non existing address
DreamWuGit Aug 3, 2024
caad244
revise lookup_opcode
DreamWuGit Aug 5, 2024
da3ace2
modify copy circuit try to fix
DreamWuGit Aug 5, 2024
73298d4
remove feature on err msg
DreamWuGit Aug 5, 2024
a36461a
clean up debug info
DreamWuGit Aug 7, 2024
e3e937c
extract helpers to get bytecode and map info
DreamWuGit Aug 7, 2024
3e69657
fix type
DreamWuGit Aug 7, 2024
f2a35a2
modify BytecodeCircuit::<Fr>::min_num_rows_block to return max rows
DreamWuGit Aug 7, 2024
5eaf47d
fix default build
DreamWuGit Aug 7, 2024
ce6b463
use BytecodeLengthGadget
DreamWuGit Aug 8, 2024
573b86b
add feature
DreamWuGit Aug 8, 2024
8749437
use lookup_opcode
DreamWuGit Aug 8, 2024
a3a88de
remvoe is_code parameter
DreamWuGit Aug 8, 2024
068a312
remove outdated
DreamWuGit Aug 8, 2024
cdb9221
update comment
DreamWuGit Aug 8, 2024
933df22
refactor lookup_opcode_with_push_rlc helper
DreamWuGit Aug 9, 2024
0619b79
fix some clippy, remaining some
DreamWuGit Aug 9, 2024
fb46b88
fix clippy
DreamWuGit Aug 9, 2024
121a5aa
refactor is_first_bytecode_table
DreamWuGit Aug 9, 2024
e15a29e
update helper names
DreamWuGit Aug 9, 2024
3dbd977
add BytecodeLookupGadget for opcodes that don't use samecontext gadget
DreamWuGit Aug 12, 2024
588420e
create/return use BytecodeLookupGadget
DreamWuGit Aug 12, 2024
1d9bc91
error precompile use BytecodeLookupGadget
DreamWuGit Aug 12, 2024
60fb665
BytecodeLengthGadget adds is_first_bytecode_table cell
DreamWuGit Aug 13, 2024
4fa3e1a
stop use BytecodeLookupGadget
DreamWuGit Aug 13, 2024
d61401a
remove feature for bytecode_map
DreamWuGit Aug 13, 2024
2294656
fix bytecode_map
DreamWuGit Aug 13, 2024
4e0e532
samecontext etc remove feature
DreamWuGit Aug 13, 2024
3508e3e
remove some feature cfg
DreamWuGit Aug 14, 2024
9191c93
byte length gadget assign etc.
DreamWuGit Aug 14, 2024
a2fd554
fix clippy
DreamWuGit Aug 14, 2024
1d67f4a
update bytecode len gadget constraint
DreamWuGit Aug 14, 2024
cb32403
fix fmt
DreamWuGit Aug 14, 2024
1295da5
remove wrong constraint
DreamWuGit Aug 14, 2024
169e6c7
sync upstream & conflict fix
DreamWuGit Aug 19, 2024
09c16c2
fix failures
DreamWuGit Aug 19, 2024
62189ac
remove program_counter_offset and local rand test pass
DreamWuGit Aug 21, 2024
c7aa565
figure out why combination bytecode table not work and remove comment
DreamWuGit Aug 23, 2024
e2312de
add rows_required helper
DreamWuGit Aug 26, 2024
5fefdcd
try use greedy_simple_partition
DreamWuGit Aug 29, 2024
922665b
Merge branch 'develop' into bytecode_refactor
DreamWuGit Aug 29, 2024
ae26cba
tmp remove dual_bytecode from scroll feature list
DreamWuGit Aug 29, 2024
0054cf1
Merge branch 'bytecode_refactor' of https://github.com/scroll-tech/zk…
DreamWuGit Aug 29, 2024
8352d77
restore dual_bytecode in scroll feature list
DreamWuGit Aug 30, 2024
e71abd6
revise comment
DreamWuGit Aug 30, 2024
2ee6d59
greedy_simple_partition with generic type
DreamWuGit Aug 30, 2024
b7a52fe
replace log::error
DreamWuGit Aug 30, 2024
5e840fa
add comment to explain stable sort helper
DreamWuGit Sep 2, 2024
0786aca
rename feature dual-bytecode
DreamWuGit Sep 4, 2024
6d28019
minor updates
DreamWuGit Sep 4, 2024
8d85582
some minor change per review
DreamWuGit Sep 4, 2024
7fd191a
clean up extcodecopy's is_first_bytecode_table
DreamWuGit Sep 4, 2024
9da9b6d
Merge branch 'develop' into bytecode_refactor
roynalnaruto Sep 6, 2024
dc10c1c
clean up
DreamWuGit Sep 6, 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: 3 additions & 1 deletion zkevm-circuits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ paste = "1.0"
default = ["test", "test-circuits", "debug-annotations", "parallel_syn"]
test = ["mock", "bus-mapping/test"]

scroll = ["bus-mapping/scroll", "eth-types/scroll", "mock?/scroll", "zktrie", "poseidon-codehash"]
scroll = ["bus-mapping/scroll", "eth-types/scroll", "mock?/scroll", "zktrie", "poseidon-codehash", "dual_bytecode"]
DreamWuGit marked this conversation as resolved.
Show resolved Hide resolved

strict-ccc = ["bus-mapping/strict-ccc"]
test-circuits = []
Expand All @@ -71,3 +71,5 @@ debug-annotations = []
enable-stack = ["bus-mapping/enable-stack"]
enable-memory = ["bus-mapping/enable-memory"]
enable-storage = ["bus-mapping/enable-storage"]
dual_bytecode = []
DreamWuGit marked this conversation as resolved.
Show resolved Hide resolved

50 changes: 41 additions & 9 deletions zkevm-circuits/src/bytecode_circuit/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use halo2_proofs::{
plonk::{Advice, Column, ConstraintSystem, Error, Expression, Fixed, VirtualCells},
poly::Rotation,
};
use std::vec;
use std::{cmp::max, vec};

use super::{
bytecode_unroller::{unroll_with_codehash, BytecodeRow, UnrolledBytecode},
Expand Down Expand Up @@ -1014,6 +1014,22 @@ impl<F: Field> BytecodeCircuit<F> {
.collect();
Self::new(bytecodes, bytecode_size)
}

#[cfg(feature = "dual_bytecode")]
/// Creates bytecode sub circuit from block, is_first_bytecode indicates first or second
/// sub bytecode circuit.
pub fn new_from_block_for_dual_circuit(
block: &witness::Block,
is_first_bytecode: bool,
) -> Self {
let bytecodes: Vec<UnrolledBytecode<F>> = block
.bytecodes
.iter()
.filter(|code| block.is_first_sub_bytecode_circuit(code.0) == is_first_bytecode)
.map(|(codehash, b)| unroll_with_codehash(*codehash, b.bytes.clone()))
.collect();
Self::new(bytecodes, block.circuits_params.max_bytecode)
}
}

impl<F: Field> SubCircuit<F> for BytecodeCircuit<F> {
Expand All @@ -1038,14 +1054,30 @@ impl<F: Field> SubCircuit<F> for BytecodeCircuit<F> {

/// Return the minimum number of rows required to prove the block
fn min_num_rows_block(block: &witness::Block) -> (usize, usize) {
(
block
.bytecodes
.values()
.map(|bytecode| bytecode.bytes.len() + 1)
.sum(),
block.circuits_params.max_bytecode,
)
if block.bytecode_map.is_some() {
DreamWuGit marked this conversation as resolved.
Show resolved Hide resolved
// when enable feature "dual_bytecode", get two sets of bytecodes here.
let (first_bytecodes, second_bytecodes) = block.get_bytecodes_for_dual_sub_circuits();
let minimum_row: usize = max(
first_bytecodes
.iter()
.map(|bytecode| bytecode.rows_required())
.sum(),
second_bytecodes
.iter()
.map(|bytecode| bytecode.rows_required())
.sum(),
);
(minimum_row, block.circuits_params.max_bytecode)
} else {
(
block
.bytecodes
.values()
.map(|bytecode| bytecode.rows_required())
.sum(),
block.circuits_params.max_bytecode,
)
}
}

/// Make the assignments to the TxCircuit
Expand Down
119 changes: 104 additions & 15 deletions zkevm-circuits/src/copy_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ use crate::{

use self::copy_gadgets::{
constrain_address, constrain_bytes_left, constrain_event_rlc_acc, constrain_first_last,
constrain_forward_parameters, constrain_is_memory_copy, constrain_is_pad, constrain_mask,
constrain_masked_value, constrain_must_terminate, constrain_non_pad_non_mask,
constrain_rw_counter, constrain_rw_word_complete, constrain_tag, constrain_value_rlc,
constrain_word_index, constrain_word_rlc,
constrain_forward_parameters, constrain_is_first_bytecode_table, constrain_is_memory_copy,
constrain_is_pad, constrain_mask, constrain_masked_value, constrain_must_terminate,
constrain_non_pad_non_mask, constrain_rw_counter, constrain_rw_word_complete, constrain_tag,
constrain_value_rlc, constrain_word_index, constrain_word_rlc,
};

/// The current row.
Expand Down Expand Up @@ -122,13 +122,19 @@ pub struct CopyCircuitConfig<F> {
pub is_word_end: IsEqualConfig<F>,
/// non pad and non mask witness to reduce the degree of lookups.
pub non_pad_non_mask: Column<Advice>,
#[cfg(feature = "dual_bytecode")]
/// Whether the bytecode is belong to the first bytecode sub circuit .
pub is_first_bytecode_table: Column<Advice>,
// External tables
/// TxTable
pub tx_table: TxTable,
/// RwTable
pub rw_table: RwTable,
/// BytecodeTable
pub bytecode_table: BytecodeTable,
#[cfg(feature = "dual_bytecode")]
/// BytecodeTable1
pub bytecode_table1: BytecodeTable,
}

/// Circuit configuration arguments
Expand All @@ -139,6 +145,9 @@ pub struct CopyCircuitConfigArgs<F: Field> {
pub rw_table: RwTable,
/// BytecodeTable
pub bytecode_table: BytecodeTable,
#[cfg(feature = "dual_bytecode")]
/// BytecodeTable1
pub bytecode_table1: BytecodeTable,
/// CopyTable
pub copy_table: CopyTable,
/// q_enable
Expand All @@ -158,6 +167,8 @@ impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F> {
tx_table,
rw_table,
bytecode_table,
#[cfg(feature = "dual_bytecode")]
bytecode_table1,
copy_table,
q_enable,
challenges,
Expand All @@ -176,6 +187,8 @@ impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F> {
let [is_pad, is_tx_calldata, is_bytecode, is_memory, is_memory_copy, is_tx_log, is_access_list_address, is_access_list_storage_key] =
array_init(|_| meta.advice_column());
let is_first = copy_table.is_first;
#[cfg(feature = "dual_bytecode")]
let is_first_bytecode_table = meta.advice_column();
let id = copy_table.id;
let addr = copy_table.addr;
let src_addr_end = copy_table.src_addr_end;
Expand All @@ -193,6 +206,9 @@ impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F> {
tx_table.annotate_columns(meta);
rw_table.annotate_columns(meta);
bytecode_table.annotate_columns(meta);
#[cfg(feature = "dual_bytecode")]
bytecode_table1.annotate_columns(meta);

copy_table.annotate_columns(meta);

let is_id_unchange = IsEqualChip::configure_with_value_inv(
Expand Down Expand Up @@ -384,6 +400,9 @@ impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F> {
is_memory_copy,
);
constrain_rw_word_complete(cb, is_last_step, is_rw_word_type.expr(), is_word_end);

#[cfg(feature = "dual_bytecode")]
constrain_is_first_bytecode_table(cb, meta, is_first_bytecode_table, is_last_col);
}

cb.gate(meta.query_fixed(q_enable, CURRENT))
Expand Down Expand Up @@ -444,11 +463,22 @@ impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F> {
.collect()
});

// lookup first bytecode table
meta.lookup_any("Bytecode lookup", |meta| {
let cond = meta.query_fixed(q_enable, CURRENT)
#[cfg(feature = "dual_bytecode")]
let is_first_bytecode = meta.query_advice(is_first_bytecode_table, CURRENT);

let mut cond = meta.query_fixed(q_enable, CURRENT)
* meta.query_advice(is_bytecode, CURRENT)
* meta.query_advice(non_pad_non_mask, CURRENT);

#[cfg(feature = "dual_bytecode")]
{
cond = cond * is_first_bytecode.expr();
}

let table_expr = bytecode_table.table_exprs_mini(meta);

vec![
1.expr(),
meta.query_advice(id, CURRENT),
Expand All @@ -457,12 +487,37 @@ impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F> {
meta.query_advice(value, CURRENT),
]
.into_iter()
.zip_eq(bytecode_table.table_exprs_mini(meta))
.zip_eq(table_expr)
.map(|(arg, table)| (cond.clone() * arg, table))
.collect()
});

meta.lookup_any("rw lookup", |meta| {
// lookup second bytecode table
#[cfg(feature = "dual_bytecode")]
meta.lookup_any("Bytecode lookup", |meta| {
DreamWuGit marked this conversation as resolved.
Show resolved Hide resolved
let is_first_bytecode = meta.query_advice(is_first_bytecode_table, CURRENT);

let cond = meta.query_fixed(q_enable, CURRENT)
* meta.query_advice(is_bytecode, CURRENT)
* meta.query_advice(non_pad_non_mask, CURRENT)
* (1.expr() - is_first_bytecode);

let table_expr = bytecode_table1.table_exprs_mini(meta);

vec![
1.expr(),
meta.query_advice(id, CURRENT),
BytecodeFieldTag::Byte.expr(),
meta.query_advice(addr, CURRENT),
meta.query_advice(value, CURRENT),
]
.into_iter()
.zip_eq(table_expr)
.map(|(arg, table)| (cond.clone() * arg, table))
.collect()
});

meta.lookup_any("tx lookup for CallData", |meta| {
let cond = meta.query_fixed(q_enable, CURRENT)
* meta.query_advice(is_tx_calldata, CURRENT)
* meta.query_advice(non_pad_non_mask, CURRENT);
Expand Down Expand Up @@ -604,9 +659,13 @@ impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F> {
is_src_end,
is_word_end,
non_pad_non_mask,
#[cfg(feature = "dual_bytecode")]
is_first_bytecode_table,
tx_table,
rw_table,
bytecode_table,
#[cfg(feature = "dual_bytecode")]
bytecode_table1,
}
}
}
Expand All @@ -624,12 +683,11 @@ impl<F: Field> CopyCircuitConfig<F> {
lt_word_end_chip: &IsEqualChip<F>,
challenges: Challenges<Value<F>>,
copy_event: &CopyEvent,
bytecode_map: Option<&BTreeMap<Word, bool>>,
) -> Result<(), Error> {
for (step_idx, (tag, table_row, circuit_row)) in
CopyTable::assignments(copy_event, challenges)
.iter()
.enumerate()
{
let copy_rows = CopyTable::assignments(copy_event, challenges, bytecode_map);

for (step_idx, (tag, table_row, circuit_row)) in copy_rows.iter().enumerate() {
let is_read = step_idx % 2 == 0;

// Copy table assignments
Expand Down Expand Up @@ -670,6 +728,8 @@ impl<F: Field> CopyCircuitConfig<F> {
self.mask,
self.front_mask,
self.word_index,
#[cfg(feature = "dual_bytecode")]
self.is_first_bytecode_table,
]
.iter()
.zip_eq(circuit_row)
Expand Down Expand Up @@ -787,6 +847,7 @@ impl<F: Field> CopyCircuitConfig<F> {
copy_events: &[CopyEvent],
max_copy_rows: usize,
challenges: Challenges<Value<F>>,
bytecode_map: Option<&BTreeMap<Word, bool>>,
) -> Result<(), Error> {
let copy_rows_needed = copy_events
.iter()
Expand Down Expand Up @@ -846,6 +907,7 @@ impl<F: Field> CopyCircuitConfig<F> {
&lt_word_end_chip,
challenges,
copy_event,
bytecode_map,
)?;
log::trace!("offset after {}th copy event: {}", ev_idx, offset);
}
Expand Down Expand Up @@ -909,6 +971,14 @@ impl<F: Field> CopyCircuitConfig<F> {
*offset,
|| Value::known(F::zero()),
)?;
#[cfg(feature = "dual_bytecode")]
// is_first_bytecode_table
region.assign_advice(
|| format!("assign is_first_bytecode_table {}", *offset),
self.is_first_bytecode_table,
*offset,
|| Value::known(F::zero()),
)?;
// is_last
region.assign_advice(
|| format!("assign is_last {}", *offset),
Expand Down Expand Up @@ -1105,17 +1175,25 @@ pub struct CopyCircuit<F: Field> {
pub copy_events: Vec<CopyEvent>,
/// Max number of rows in copy circuit
pub max_copy_rows: usize,
/// map for <code_hash, bool> bool value indicates come from first
/// bytecode circuit.
pub bytecode_map: Option<BTreeMap<Word, bool>>,
_marker: PhantomData<F>,
/// Data for external lookup tables
/// Data for external lookup tables, currently this field only used for testing.
pub external_data: ExternalData,
}

impl<F: Field> CopyCircuit<F> {
/// Return a new CopyCircuit
pub fn new(copy_events: Vec<CopyEvent>, max_copy_rows: usize) -> Self {
pub fn new(
copy_events: Vec<CopyEvent>,
max_copy_rows: usize,
bytecode_map: Option<BTreeMap<Word, bool>>,
) -> Self {
Self {
copy_events,
max_copy_rows,
bytecode_map,
_marker: PhantomData,
external_data: ExternalData::default(),
}
Expand All @@ -1125,11 +1203,13 @@ impl<F: Field> CopyCircuit<F> {
pub fn new_with_external_data(
copy_events: Vec<CopyEvent>,
max_copy_rows: usize,
bytecode_map: Option<BTreeMap<Word, bool>>,
external_data: ExternalData,
) -> Self {
Self {
copy_events,
max_copy_rows,
bytecode_map,
_marker: PhantomData,
external_data,
}
Expand All @@ -1143,6 +1223,8 @@ impl<F: Field> CopyCircuit<F> {
Self::new(
block.copy_events.clone(),
block.circuits_params.max_copy_rows,
//#[cfg(feature = "dual_bytecode")]
DreamWuGit marked this conversation as resolved.
Show resolved Hide resolved
block.bytecode_map.clone(),
)
}
}
Expand All @@ -1160,6 +1242,7 @@ impl<F: Field> SubCircuit<F> for CopyCircuit<F> {
Self::new_with_external_data(
block.copy_events.clone(),
block.circuits_params.max_copy_rows,
block.bytecode_map.clone(),
ExternalData {
max_txs: block.circuits_params.max_txs,
max_calldata: block.circuits_params.max_calldata,
Expand Down Expand Up @@ -1190,7 +1273,13 @@ impl<F: Field> SubCircuit<F> for CopyCircuit<F> {
challenges: &Challenges<Value<F>>,
layouter: &mut impl Layouter<F>,
) -> Result<(), Error> {
config.assign_copy_events(layouter, &self.copy_events, self.max_copy_rows, *challenges)
config.assign_copy_events(
layouter,
&self.copy_events,
self.max_copy_rows,
*challenges,
self.bytecode_map.as_ref(),
)
}
}

Expand Down
Loading
Loading