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

Develop branch #416

Closed
wants to merge 662 commits into from
Closed

Develop branch #416

wants to merge 662 commits into from

Conversation

lispc
Copy link

@lispc lispc commented Mar 21, 2023

No description provided.

lightsing and others added 15 commits August 15, 2023 10:14
* fix l1fee

* fix l2fee

* fix test evm circuit row not enough

* remove feature cfg

---------

Co-authored-by: Zhang Zhuo <[email protected]>
* fix l1fee

* fix oracle update tx

* fix wrong use of rlc
* chore: refactor phase1 and phase2 parts as separate

* tests: neg tests and assertion for pairing check

* fix: typo

* chore: review comments addressed

* fix: only when onephase is disabled

* fix: always finalize at the end of asignment

* fix: crt integer's byte repr check

* chore: refactor based on review comments

---------

Co-authored-by: Zhang Zhuo <[email protected]>
* refactor callop gas cost

* try

* refactor

* re enable precompile with value
* add range check

* fix unconstrained

* sort fields

* merge import

* unnecessary clone

* add range check

* add range table

* replace Range256Table of rlp_circuit_fsm

* replace u16_table of tx_circuit

* use TableColumn

* merge #694

* add type alias

* use type alias

* fix import

* merge #690 and reduce LtChip use

* missing q_enable

* annotate lookup column

* fix dev table load

* add RangeCheck

* minimal bug reproduce

* fix test

* clippy

* clippy

* remove print

* fix exp_circuit

* fix offset

* add u128 and cleanup

* revert to u8 table lookup

* use u8 table lookup for u8 cell

* fix dev_load

* constrain unused cell == 0

* add explain for padding

* update unusable_rows

* performance fix

* use Rotation::cur()

* fix incorrect constraint for unused_cells

* add comments describe row used

* add comments to clarify the ranges

Co-authored-by: Aurélien Nicolas <[email protected]>

* rename conflicted names

Co-authored-by: Aurélien Nicolas <[email protected]>

* remove incorrect comment

Co-authored-by: Aurélien Nicolas <[email protected]>

* explain why OFFSET_INCREMENT is 8usize

* use u16 for carry_lo/hi

* fix gadget test

* remove unused cell constrain

---------

