Skip to content

Commit

Permalink
feat(modexp-data): add contraints for MODEXP_DATA module (#70)
Browse files Browse the repository at this point in the history
Resolves: #68 
Signed-off-by: Tsvetan Dimitrov <tsvetan.dimitrov@consensys.net>
  • Loading branch information
powerslider authored Jan 18, 2024
1 parent 3530f1a commit 9d45333
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ TXN_DATA := txn_data/columns.lisp txn_data/constraints.lisp \
WCP := wcp/columns.lisp wcp/constraints.lisp \
# wcp/hub_into_wcp.lisp \
MODEXP_DATA := modexpdata/

ZKEVM_MODULES := ${ALU} \
${BIN} \
${EC_DATA} \
Expand All @@ -92,6 +94,7 @@ ZKEVM_MODULES := ${ALU} \
${LOG_DATA} \
${LOG_INFO} \
${MEMORY} \
${MODEXP_DATA} \
${MXP} \
${PUB_DATA} \
${RLP_ADDR} \
Expand Down
12 changes: 12 additions & 0 deletions modexpdata/columns.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(module modexpdata)

(defcolumns
(STAMP :byte)
(CT :byte)
(RESULT_DATA_CONTEXT :i32)
(BEMR :byte)
(PHASE :byte)
(INDEX :byte :display :dec)
(LIMB :i16 :display :bytes)
(BYTES :byte))

8 changes: 8 additions & 0 deletions modexpdata/constants.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(module modexpdata)

(defconst
PHASE_BASE 1
PHASE_EXPONENT 2
PHASE_MODULUS 3
PHASE_RESULT 4)

1 change: 1 addition & 0 deletions modexpdata/constraints.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(module modexpdata)

0 comments on commit 9d45333

Please sign in to comment.