Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
64 changes: 15 additions & 49 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,11 @@ BIN := bin
BLAKE2f_MODEXP_DATA := blake2fmodexpdata

# constraints used in prod for LINEA, with linea block gas limit
BLOCKDATA_LONDON := $(wildcard blockdata/london/*.lisp) \
$(wildcard blockdata/london/processing/*.lisp) \
$(wildcard blockdata/london/processing/gaslimit/common.lisp) \
$(wildcard blockdata/london/processing/gaslimit/linea.lisp) \
$(wildcard blockdata/london/lookups/*.lisp)

BLOCKDATA_PARIS := $(wildcard blockdata/paris/*.lisp) \
$(wildcard blockdata/paris/processing/*.lisp) \
$(wildcard blockdata/paris/processing/gaslimit/common.lisp) \
$(wildcard blockdata/paris/processing/gaslimit/linea.lisp) \
$(wildcard blockdata/paris/lookups/*.lisp)

BLOCKDATA_CANCUN := $(wildcard blockdata/cancun/*.lisp) \
$(wildcard blockdata/cancun/processing/*.lisp) \
$(wildcard blockdata/cancun/processing/gaslimit/common.lisp) \
$(wildcard blockdata/cancun/processing/gaslimit/linea.lisp) \
$(wildcard blockdata/cancun/lookups/*.lisp)
BLOCKDATA_LONDON := blockdata/london

BLOCKDATA_PARIS := blockdata/paris

BLOCKDATA_CANCUN := blockdata/cancun

BLOCKHASH := blockhash

Expand All @@ -45,26 +33,11 @@ EXP := exp

GAS := gas

HUB_LONDON := $(wildcard hub/london/*.lisp) \
$(wildcard hub/london/**/*.lisp) \
$(wildcard hub/london/**/**/*.lisp) \
$(wildcard hub/london/**/**/**/*.lisp) \
$(wildcard hub/london/**/**/**/**/*.lisp) \
$(wildcard hub/london/**/**/**/**/**/*.lisp)

HUB_SHANGHAI := $(wildcard hub/shanghai/*.lisp) \
$(wildcard hub/shanghai/**/*.lisp) \
$(wildcard hub/shanghai/**/**/*.lisp) \
$(wildcard hub/shanghai/**/**/**/*.lisp) \
$(wildcard hub/shanghai/**/**/**/**/*.lisp) \
$(wildcard hub/shanghai/**/**/**/**/**/*.lisp)

HUB_CANCUN := $(wildcard hub/cancun/*.lisp) \
$(wildcard hub/cancun/**/*.lisp) \
$(wildcard hub/cancun/**/**/*.lisp) \
$(wildcard hub/cancun/**/**/**/*.lisp) \
$(wildcard hub/cancun/**/**/**/**/*.lisp) \
$(wildcard hub/cancun/**/**/**/**/**/*.lisp)
HUB_LONDON := hub/london

HUB_SHANGHAI := hub/shanghai

HUB_CANCUN := hub/cancun

LIBRARY := library

Expand All @@ -78,13 +51,9 @@ MMIO := mmio

MXP := mxp

OOB_LONDON := $(wildcard oob/london/*.lisp) \
$(wildcard oob/london/**/*.lisp) \
$(wildcard oob/london/**/**/*.lisp)
OOB_LONDON := oob/london

OOB_SHANGHAI := $(wildcard oob/shanghai/*.lisp) \
$(wildcard oob/shanghai/**/*.lisp) \
$(wildcard oob/shanghai/**/**/*.lisp)
OOB_SHANGHAI := oob/shanghai

RLP_ADDR := rlpaddr

Expand All @@ -110,14 +79,11 @@ INST_DECODER_CANCUN := reftables/cancun/inst_decoder.lisp

TRM := trm

TXN_DATA_LONDON := $(wildcard txndata/london/*.lisp) \
$(wildcard txndata/london/**/*.lisp)
TXN_DATA_LONDON := txndata/london

TXN_DATA_SHANGHAI := $(wildcard txndata/shanghai/*.lisp) \
$(wildcard txndata/shanghai/**/*.lisp)
TXN_DATA_SHANGHAI := txndata/shanghai

TXN_DATA_CANCUN := $(wildcard txndata/cancun/*.lisp) \
$(wildcard txndata/cancun/**/*.lisp)
TXN_DATA_CANCUN := txndata/cancun

WCP := wcp

Expand Down
9 changes: 9 additions & 0 deletions blockdata/cancun/processing/blobbasefee/linea.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(module blockdata)

(defconst (BLOB_BASE_FEE_ENABLE :binary :extern) 1)

(defconstraint blobbasefee-value
(:guard (* (blobbasefee-precondition) BLOB_BASE_FEE_ENABLE))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(begin (eq! (curr-BLOBBASEFEE-hi) 0)
(eq! (curr-BLOBBASEFEE-lo) LINEA_BLOB_BASE_FEE))) ;;TODO: surely this won't work for blockchain ref tests
9 changes: 4 additions & 5 deletions constants/constants.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@
GAS_CONST_ECPAIRING_PAIR 34000
GAS_CONST_BLAKE2_PER_ROUND 1
GAS_CONST_INIT_CODE_WORD 2 ;; post Shanghai EIP-3860
GAS_CONST_TLOAD 100 ;; post Cancun (EIP-1153)
GAS_CONST_TSTORE 100 ;; post Cancun (EIP-1153)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EVM MISC ;;
Expand All @@ -244,6 +242,9 @@
MAX_REFUND_QUOTIENT 5
CREATE2_SHIFT 0xff ;; create2 first byte
EIP2681_MAX_NONCE 18446744073709551615 ;; = 2^64 - 1
ETHEREUM_GAS_LIMIT_MINIMUM 5000
ETHEREUM_GAS_LIMIT_MAXIMUM 0xffffffffffffffff ;; maxUint64
MIN_BASE_FEE_PER_BLOB_GAS 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LINEA MISC ;;
Expand All @@ -257,12 +258,10 @@
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
LINEA_BLOCK_GAS_LIMIT LINEA_GAS_LIMIT_MAXIMUM
LINEA_BLOB_BASE_FEE 666 ;; TODO: put the right value
LINEA_BLOB_BASE_FEE MIN_BASE_FEE_PER_BLOB_GAS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SIZE / LENGTH ;;
Expand Down
7 changes: 4 additions & 3 deletions hub/cancun/constraints/instruction-handling/btc.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
;; stack/OOGX))

(defconstraint block-data-instruction-setting-the-stack-pattern (:guard (block-data-standard-hypothesis))
(if-zero (force-bin [stack/DEC_FLAG 2])
(stack-pattern-1-1)
(stack-pattern-0-1)))
(begin
(if-eq [stack/DEC_FLAG 1] 1 (stack-pattern-1-1))
(if-eq [stack/DEC_FLAG 2] 1 (stack-pattern-0-1))
(if-eq [stack/DEC_FLAG 3] 1 (stack-pattern-1-1)))) ;;TODO: this is for BLOBHASH, will be recategorize TXN family

(defconstraint block-data-instruction-setting-NSR (:guard (block-data-standard-hypothesis))
(eq! NON_STACK_ROWS
Expand Down
Loading