Struct zkevm_circuits::copy_circuit::CopyCircuitConfig
source · pub struct CopyCircuitConfig<F> {
pub q_step: Selector,
pub is_last: Column<Advice>,
pub value: Column<Advice>,
pub value_acc_rlc: Column<Advice>,
pub is_pad: Column<Advice>,
pub is_code: Column<Advice>,
pub q_enable: Column<Fixed>,
pub copy_table: CopyTable,
pub addr_lt_addr_end: LtConfig<F, 8>,
pub tx_table: TxTable,
pub rw_table: RwTable,
pub bytecode_table: BytecodeTable,
/* private fields */
}
Expand description
The rw table shared between evm circuit and state circuit
Fields§
§q_step: Selector
Whether this row denotes a step. A read row is a step and a write row is not.
is_last: Column<Advice>
Whether the row is the last read-write pair for a copy event.
value: Column<Advice>
The value copied in this copy step.
value_acc_rlc: Column<Advice>
Random linear combination accumulator value.
is_pad: Column<Advice>
Whether the row is padding.
is_code: Column<Advice>
In case of a bytecode tag, this denotes whether or not the copied byte is an opcode or push data byte.
q_enable: Column<Fixed>
Whether the row is enabled or not.
copy_table: CopyTable
The Copy Table contains the columns that are exposed via the lookup expressions
addr_lt_addr_end: LtConfig<F, 8>
Lt chip to check: src_addr < src_addr_end.
Since src_addr
and src_addr_end
are u64, 8 bytes are sufficient for
the Lt chip.
tx_table: TxTable
TxTable
rw_table: RwTable
RwTable
bytecode_table: BytecodeTable
BytecodeTable
Implementations§
source§impl<F: Field> CopyCircuitConfig<F>
impl<F: Field> CopyCircuitConfig<F>
sourcepub fn assign_copy_event(
&self,
region: &mut Region<'_, F>,
offset: &mut usize,
tag_chip: &BinaryNumberChip<F, CopyDataType, 3>,
lt_chip: &LtChip<F, 8>,
challenges: Challenges<Value<F>>,
copy_event: &CopyEvent
) -> Result<(), Error>
pub fn assign_copy_event( &self, region: &mut Region<'_, F>, offset: &mut usize, tag_chip: &BinaryNumberChip<F, CopyDataType, 3>, lt_chip: &LtChip<F, 8>, challenges: Challenges<Value<F>>, copy_event: &CopyEvent ) -> Result<(), Error>
Assign an individual copy event to the Copy Circuit.
sourcepub fn assign_copy_events(
&self,
layouter: &mut impl Layouter<F>,
copy_events: &[CopyEvent],
max_copy_rows: usize,
challenges: Challenges<Value<F>>
) -> Result<(), Error>
pub fn assign_copy_events( &self, layouter: &mut impl Layouter<F>, copy_events: &[CopyEvent], max_copy_rows: usize, challenges: Challenges<Value<F>> ) -> Result<(), Error>
Assign vec of copy events
Trait Implementations§
source§impl<F: Clone> Clone for CopyCircuitConfig<F>
impl<F: Clone> Clone for CopyCircuitConfig<F>
source§fn clone(&self) -> CopyCircuitConfig<F>
fn clone(&self) -> CopyCircuitConfig<F>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<F: Debug> Debug for CopyCircuitConfig<F>
impl<F: Debug> Debug for CopyCircuitConfig<F>
source§impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F>
impl<F: Field> SubCircuitConfig<F> for CopyCircuitConfig<F>
source§fn new(meta: &mut ConstraintSystem<F>, _: Self::ConfigArgs) -> Self
fn new(meta: &mut ConstraintSystem<F>, _: Self::ConfigArgs) -> Self
Configure the Copy Circuit constraining read-write steps and doing appropriate lookups to the Tx Table, RW Table and Bytecode Table.
§type ConfigArgs = CopyCircuitConfigArgs<F>
type ConfigArgs = CopyCircuitConfigArgs<F>
Auto Trait Implementations§
impl<F> RefUnwindSafe for CopyCircuitConfig<F>where
F: RefUnwindSafe,
impl<F> Send for CopyCircuitConfig<F>where
F: Send,
impl<F> Sync for CopyCircuitConfig<F>where
F: Sync,
impl<F> Unpin for CopyCircuitConfig<F>where
F: Unpin,
impl<F> UnwindSafe for CopyCircuitConfig<F>where
F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.