From 0baedc6463b389ab6c704f9422853ca90dc3e2f5 Mon Sep 17 00:00:00 2001 From: Chih Cheng Liang Date: Wed, 10 Apr 2024 00:55:00 +0800 Subject: [PATCH] add all instances of copy (#521) --- specs/tables.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/specs/tables.md b/specs/tables.md index 9c4ad4788..134f31b22 100644 --- a/specs/tables.md +++ b/specs/tables.md @@ -270,12 +270,20 @@ Instead, a lookup entry is constructed from the first two rows in each copy even `(is_first, id, addr, src_addr_end, bytes_left, rlc_acc, rw_counter, rwc_inc_left, tag)`, where `is_first` is 1 and `Column[1]` indicates the next row in the corresponding column. The table below lists all of copy pairs supported in the copy table: -- Copy from Tx call data to memory (`CALLDATACOPY`). -- Copy from caller/callee memory to callee/caller memory (`CALLDATACOPY`, `RETURN` (not create), `RETURNDATACOPY`, `REVERT`). + +- Copy from Tx call data to memory (`CALLDATACOPY` (root call)). +- Copy from Tx call data to RlcAcc. `begin_tx` (create): We constrain the tx call data to initialization code. +- Copy from caller/callee memory to callee/caller memory. + - `CALLDATACOPY` (not root call): copy from caller's memory to callee's + - `RETURN` (not create), `REVERT`, `CALLOP` (precompile return): copy from callee's memory to caller's + - `RETURNDATACOPY`, `MCOPY`: copy memory within current context - Copy from bytecode to memory (`CODECOPY`, `EXTCODECOPY`). - Copy from memory to bytecode (`CREATE`, `CREATE2`, `RETURN` (create)) - Copy from memory to TxLog in the `rw_table` (`LOGX`) -- Copy from memory to RlcAcc (`SHA3`) +- Copy between memory and RlcAcc. + - `SHA3`: Constrain memory read to keccak lookup table input + - `CALLOP` (precompile input): Constrain caller's memory read to precompile's input bytes + - `CALLOP` (precompile output): Constrain precompile's output bytes to precompile's context memory | is_first | id{Lo,Hi} | addr | src_addr_end | bytes_left | rlc_acc | rw_counter | rwc_inc_left | tag | | ---------- | ----------- | ---------------- | ---------------- | ------------ | --------- | ------------ | -------------- | ------------ |