Skip to content

Commit

Permalink
Merge branch 'master' into feat/blockdata-separate-eth-linea-constants
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBBB committed Jan 14, 2025
2 parents b1d26c4 + 8c920e4 commit 84d818e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BLOCKDATA_FOR_REFERENCE_TESTS := $(wildcard blockdata/*.lisp) \
$(wildcard blockdata/processing/*.lisp) \
$(wildcard blockdata/processing/gaslimit/common.lisp) \
$(wildcard blockdata/processing/gaslimit/ethereum.lisp) \
$(wildcard blockdata/processing/gaslimit/constants-ethereum.lisp) \
$(wildcard blockdata/processing/gaslimit/constants-ethereum.lisp) \
$(wildcard blockdata/lookups/*.lisp)

# with gaslimit for linea file
Expand Down
3 changes: 2 additions & 1 deletion constants/constants.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,12 @@
LINEA_BASE_FEE 7
LINEA_DIFFICULTY 2
LINEA_MAX_NUMBER_OF_TRANSACTIONS_IN_BATCH 200
GAS_LIMIT_ADJUSTMENT_FACTOR 1024
;; we keep the following constants as they are referenced in blockdata gas limit tests
ETHEREUM_GAS_LIMIT_MINIMUM 5000
ETHEREUM_GAS_LIMIT_MAXIMUM 0xffffffffffffffff ;; maxUint64
LINEA_GAS_LIMIT_MINIMUM 61000000
LINEA_GAS_LIMIT_MAXIMUM 2000000000
GAS_LIMIT_ADJUSTMENT_FACTOR 1024
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SIZE / LENGTH ;;
Expand Down
46 changes: 23 additions & 23 deletions ecdata/constraints.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -477,32 +477,32 @@

;; Note: in the specs for simplicity we omit the last four arguments
(defun (callToC1MembershipWCP k
P_x_hi
P_x_lo
P_y_hi
P_y_lo
P_y_square_hi
P_y_square_lo
P_x_cube_plus_three_hi
P_x_cube_plus_three_lo)
(begin (callToLT k P_x_hi P_x_lo P_BN_HI P_BN_LO)
(callToLT (+ k 1) P_y_hi P_y_lo P_BN_HI P_BN_LO)
(callToEQ (+ k 2) P_y_square_hi P_y_square_lo P_x_cube_plus_three_hi P_x_cube_plus_three_lo)))
_P_x_hi
_P_x_lo
_P_y_hi
_P_y_lo
_P_y_square_hi
_P_y_square_lo
_P_x_cube_plus_three_hi
_P_x_cube_plus_three_lo)
(begin (callToLT k _P_x_hi _P_x_lo P_BN_HI P_BN_LO)
(callToLT (+ k 1) _P_y_hi _P_y_lo P_BN_HI P_BN_LO)
(callToEQ (+ k 2) _P_y_square_hi _P_y_square_lo _P_x_cube_plus_three_hi _P_x_cube_plus_three_lo)))

;; Note: in the specs for simplicity we omit the last four arguments
(defun (callToC1MembershipEXT k
P_x_hi
P_x_lo
P_y_hi
P_y_lo
P_x_square_hi
P_x_square_lo
P_x_cube_hi
P_x_cube_lo)
(begin (callToMULMOD k P_y_hi P_y_lo P_y_hi P_y_lo P_BN_HI P_BN_LO)
(callToMULMOD (+ k 1) P_x_hi P_x_lo P_x_hi P_x_lo P_BN_HI P_BN_LO)
(callToMULMOD (+ k 2) P_x_square_hi P_x_square_lo P_x_hi P_x_lo P_BN_HI P_BN_LO)
(callToADDMOD (+ k 3) P_x_cube_hi P_x_cube_lo 0 3 P_BN_HI P_BN_LO)))
_P_x_hi
_P_x_lo
_P_y_hi
_P_y_lo
_P_x_square_hi
_P_x_square_lo
_P_x_cube_hi
_P_x_cube_lo)
(begin (callToMULMOD k _P_y_hi _P_y_lo _P_y_hi _P_y_lo P_BN_HI P_BN_LO)
(callToMULMOD (+ k 1) _P_x_hi _P_x_lo _P_x_hi _P_x_lo P_BN_HI P_BN_LO)
(callToMULMOD (+ k 2) _P_x_square_hi _P_x_square_lo _P_x_hi _P_x_lo P_BN_HI P_BN_LO)
(callToADDMOD (+ k 3) _P_x_cube_hi _P_x_cube_lo 0 3 P_BN_HI P_BN_LO)))

;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Expand Down

0 comments on commit 84d818e

Please sign in to comment.