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

Only CALL may actually transfer value #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OlivierBBB
Copy link
Collaborator

No description provided.

@OlivierBBB OlivierBBB added the bug Something isn't working label Nov 21, 2024
@OlivierBBB OlivierBBB self-assigned this Nov 21, 2024
@OlivierBBB OlivierBBB linked an issue Nov 21, 2024 that may be closed by this pull request
@OlivierBBB
Copy link
Collaborator Author

OlivierBBB commented Nov 21, 2024

Gist of the issue: under the previous constraints CALLCODE led to an actual value transfer, which is a bug. This PR fixes the issue. More details are in the \saNote{} of the caller balance update.

\[
\accSameBalance
{i}{\callFirstCallerAccountRowOffset}
\]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I.e. every CALL-type instruction besides CALL.

\[
\accDecrementBalance
{i}{\callFirstCallerAccountRowOffset}{\locValueLo}
{i}{\callFirstCallerAccountRowOffset}{\locIsCall \cdot \locValueLo}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is actually implemented, see commit Consensys/linea-constraints@2087e3f

\[
\accIncrementBalance
{i}{\callFirstCalleeAccountRowOffset}{\locIsCall \cdot \locValueLo}
\]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is actually implemented, see commit Consensys/linea-constraints@2087e3f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only CALL may actually transfer value
1 participant