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

fix(rlpTxn): constraint ADDR during AccessList tuple & ChainId #403

Merged
Changes from 1 commit
Commits
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
15 changes: 7 additions & 8 deletions rlptxn/constraints.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,11 @@
(eq! (next DATA_GAS_COST) (shift DATA_GAS_COST 2)))
(vanishes! (next LC_CORRECTION))))))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; 4.5 Phase 10 : AccessList ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconstraint phaseAccessList-stillphase-noend (:guard IS_PHASE_ACCESS_LIST)
(if-not-zero PHASE_SIZE
(vanishes! PHASE_END)))
Expand Down Expand Up @@ -829,10 +829,9 @@

;; 4.5.2.15
(defconstraint phaseAccessList-updateAddrLookUp (:guard IS_PHASE_ACCESS_LIST)
(if-zero (+ [DEPTH 2]
(- (prev nADDR) nADDR))
(begin (remained-constant! ADDR_HI)
(remained-constant! ADDR_LO))))
(if-not-zero (* [DEPTH 1] (- nADDR (- (prev nADDR) 1)))
(begin (remained-constant! ADDR_HI)
(remained-constant! ADDR_LO))))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following how this maps to

image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this relates to this spec update: https://github.com/Consensys/linea-specification-internal/pull/618

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My next question would be: are special precautions required for the first row of IS_PHASE_ACCESS_LIST = 1 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the first row of ACCESS£LIST PHASE has DEPTH_1 = 0, so it's OK.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see
Uploading image.png…


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Expand Down
Loading