Skip to content

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

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open

MXP redesign #625

wants to merge 63 commits into from

Conversation

OlivierBBB
Copy link
Collaborator

CT_MAX_MXPX (- nROWS_MXPX 1)
CT_MAX_UPDT_W (- nROWS_UPDT_W 1)
CT_MAX_UPDT_B (- nROWS_UPDT_B 1)
)
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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.

OlivierBBB added 24 commits May 14, 2025 11:12
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants