-
Notifications
You must be signed in to change notification settings - Fork 16
MXP
redesign
#625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
MXP
redesign
#625
Conversation
mxp_v3/generalities/shorthands.lisp
Outdated
CT_MAX_MXPX (- nROWS_MXPX 1) | ||
CT_MAX_UPDT_W (- nROWS_UPDT_W 1) | ||
CT_MAX_UPDT_B (- nROWS_UPDT_B 1) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe MXP constants need to be defined in a dedicated file if we want them to be included in Trace.java
generated file in tracer later.
(defun (mxp-shorthand---is-deploying) (force-bool (shift macro/DEPLOYING NEGATIVE_ROW_OFFSET___SCNRI_TO_MACRO))) | ||
(defun (mxp-shorthand---is-RETURN) (force-bool (shift decoder/IS_RETURN NEGATIVE_ROW_OFFSET___SCNRI_TO_DECDR))) | ||
(defun (mxp-shorthand---byte-price) (shift decoder/G_BYTE NEGATIVE_ROW_OFFSET___SCNRI_TO_DECDR)) | ||
(defun (mxp-shorthand---real-byte-price) (if-zero (mxp-shorthand---is-RETURN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming seems to be not 100 % consistent with specs, e.g., this is called gas_per_byte
.
(mxp-shorthand---byte-price)) | ||
)) | ||
(defun (mxp-shorthand---number-of-bytes) (mxp-shorthand---size-1-lo)) | ||
(defun (mxp-shorthand---extra-byte-cost) (* (mxp-shorthand---size-1-lo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the the specs, (mxp-shorthand---number-of-bytes)
is used to defined (mxp-shorthand---extra-byte-cost)
, but it is equivalent so it is up to us how much consistent we want to be with the specs.
- unified treatment for MLOAD, MSTORE, MSTORE8 - they all use (set-MXP-instruction---single-mxp-offset-instructions) - does not apply to CALLDATALOAD - new shorthand (stack-ram---fixed-size) which is 32, 32, 1 depending on the case
hub_into_mxp --> hub_into_mxp_london hub_into_mxp_cancun also removed MTNTOP from the cancun version
Implementation of Consensys/linea-specification#103