Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Add CALLVALUE and CALLDATASIZE#96

Merged
ed255 merged 1 commit into
masterfrom
feature/opcode-callvalue1
Jan 21, 2022
Merged

Add CALLVALUE and CALLDATASIZE#96
ed255 merged 1 commit into
masterfrom
feature/opcode-callvalue1

Conversation

@ed255
Copy link
Copy Markdown
Contributor

@ed255 ed255 commented Jan 19, 2022

Also fix rw_table order in CALLER: first call context, then stack op.
This makes the circuit closer to the actual EVM behaviour: first the
caller_address is obtained from the call context, and then it is pushed
to the stack.

@ed255 ed255 added the opcode label Jan 19, 2022
@ed255 ed255 requested review from CPerezz and han0110 January 19, 2022 15:28
@ed255 ed255 mentioned this pull request Jan 19, 2022
5 tasks
Copy link
Copy Markdown
Contributor

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

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

LGTM!!

execution_state=ExecutionState.CALLDATASIZE,
rw_counter=9,
call_id=1,
is_root=True,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ed255 Should we also test the scenario where this is not the root (is_root=False) so that we test CALLDATASIZE for internal calls as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think that's a very interesting case to test. Nevertheless I think we'll have to wait for this #82 to be merged so that we have CALLs in order to achieve a test situation where is_root=False.

So I'd say that we can delay this for the future.

Copy link
Copy Markdown
Contributor

@han0110 han0110 left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread src/zkevm_specs/evm/execution/calldatasize.py Outdated
Comment thread tests/evm/test_calldatasize.py Outdated
Also fix rw_table order in CALLER: first call context, then stack op.
This makes the circuit closer to the actual EVM behaviour: first the
caller_address is obtained from the call context, and then it is pushed
to the stack.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants