Skip to content

Commit

Permalink
fix: hide txnData.cumulative-gas constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
letypequividelespoubelles committed Dec 18, 2023
1 parent 7ce2743 commit fd9c846
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions txn_data/constraints.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,20 @@
;; 2.5 Cumulative gas ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconstraint cumulative-gas ()
(begin (if-zero ABS
(vanishes! CUM_GAS))
(if-not-zero (will-remain-constant! BTC)
; BTC[i + 1] != BTC[i]
(eq! (next CUMULATIVE_CONSUMED_GAS)
(next (- GAS_LIMIT REFUND_AMOUNT))))
(if-not-zero (and (will-inc! BTC 1) (will-remain-constant! ABS))
; BTC[i + 1] != 1 + BTC[i] && ABS[i+1] != ABS[i] i.e. BTC[i + 1] == BTC[i] && ABS[i+1] == ABS[i] +1
(eq! (next CUM_GAS)
(+ CUM_GAS
(next (- GAS_LIMIT REFUND_AMOUNT)))))))

;;TODO reenable this constraint
;;(defconstraint cumulative-gas ()
;; (begin (if-zero ABS
;; (vanishes! CUM_GAS))
;; (if-not-zero (will-remain-constant! BTC)
;; ; BTC[i + 1] != BTC[i]
;; (eq! (next CUMULATIVE_CONSUMED_GAS)
;; (next (- GAS_LIMIT REFUND_AMOUNT))))
;; (if-not-zero (and (will-inc! BTC 1) (will-remain-constant! ABS))
;; ; BTC[i + 1] != 1 + BTC[i] && ABS[i+1] != ABS[i] i.e. BTC[i + 1] == BTC[i] && ABS[i+1] == ABS[i] +1
;; (eq! (next CUM_GAS)
;; (+ CUM_GAS
;; (next (- GAS_LIMIT REFUND_AMOUNT)))))))
;;
;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; 2.6 Aliases ;;
Expand Down

0 comments on commit fd9c846

Please sign in to comment.