Skip to content
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

Compute the account creation cost in STP only for CALL #7

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

OlivierBBB
Copy link
Collaborator

No description provided.

@OlivierBBB OlivierBBB self-assigned this Nov 21, 2024
@OlivierBBB OlivierBBB linked an issue Nov 21, 2024 that may be closed by this pull request
Comment on lines 44 to 59
\If \stpCall_{i} = 0 ~ \Then & 0 \\
\If \stpCall_{i} = 1 ~ \Then &
\begin{cases}
\If \locExists = 1 \vee \locTransfersValue = 0 : & 0 \\
\If \locExists = 0 \wedge \locTransfersValue = 1 : & G_\text{newaccount} \\
\end{cases}
\end{cases}
\\
& \define &
G_\text{newaccount} \cdot
\left[ \begin{array}{cr}
\cdot & \stpCall_{i} \\
\cdot & (1 - \locExists) \\
\cdot & \locTransfersValue \\
\end{array} \right]
\vspace{2mm} \\
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only meaningful change. It explicitly sets \locGasNewAcc to zero for anything but CALL.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recall: in this module \stpCall is what we could call \isCall most anywhere else.

@OlivierBBB OlivierBBB enabled auto-merge (squash) November 21, 2024 11:27
Copy link
Contributor

@lorenzogentile404 lorenzogentile404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a good formatting choice :)

@OlivierBBB OlivierBBB merged commit 5856c85 into main Nov 28, 2024
@OlivierBBB OlivierBBB deleted the 6-account-creation-cost-fix-for-stp branch November 28, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account creation cost fix for STP
2 participants