From ef2ed7cb055c7917a7a2f8e92ce4db5a0a7bb350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20B=C3=A9gassat?= Date: Tue, 14 Jan 2025 15:41:03 +0100 Subject: [PATCH 1/2] ras --- blockdata/processing/gaslimit/linea.lisp | 4 ++-- constants/constants.lisp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/blockdata/processing/gaslimit/linea.lisp b/blockdata/processing/gaslimit/linea.lisp index 76141104..ce2dc718 100644 --- a/blockdata/processing/gaslimit/linea.lisp +++ b/blockdata/processing/gaslimit/linea.lisp @@ -1,8 +1,8 @@ (module blockdata) ;; TODO add reference to global constants -(defconst GAS_LIMIT_MINIMUM 61000000) -(defconst GAS_LIMIT_MAXIMUM 2000000000) +(defconst GAS_LIMIT_MINIMUM 61000000) +(defconst GAS_LIMIT_MAXIMUM 2000000000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; diff --git a/constants/constants.lisp b/constants/constants.lisp index 2150549f..d796df74 100644 --- a/constants/constants.lisp +++ b/constants/constants.lisp @@ -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 ;; From 8c920e4040bf74b2813a9fc450bb9d2254aa62e9 Mon Sep 17 00:00:00 2001 From: Lorenzo Gentile Date: Tue, 14 Jan 2025 15:50:31 +0100 Subject: [PATCH 2/2] fix callToC1Membership function (#558) --- ecdata/constraints.lisp | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/ecdata/constraints.lisp b/ecdata/constraints.lisp index 417ad464..5c4b8194 100644 --- a/ecdata/constraints.lisp +++ b/ecdata/constraints.lisp @@ -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))) ;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;