Co-authored-by: DreamWuGit <[email protected]>
Co-authored-by: Aurélien Nicolas <[email protected]>
…ircuit) (#778)

* calculate num_l1_msgs and num_l2_txs in tx circuit

* fix

* fmt and clippy

* fix: non-last tx requires next is calldata

* add NumAllTxs in block table and copy it from pi to block table

* add lookup for NumAllTxs in tx circuit

* clippy

* add block num diff check to avoid two real block have same num

* clippy

* address comments
…S auditors (#572)

* fix finding 3 (#575)

* Fix zellic finding 4 (#576)

* fix finding 3 (#575)

* fix finding 4

---------

Co-authored-by: Rohit Narurkar <[email protected]>

* add range check on diffs (#586)

* Fix finding 10 (#578)

* fix finding 3 (#575)

* fix finding 10

* Fix finding 13 (#579)

* fix finding 3 (#575)

* fix finding 13

* Fix zellic finding 14 (#580)

* fix finding 3 (#575)

* fix finding 14

* Fix zellic finding 5 (#584)

* fix finding 3 (#575)

* fix finding 5

* refine comments

* fmt

* Fix finding 17 (#602)

* add q_last

* fix

* add more diff range check

* fix finding 7 (#625)

* tx_id = 1 when sm starts

* Fix finding 11 : use length for rlc in rlp table (#719)

* fix: use tag_bytes_rlc and tag_length to copy tag's bytes around

* fix lookup input for Len & RLC & GasCost fields in tx circuit

* refactor

* fix

* refactor

* fix col phase issue

* refactor bytes_rlc type

* Fix the bugs in Tx & PI circuits reported by Zellic & KALOS auditors (#612)

* lookup chain_id to RLP table

* fix finding 22 (#614)

* fix finding 21 (#613)

* fix finding 23 (#618)

* fix finding 26 (#622)

* fix finding 28 (#624)

Co-authored-by: Rohit Narurkar <[email protected]>

* fix finding 29 (#623)

Co-authored-by: Rohit Narurkar <[email protected]>

* enforce is_final is true at the last row and fix RLC related vul (#735)

* Fix finding 30  (#733)

* enforce all txs in a block are included in the tx table

* clippy

---------

Co-authored-by: Rohit Narurkar <[email protected]>

* Fix Zellic / Kalos finding25 (#619)

* fix finding 25

* add comment

---------

Co-authored-by: Rohit Narurkar <[email protected]>

* fix conflicts

---------

Co-authored-by: Rohit Narurkar <[email protected]>
Co-authored-by: Zhang Zhuo <[email protected]>

* use q_first instead

* fmt

---------

Co-authored-by: Rohit Narurkar <[email protected]>
Co-authored-by: Zhang Zhuo <[email protected]>
* add row counting interface for keccak

* add class level capacity calculator for keccak

* remove f capacity from core

* remove capacity calculator in aggregator util

* remove unnecessary imports

* replace max keccak round in core

* replace reference for max keccak

* remove unnecessary keccak imports and constants

* remove max keccak constant

* remove constants in hash cell parsing

* remove constant column sanity check

* add state column usage log

* adjust input bytes column

* add long column padding

* correct fmt

* fix fmt

* minor fixes

* fix

* Fix: allow skipping of L1Msg tx part 2 (calculate num_all_txs in tx circuit) (#778)

* calculate num_l1_msgs and num_l2_txs in tx circuit

* fix

* fmt and clippy

* fix: non-last tx requires next is calldata

* add NumAllTxs in block table and copy it from pi to block table

* add lookup for NumAllTxs in tx circuit

* clippy

* add block num diff check to avoid two real block have same num

* clippy

* address comments

* Fix the bugs in RLP/Tx/PI circuit which are reported by Zellic & KALOS auditors (#572)

* fix finding 3 (#575)

* Fix zellic finding 4 (#576)

* fix finding 3 (#575)

* fix finding 4

---------

Co-authored-by: Rohit Narurkar <[email protected]>

* add range check on diffs (#586)

* Fix finding 10 (#578)

* fix finding 3 (#575)

* fix finding 10

* Fix finding 13 (#579)

* fix finding 3 (#575)

* fix finding 13

* Fix zellic finding 14 (#580)

* fix finding 3 (#575)

* fix finding 14

* Fix zellic finding 5 (#584)

* fix finding 3 (#575)

* fix finding 5

* refine comments

* fmt

* Fix finding 17 (#602)

* add q_last

* fix

* add more diff range check

* fix finding 7 (#625)

* tx_id = 1 when sm starts

* Fix finding 11 : use length for rlc in rlp table (#719)

* fix: use tag_bytes_rlc and tag_length to copy tag's bytes around

* fix lookup input for Len & RLC & GasCost fields in tx circuit

* refactor

* fix

* refactor

* fix col phase issue

* refactor bytes_rlc type

* Fix the bugs in Tx & PI circuits reported by Zellic & KALOS auditors (#612)

* lookup chain_id to RLP table

* fix finding 22 (#614)

* fix finding 21 (#613)

* fix finding 23 (#618)

* fix finding 26 (#622)

* fix finding 28 (#624)

Co-authored-by: Rohit Narurkar <[email protected]>

* fix finding 29 (#623)

Co-authored-by: Rohit Narurkar <[email protected]>

* enforce is_final is true at the last row and fix RLC related vul (#735)

* Fix finding 30  (#733)

* enforce all txs in a block are included in the tx table

* clippy

---------

Co-authored-by: Rohit Narurkar <[email protected]>

* Fix Zellic / Kalos finding25 (#619)

* fix finding 25

* add comment

---------

Co-authored-by: Rohit Narurkar <[email protected]>

* fix conflicts

---------

Co-authored-by: Rohit Narurkar <[email protected]>
Co-authored-by: Zhang Zhuo <[email protected]>

* use q_first instead

* fmt

---------

Co-authored-by: Rohit Narurkar <[email protected]>
Co-authored-by: Zhang Zhuo <[email protected]>

* add pi comments

* rename preimage col idx

* add keccak rows check

* rename input bytes col finder fn

* modify keccak row env constaint

* modify keccak row env constaint

* add named constant setup vars

* modify keccak row check

* clippy advised

* add comments on chunk hash

* fmt

* avoid constant lookup table

* avoid repetitive computation of input_bytes_col_idx

---------

Co-authored-by: Zhuo Zhang <[email protected]>
Co-authored-by: xkx <[email protected]>
Co-authored-by: Rohit Narurkar <[email protected]>
johnsonjie and others added 29 commits January 31, 2024 17:23
* CI-fix

* Update wakeUpRunner.sh

* Update wakeUpRunner.sh
* CI-fix

* Update wakeUpRunner.sh

* Update wakeUpRunner.sh

* Update select-runner.yml

---------

Co-authored-by: 张三 <[email protected]>
* upgrade halo2 to v1.1 mvlookup

* clippy

* update lookup name

* Revert "update lookup name"

This reverts commit a152c79.

* upgrade halo2

* change some lookup names
…_id soundness (#1078)

* pick privacy-scaling-explorations#1719 from upstream: fix begin-tx tx_id soundness

* fix transition from end_tx to end_inner_block

---------

Co-authored-by: Rohit Narurkar <[email protected]>
* init reconstruct

* add StackPopOnlyOpcode

* impl arthmetic opcode stack output

* impl get block header field opcode

* impl blockhash

* impl PC, MSIZE, GAS

* remove StackOnlyOpcode

* add strict check

* impl PUSHn

* impl Address

* cleanup stack usage

* impl ORIGIN

* use prestate

* rename to enable-stack

* cleanup stack usage

* disable trace_tests

* fix and add assert

* fix doc test

* fix cfg

* use callTracer

* do not parse call when is_precheck not ok

* do not parse call in create precheck not ok

* fix offset

* fix compile

* disable tracer_tests

* fix test

* fix caller_address

* fix parse_call

* silent more fields

* unbound recursion

* remove stack usage

* update LoggerConfig

* cleanup

* fix root

* fix test

* fix doc test

* cleanup

* upgrade geth version

* add feature switch

* add missing

* add call tracer and prestate tracer

* handle precheck failed call

* why ignore not working

* add l2 prestate

* use go1.20

* 0x5c/5e assigned by cankun

* update l2geth

* fix merge

* clippy

* fix call trace

* fix call trace

* fix merge

* recover test

* fix stack_pointer

* fix update_codedb

* handle last step error

* fix order

* fix order

* skip empty

* fix oog step

* fix stack_pointer

* fix create empty

* fix ErrorCreationCode

* try fix call empty

* try fix call empty

* fix precompile fail

* fix precompile fail

* fix create in tx

* fix output

* fix test

* fix call to self in create

* clippy

* downgrade submodule

* clippy

---------

Co-authored-by: DreamWuGit <[email protected]>
* doc for eip EIP2930_1559

* add 1559 gadget

* modify md format
* add gas_fee_cap_lt_base_fee

* fix fmt

* increase STEP_WIDTH &N_BYTE_LOOKUPS as more byte cells required

* revise comment

* increase STEP_WIDTH: scroll feature needs more cells

* add new constraint to doc
* disable batch inv in halo2

* fix cargo lock

* more trace fixes
* Correct selector

* Correct selector
* run check

* remove print

* fix dynamic calldata
* upgrade l2geth

* fix
* fix: Stale code comment

* fix: Inconsistent structure constructor
enables clippy::inconsistent_struct_constructor lint

* fix: Incorrect documentation on the MinMaxGadget

* fix: cargo audit

* fix clippy
* v0.10 rows

* fix ethers-rs
* fix discrepancies between doc and circuit

Signed-off-by: noelwei <[email protected]>

* fix constraint in input initialization

Signed-off-by: noelwei <[email protected]>

* constraint state with initialized iv

Signed-off-by: noelwei <[email protected]>

* clippy and fmt

Signed-off-by: noelwei <[email protected]>

* add texts in spec

Signed-off-by: noelwei <[email protected]>

---------

Signed-off-by: noelwei <[email protected]>
* fix 1559 tests and signature bugs

* fmt change

* change addr in err message
* fix issue in calculating required rows of sha256 circuit

Signed-off-by: noelwei <[email protected]>

* shorten the code to one-line

Signed-off-by: noelwei <[email protected]>

* fix error in comment

Signed-off-by: noelwei <[email protected]>

* no need to add additional row for first block

Signed-off-by: noelwei <[email protected]>

---------

Signed-off-by: noelwei <[email protected]>
@icemelon icemelon closed this Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment