Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Conversation

darth-cy
Copy link

@darth-cy darth-cy commented Nov 14, 2023

Description

Support RLP decoding of EIP2930/EIP1559 nested access_list structure. This PR introduces necessary changes to RLP FSM circuit in preparation for lookup from the transaction circuit for EIP1559 specs. (edited+) This PR further implements changes on the tx circuit and table for correct access into RLP-decoded data on eip1559 data fields. Additional constraints and accumulators are added for ensuring no omission of access list fields.

Issue Link

???

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Contents

  • Add additional identifying idx access_list_idx and storage_key_idx for lookups into values within access list.
  • Simulate a stack-like structure (using an additional decoding table in RLP) and constraints to verify correct decoding of RLP remaining_bytes.

@darth-cy darth-cy marked this pull request as draft November 14, 2023 00:26
@darth-cy darth-cy marked this pull request as ready for review November 14, 2023 00:34
@darth-cy darth-cy marked this pull request as draft November 14, 2023 18:29
@lispc
Copy link

lispc commented Jan 8, 2024

comments addressed. Will merge

@lispc lispc merged commit e149aec into develop Jan 8, 2024
@lispc lispc deleted the feat/support-eip1559 branch January 8, 2024 08:31
Velaciela pushed a commit that referenced this pull request Jan 16, 2024
* setup multiple test bytes

* add debug bytes

* retrace debug: add ad sk idx

* retrace debug: add access list idx wit

* add additional witness columns

* add additional witness columns

* add constraints

* add constraints

* add constraints

* add constraints

* generate correct stack states

* correct stack witness generation

* add stack accumulator

* fmt

* fmt

* remove debug flag

* correct tx circuit lookup
:

* decoding table

* correct degree

* add decoding table

* add decoding table assignment

* reduce degree

* unnecessary import

* fmt

* fix constraints

* fix constraints

* add stack ptr increase

* fix constraints

* fmt

* add stack op witness

* add stack op witness

* add stack constraints

* fmt

* add stack constraints

* add stack end condition

* fmt

* fmt

* rename beginlist and endlist

* adjust test case

* change address naming to depth

* add instrument booleans

* add consistency constraints for access list

* add consistency constraints for access list

* adjust test

* remove debug flag

* fmt

* refactor accumulating coeff

* add stack op enum

* refactor decoding table witness

* refactor access list indicator columns

* remove auto code

* refactor syntax

* remove comment

* add comment

* add missing constraints

* refactor syntax

* debug commit

* remove debug line

* refactor constructor

* refactor push constructor

* refactor pop constructor

* refactor update

* fmt

* remove import

* debug commit

* restore test. fix lookup conditional

* restore column in tx table

* restore access list idx columns:

* add access list dynamic assignment

* restore dynamic access list assignment

* resolve merge conflict

* add section denoter for access list

* add access list rlc helper

* adjust column and new section init

* add boolean instruments, degree fix

* add constraints

* add constraints

* add rlp lookup

* add section_rlc starting for access list

* add section_rlc accumulation

* recover section constraint

* look up access list address

* lookup access list storage key len

* fmt

* fmt clippy

* remove debug tags

* correct lookup of address and storage keys

* remove debug flag

* add extra gas fields for 1559

* comment

* fmt

* fmt

* add option guard

* fmt

* unwrap guard

* correct witness rows

* fmt

* add comment

* add instrument to fix degree

* fix rlp lookup

* remove debug tag

* remove debug tag

* style fmt

* adjust section transition

* cargo

* clip cargo lock

* correct merge

* debug commit

* uncomment test

* correct fn name

* remove output

* refactor assignment

* add lookup

* fmt

* fmt

* restore test

* remove duplicate

* add comments

* add comments'

* fmt

* remove engagement of stack acc

* remove stack_acc and add new witness

* add lookup from rlp_table

* comment correction

* add depth constraint decoding table

* add cross-depth lookup in decoding table

* fmt

* clippy

* rm comments

* stack op order correction

* add more strict constraints

* remove debug flags

* remove debug output

* fmt

* adjust stack table columns

* add stack op id check

* adjust access list idx position

* revert "adjust access list idx position"

This reverts commit aecd544.

* remove debug flags

* recover init

* recover push and pop lookups

* add op constraints

* fmt

* degree reduction boolean constraints

* add constraints

* fmt

* clippy

---------

Co-authored-by: xkx <xiakunxian130@gmail.com>
Velaciela pushed a commit that referenced this pull request Feb 20, 2024
* setup multiple test bytes

* add debug bytes

* retrace debug: add ad sk idx

* retrace debug: add access list idx wit

* add additional witness columns

* add additional witness columns

* add constraints

* add constraints

* add constraints

* add constraints

* generate correct stack states

* correct stack witness generation

* add stack accumulator

* fmt

* fmt

* remove debug flag

* correct tx circuit lookup
:

* decoding table

* correct degree

* add decoding table

* add decoding table assignment

* reduce degree

* unnecessary import

* fmt

* fix constraints

* fix constraints

* add stack ptr increase

* fix constraints

* fmt

* add stack op witness

* add stack op witness

* add stack constraints

* fmt

* add stack constraints

* add stack end condition

* fmt

* fmt

* rename beginlist and endlist

* adjust test case

* change address naming to depth

* add instrument booleans

* add consistency constraints for access list

* add consistency constraints for access list

* adjust test

* remove debug flag

* fmt

* refactor accumulating coeff

* add stack op enum

* refactor decoding table witness

* refactor access list indicator columns

* remove auto code

* refactor syntax

* remove comment

* add comment

* add missing constraints

* refactor syntax

* debug commit

* remove debug line

* refactor constructor

* refactor push constructor

* refactor pop constructor

* refactor update

* fmt

* remove import

* debug commit

* restore test. fix lookup conditional

* restore column in tx table

* restore access list idx columns:

* add access list dynamic assignment

* restore dynamic access list assignment

* resolve merge conflict

* add section denoter for access list

* add access list rlc helper

* adjust column and new section init

* add boolean instruments, degree fix

* add constraints

* add constraints

* add rlp lookup

* add section_rlc starting for access list

* add section_rlc accumulation

* recover section constraint

* look up access list address

* lookup access list storage key len

* fmt

* fmt clippy

* remove debug tags

* correct lookup of address and storage keys

* remove debug flag

* add extra gas fields for 1559

* comment

* fmt

* fmt

* add option guard

* fmt

* unwrap guard

* correct witness rows

* fmt

* add comment

* add instrument to fix degree

* fix rlp lookup

* remove debug tag

* remove debug tag

* style fmt

* adjust section transition

* cargo

* clip cargo lock

* correct merge

* debug commit

* uncomment test

* correct fn name

* remove output

* refactor assignment

* add lookup

* fmt

* fmt

* restore test

* remove duplicate

* add comments

* add comments'

* fmt

* remove engagement of stack acc

* remove stack_acc and add new witness

* add lookup from rlp_table

* comment correction

* add depth constraint decoding table

* add cross-depth lookup in decoding table

* fmt

* clippy

* rm comments

* stack op order correction

* add more strict constraints

* remove debug flags

* remove debug output

* fmt

* adjust stack table columns

* add stack op id check

* adjust access list idx position

* revert "adjust access list idx position"

This reverts commit aecd544.

* remove debug flags

* recover init

* recover push and pop lookups

* add op constraints

* fmt

* degree reduction boolean constraints

* add constraints

* fmt

* clippy

---------

Co-authored-by: xkx <xiakunxian130@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants